A Django library that provides a service layer pattern for encapsulating business logic and operations on models. It offers Service and ModelService base classes with built-in form processing, validation, and optional Celery integration. Current version 0.7.1 supports Django 4.0 and Python 3.10; releases are infrequent.
pip install django-service-objectsVerified import paths — ran on the pinned version, not inferred.
Define a Service class with form fields and a process method, then call MyService.execute(dict).
Ensure your service subclass calls super().__init__(*args, **kwargs).
Replace ListField/DictField with Django's JSONField or implement custom fields.
Set class Meta: db_transaction = True on your service to wrap process() in a transaction.
Run: pip install django-service-objects && python -c "import service_objects"
Call MyService.execute(input_data) which automatically validates and processes, or manually call .is_valid() before .cleaned_data.