$npx skillfedfor your agent

django-lifecycle

Declarative model lifecycle hooks.

Worth itPyPI Application FrameworksReleased Jun 2026257.8K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_lifecycle-1.3.0-py3-none-any.whl
v1.3.0 · released 2026-06-14 · 1 runtime deps: Django

Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real readability problem in Django projects. It's a straightforward drop-in for teams that find Signals cumbersome and prefer declarative, co-located lifecycle logic. The MIT license imposes no restrictions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with a single runtime dependency (Django).
  • Active maintenance as of 2026-06-14 with 1405 repository stars and recent releases.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

last release 2026-06-14 (61 days) · last repo commit 2026-06-14 · 1,405 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 257,820 downloads/mo, #8,434 on PyPI

Verify before relying

pip install django-lifecycle

from django_lifecycle import LifecycleModel, hook, BEFORE_UPDATE
from django_lifecycle.conditions import WhenFieldHasChanged

class Article(LifecycleModel):
    contents = models.TextField()
    updated_at = models.DateTimeField(null=True)

    @hook(BEFORE_UPDATE, WhenFieldHasChanged("contents", has_changed=True))
    def on_content_change(self):
        self.updated_at = timezone.now()
  • Whether the package supports Python 3.14 as a stable release or only as a pre-release target
  • Whether Django 6.0 is currently released or a future version target
Same gist for agents: .md · .json

What it is and what it does

Django Lifecycle Hooks provides a decorator-based alternative to Django Signals for attaching code to model lifecycle events. Instead of overriding save() or __init__ and manually tracking field changes, you decorate methods with @hook and specify when they should run (before/after create, update, or delete) and under what conditions. The package includes a LifecycleModel base class and condition helpers like WhenFieldHasChanged and WhenFieldValueIs to express complex logic declaratively.

The main appeal is readability and maintainability: lifecycle logic stays close to the model definition rather than scattered across signal handlers. It works with Django 4.2, 5.0, 5.2, and 6.0, and supports Python 3.8 through 3.14. The package has been in active development since 2018 and carries no known security vulnerabilities.

Use it for

  • Automatically update a timestamp field whenever a model's content changes, without overriding save().
  • Trigger side effects (like sending emails) only when a model transitions between specific states (e.g., draft to published).
  • Run validation or cleanup logic before or after a model is created, updated, or deleted, with fine-grained conditions.
  • Track field changes and react to them in the same model class, keeping related logic together and readable.
  • Replace Signal handlers for simple lifecycle events when you want less indirection and clearer code flow.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real readability problem in Django projects. It's a straightforward drop-in for teams that find Signals cumbersome and prefer declarative, co-located lifecycle logic. The MIT license imposes no restrictions.

Install

django-lifecycle on PyPI

Before you install

Low friction install with a single runtime dependency (Django). Active maintenance as of 2026-06-14 with 1405 repository stars and recent releases.

License in practice

MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install django-lifecycle

from django_lifecycle import LifecycleModel, hook, BEFORE_UPDATE
from django_lifecycle.conditions import WhenFieldHasChanged

class Article(LifecycleModel):
    contents = models.TextField()
    updated_at = models.DateTimeField(null=True)

    @hook(BEFORE_UPDATE, WhenFieldHasChanged("contents", has_changed=True))
    def on_content_change(self):
        self.updated_at = timezone.now()

Verify before relying

  • Whether the package supports Python 3.14 as a stable release or only as a pre-release target
  • Whether Django 6.0 is currently released or a future version target

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
Django
MaintenanceActively maintained 61 days since the last release
Last repo commit
First released
Downloads257,820 / month, #8,434 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.2Framework :: Django :: 6.0License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: django_lifecycle-1.3.0-py3-none-any.whl

Tags

Capabilities
django model lifecycle hooksdjango before after save hooksdjango model callbacksdjango lifecycle decoratordjango model event hooksdjango conditional model hooks
Topics
django-modelslifecycle-hooksorm-utilities
PyPI keywords
djangomodellifecyclehookscallbacks

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django model lifecycle hooks”

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also django-dirtyfields · django-signal-webhooks · snapshot-restore-py · django-fsm-2 · django-click · django-upgrade · django-fsm-log · django-ordered-model · django-waffle · django-admin-extra-buttons