Automat
Self-service finite-state machines for the programmer on the go.
Decision gist · record as of 2026-08-14
Yes, if you need to model stateful behavior with strict state ordering and want a clean, type-safe API. The permissive MIT license and low install friction make it low-risk. However, the 485-day gap since the last release suggests the project is aging; verify that it meets your Python version requirements (3.9+) and that its approach fits your use case before committing to it as a core dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; familiarity with typing.Protocol and state machine concepts recommended.
- Low install friction with a single lightweight runtime dependency (typing_extensions).
- Maintenance status is aging—last release was 485 days ago, though the repository remains active with a recent commit on 2026-01-13 and 647 stars.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2025-04-16 (485 days) · last repo commit 2026-01-13 · 647 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 14,296,962 downloads/mo, #1,239 on PyPI
Alternatives
Verify before relying
from automat import TypeMachineBuilder
from typing import Protocol
class MyStateMachine(Protocol):
def event(self) -> None: pass
builder = TypeMachineBuilder(MyStateMachine, CoreData)
state_a = builder.state("state_a")
state_b = builder.state("state_b")
state_a.upon(MyStateMachine.event).to(state_b).returns(None)
machine = builder.build()- Whether the library is actively maintained or in maintenance-only mode given the 485-day gap since last release
- Performance characteristics and scalability limits for complex state machines with many states or transitions
- Real-world adoption patterns and whether it integrates well with async/await workflows
What it is and what it does
Automat is a finite-state machine library that lets you define stateful behavior using Python method calls and type protocols, rather than requiring you to pass generic input objects through a state engine. Instead of scattering conditional logic across methods to track state flags, you declare states and transitions upfront, and the library synthesizes a clean interface that enforces valid state sequences at runtime.
The library targets the common pattern where your code needs to behave differently depending on its state (like a coffee machine that should only brew when it has water, beans, and a closed lid), but your callers should not need to know or care that you've implemented it as a state machine. It depends only on typing_extensions and supports Python 3.9 through 3.13, with full type hints throughout.
Use it for
- Implement protocol-based state machines for complex objects like network connections, protocol handlers, or device controllers that need strict state ordering.
- Build workflow engines or task schedulers where transitions between states must be explicit and validated at definition time.
- Create deterministic finite-state transducers that transform input sequences into output behaviors while maintaining clean, method-call-based APIs.
- Model state-dependent behavior in game logic, UI state management, or embedded systems where invalid state combinations must be impossible.
- Define type-safe state machines for async systems where each state transition can trigger side effects or return computed results.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to model stateful behavior with strict state ordering and want a clean, type-safe API.
The permissive MIT license and low install friction make it low-risk. However, the 485-day gap since the last release suggests the project is aging; verify that it meets your Python version requirements (3.9+) and that its approach fits your use case before committing to it as a core dependency.
Install
automat on PyPI
Before you install
Low install friction with a single lightweight runtime dependency (typing_extensions). Maintenance status is aging—last release was 485 days ago, though the repository remains active with a recent commit on 2026-01-13 and 647 stars.
Requires Python 3.9 or later; familiarity with typing.Protocol and state machine concepts recommended.
License in practice
MIT license (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
from automat import TypeMachineBuilder
from typing import Protocol
class MyStateMachine(Protocol):
def event(self) -> None: pass
builder = TypeMachineBuilder(MyStateMachine, CoreData)
state_a = builder.state("state_a")
state_b = builder.state("state_b")
state_a.upon(MyStateMachine.event).to(state_b).returns(None)
machine = builder.build()
Verify before relying
- Whether the library is actively maintained or in maintenance-only mode given the 485-day gap since last release
- Performance characteristics and scalability limits for complex state machines with many states or transitions
- Real-world adoption patterns and whether it integrates well with async/await workflows
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Aging 485 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,296,962 / month, #1,239 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended 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.9Typing :: Typed |
Evidence: automat-25.4.16-py3-none-any.whl
Tags
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 › “fsm framework”
- AutomatAutomat provides a Python library for building finite-state machines…
- fysomFysom is a finite state machine library that lets you define states,…
- 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 Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also automaton · django-fsm-log · transitions · pynini · outlines-core · python-statemachine · django-fsm-2 · django-fsm · cellpylib · pydantic-graph