rsinger86/django-lifecycle
Declarative model lifecycle hooks, an alternative to Signals. observed · 2026-08-28
Health v2 · maintenance only
86/100
- Activity 87
- Release rhythm 76
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 35
- age_days: 3090
- days_rel: 80
- days_push: 80
- n_releases_24m: 4
Adoption not part of the score
1404 stars · 96 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python library providing a @hook decorator and LifecycleModel base class for declarative model lifecycle hooks in Django. It serves as a readable alternative to Django Signals, letting developers attach callbacks to model save/update events with field-change conditions.
Use cases
- run code when a django model field changes
- replace django signals with declarative model hooks
- send email after a model transitions from draft to published
- avoid overriding save and __init__ in django models
- add before_update and after_update callbacks to django models
- attach transition conditions to model lifecycle events
When to choose
- you use Django models and want readable, co-located lifecycle callbacks
- you find Django Signals too indirect and want a fat-models approach
- you need conditional hooks based on field value changes or transitions
When to avoid
- you are not using Django or its ORM
- you need hooks decoupled from model classes across apps, where Signals fit better
- you need hooks on bulk queryset operations that bypass save()
Facets
library · maturity active
middleware developer-tools web-development backend developer-tools python django lifecycle-hooks orm model-hooks signals-alternative callbacks web-server
3 sources
- readme: https://github.com/rsinger86/django-lifecycle · fetched 2026-08-28 · c1d2ac43d9c0
- homepage: https://rsinger86.github.io/django-lifecycle/ · fetched 2026-08-29 · 1dfd31d52c6a
- registry_pypi: https://pypi.org/pypi/django-lifecycle/json · fetched 2026-08-29 · 8b6fc640fbd4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| rsinger86/django-lifecycle | main | 86 |
For agents
markdown · JSON · MCP: product_card(name="rsinger86/django-lifecycle")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem