skillfed

django-service-objects

Service objects for Django

django-service-objects v0.7.1 91.9K downloads/30d#13,496 on PyPI335
Permissive license MIT License Abandoned released

What it is and what it does

django-service-objects is a lightweight library that provides a Service base class for organizing Django business logic into reusable, testable units. It works like a Django form with built-in validation but adds a process() method for executing your core logic and an optional post_process() method for side effects. You define fields using Django form fields, call execute() with a dictionary of inputs, and the service handles validation, data cleaning, and execution in a consistent pattern.

The library is designed to decouple business logic from views, models, and management commands—you write the service once and call it from anywhere. It has no security vulnerabilities on record and uses a permissive MIT License. However, the project is abandoned: the last release was 2022-02-24 and the last commit 2022-12-19, meaning it receives no maintenance or compatibility fixes.

Use it for:

  • Extracting complex user creation or account management logic from views into a reusable, testable service.
  • Running the same business process from multiple entry points (view, management command, async task) without code duplication.
  • Building a service layer that validates inputs consistently using Django form fields before executing core logic.
  • Organizing multi-step workflows with separate process() and post_process() phases (e.g., create user, then send email).
  • Writing unit tests that directly test business logic without mocking views or HTTP requests.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Service base class for Django that encapsulates business logic separately from views and models, with form-like validation and a process/post-process execution pattern.

No. While the library is well-designed and has low install friction, it is abandoned—no releases or commits since late 2022. For new projects, choose an actively maintained alternative. For existing projects already using it, continue only if you can maintain it yourself or accept the risk of incompatibility with future Django versions.

Install

django-service-objects on PyPI

pip

pip install django-service-objects

uv

uv add django-service-objects

poetry

poetry add django-service-objects

Installing django-service-objects

Before you install

Low install friction with only Django and six as runtime dependencies. However, the package is abandoned—last release was 2022-02-24 and last commit 2022-12-19. No active maintenance means security updates and compatibility fixes are unlikely.

License in practice

MIT License (permissive) allows commercial and private use with minimal restrictions, making it safe to adopt from a licensing perspective.

Quickstart

pip install django-service-objects

# Add 'service_objects' to INSTALLED_APPS in settings.py

from django import forms

class MyService:
    name = forms.CharField()
    def process(self):
        return self.cleaned_data['name']

MyService.execute({'name': 'test'})

Requires Django to be installed and configured; service must be added to INSTALLED_APPS.

Verify before relying

  • Whether the package remains compatible with Django versions released after 2022-02-24.
  • Active community or fork status—whether users have migrated to maintained alternatives.
  • Whether six dependency is still necessary given modern Python 3 adoption.

Package facts

License MIT License (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — Django, six
Maintenance abandoned — 1,632 days since the last release
Last repo commit
First released
Downloads 91,880/month — #13,496 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_service_objects-0.7.1-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: PluginsEnvironment :: Web EnvironmentFramework :: Django :: 2.2Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic Content

Tags

django business logic abstractionservice layer pattern djangodjango form-based servicesdecouple views from logic djangodjango service objects frameworkreusable business logic djangodjango process execution pattern
django-patternsbusiness-logic-layerabandoned

More WWW/HTTP packages