--- id: automaton version: "3.4.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # automaton — Friendly state machines for Python. License: permissive · Maintenance: active · Downloads: 137.8K/mo ## What it is and what it does Automaton is a state machine library for Python that abstracts the state machine pattern into reusable, well-documented classes. It lets you define states, transitions between them, and validation rules, then execute state changes in a controlled way. The library is built on top of PrettyTable for display and typing-extensions for type hints, making it suitable for applications that need explicit state management—from workflow engines to task orchestration to event-driven systems. The package is actively maintained, supports modern Python versions (3.10 through 3.13), and carries no known security vulnerabilities. It's positioned as part of the OpenStack ecosystem but is general-purpose enough for any Python project requiring state machine semantics. Use it for: - Build workflow engines where tasks move through defined states (pending, running, completed, failed) with validation at each transition. - Implement event-driven systems that respond to specific triggers by transitioning between states in a predictable manner. - Create task scheduling systems that track job state and enforce valid state transitions to prevent invalid operations. - Validate state sequences in application logic to catch bugs where code attempts invalid state changes. - Model complex business logic as explicit state machines to improve code clarity and testability. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automaton provides state machine classes and utilities for Python, enabling you to define, validate, and execute state transitions in your application logic. Yes. Automaton is a lightweight, actively maintained library with no security issues, low install friction, and permissive licensing. It's well-suited if you need explicit state machine semantics in your application. Install it if you're building workflows, event handlers, or any system where state transitions need to be validated and controlled; skip it if your use case is simple enough to handle with conditionals or if you prefer a different state machine abstraction. ## Install pip install automaton uv add automaton poetry add automaton ## Installing automaton Before you install: Low install friction with a pure-wheel distribution and only two lightweight runtime dependencies. Active maintenance status with a recent release. License in practice: Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install automaton from automaton import machines machine = machines.FiniteMachine() machine.add_state('start') machine.add_state('end') machine.add_transition('start', 'end', 'go') machine.initialize(start_state='start') machine.process_event('go') Requires Python 3.10 or later. Verify before relying: - Whether the library supports hierarchical or nested state machines beyond basic finite state machine patterns. - Performance characteristics when handling large numbers of states or transitions. - Whether task scheduling and execution features are built-in or require external integration. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 137.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags state machine library, finite state machine python, state transitions, workflow state management, task scheduling state machine, state validation, state machine pattern, state-machine, workflow, openstack [View on SkillFed](https://skillfed.io/packages/automaton) · [View on PyPI](https://pypi.org/project/automaton/)