$npx skillfedfor your agent

django-fsm-2

Django friendly finite state machine support.

Worth itPyPI Python ModulesReleased Mar 2026437.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_fsm_2-4.2.4-py3-none-any.whl
v4.2.4 · released 2026-03-16 · Python >=3.10 · 3 runtime deps: django-stubs-ext, django, typing-extensions

Yes. This is a well-maintained, actively developed fork of a proven library with no known vulnerabilities, low install friction, and clear production-stable status. Use it if you need to manage model state transitions declaratively in Django; it eliminates scattered state-management code and makes workflows explicit and testable.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later and Django 4.2 or later.
  • Low friction install with only three runtime dependencies (django, django-stubs-ext, typing-extensions).
  • The package is actively maintained with a recent commit on 2026-08-07 and marked as Production/Stable.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions.

last release 2026-03-16 (151 days) · last repo commit 2026-08-07 · 278 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 437,224 downloads/mo, #6,671 on PyPI

Verify before relying

pip install django-fsm-2

from django_fsm import FSMField, FSMModelMixin, transition

class BlogPost(FSMModelMixin, models.Model):
    state = FSMField(default='new')
    
    @transition(field=state, source='new', target='published')
    def publish(self, **kwargs):
        pass

post = BlogPost.objects.get(pk=1)
post.publish()
post.save()
  • Whether typing support is fully implemented or still planned as mentioned in the description.
  • Performance characteristics when managing models with many possible state transitions.
Same gist for agents: .md · .json

What it is and what it does

Django FSM-2 is a maintained fork of the archived Django FSM project that brings finite state machine patterns to Django models. Instead of storing state as a plain CharField and managing transitions scattered throughout your codebase, you declare states and transitions once using decorators on model methods. This centralizes your model's lifecycle logic in one place, making it easier to reason about valid state changes, enforce preconditions, and attach business logic (side effects, permissions, notifications) to specific transitions.

The package works by providing FSMField (or FSMIntegerField/FSMKeyField variants) to store state, the @transition decorator to define allowed state changes, and helper methods to check permissions and available transitions. Transition methods can contain arbitrary logic; the state changes in memory on success, and you persist it with save(). You can restrict transitions with conditions, attach permissions, specify error-handling states, and use dynamic target states based on method return values.

Use it for

  • Managing blog post lifecycle (draft → review → published → archived) with automatic permission and timing checks.
  • Enforcing order state workflows (pending → processing → shipped → delivered) with side effects like notifications.
  • Controlling document approval flows where transitions require specific user permissions and conditions.
  • Building task or ticket systems where state changes trigger notifications or log entries.
  • Implementing subscription or account status transitions with business logic tied to each change.

Worth the install?

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

Worth it

Yes.

This is a well-maintained, actively developed fork of a proven library with no known vulnerabilities, low install friction, and clear production-stable status. Use it if you need to manage model state transitions declaratively in Django; it eliminates scattered state-management code and makes workflows explicit and testable.

Install

django-fsm-2 on PyPI

Before you install

Low friction install with only three runtime dependencies (django, django-stubs-ext, typing-extensions). The package is actively maintained with a recent commit on 2026-08-07 and marked as Production/Stable.

Requires Python 3.10 or later and Django 4.2 or later.

License in practice

MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions.

Quickstart

pip install django-fsm-2

from django_fsm import FSMField, FSMModelMixin, transition

class BlogPost(FSMModelMixin, models.Model):
    state = FSMField(default='new')
    
    @transition(field=state, source='new', target='published')
    def publish(self, **kwargs):
        pass

post = BlogPost.objects.get(pk=1)
post.publish()
post.save()

Verify before relying

  • Whether typing support is fully implemented or still planned as mentioned in the description.
  • Performance characteristics when managing models with many possible state transitions.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
django-stubs-extdjangotyping-extensions
MaintenanceActively maintained 151 days since the last release
Last repo commit
First released
Downloads437,224 / month, #6,671 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: django_fsm_2-4.2.4-py3-none-any.whl

Tags

Capabilities
django state machinefinite state machine djangodjango model lifecycledjango workflow transitionsdjango state transitionsfsm django modelsdjango state management
Topics
django-pluginstate-machineworkflow

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 state machine”

  • django-fsm-2Adds declarative finite state machine support to Django models,…
  • django-fsmProvides finite state machine support for Django models, allowing you…
  • django-fsm-logAutomatically logs state transitions for Django FSM models to the…

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

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also automaton · django-fsm · django-fsm-log · django-lifecycle · python-statemachine · fysom · transitions · django-pgtrigger · Automat · django-concurrency