# kmmbvnr/django-fsm

Django friendly finite state machine support

Repository: https://github.com/kmmbvnr/django-fsm
Canonical: https://ross.abutalabs.com/products/django-fsm
Language: Python
License: MIT
License Family: permissive
Topics: python, django, finite-state-machine, fsm, state-machine, state-machine-diagram
Last push: 2025-10-07T16:33:09+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 45, release rhythm 8, longevity 100
- inputs: {"age_days": 5938, "days_push": 330, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2352, forks 298 (observed 2026-08-28T04:06:40.436500+00:00)

## What it is
A Python library providing Django-friendly finite state machine support, allowing declarative definition of states and guarded transitions on model fields. It has been renamed and superseded by viewflow.fsm as of version 3.0, which has a new, incompatible API.

## Use cases
- add a state machine to a django model
- enforce allowed state transitions in a workflow
- implement order status lifecycle in django
- prevent invalid state assignment on model fields
- model approval or publishing workflows in python

## When to choose
- you need declarative FSM transitions on Django models
- you want transition guards and TransitionNotAllowed enforcement
- you are maintaining a legacy project already using django-fsm

## When to avoid
- you are starting a new project - use viewflow.fsm instead
- you need a framework-agnostic state machine without Django
- you need a full workflow/BPM engine rather than a simple FSM

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, workflow-automation
- domain: web-development, backend, developer-tools
- platform: python
- tags: django, finite-state-machine, fsm, state-machine, transitions, viewflow

## Member repositories
- kmmbvnr/django-fsm (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.436500+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:52.214883+00:00, confidence not recorded.
  - readme: https://github.com/kmmbvnr/django-fsm (fetched 2026-08-28T04:06:40.436500+00:00, sha df0448ef5fa6)
  - registry_pypi: https://pypi.org/pypi/django-fsm/json (fetched 2026-08-29T10:17:18.503364+00:00, sha ab3288ed28f2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
