awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
pytransitions avatar

pytransitions/transitions

0
View on GitHub↗
6,548 stars·567 forks·Python·MIT·34 views

Transitions

Transitions is an object-oriented finite state machine library for Python. It provides a framework for managing valid states and the logic for moving between them, including implementations for asynchronous state machines and thread-safe state managers.

The library supports hierarchical state machines that allow states to be nested to organize complex subtasks and logical contexts. It includes tools for generating visual diagrams of states and transitions to document machine logic.

The project covers state management primitives such as lifecycle callbacks, conditional transition guarding, and state property tagging. It also provides capabilities for state persistence through serialization and automated transitions based on state timeouts.

Features

  • Finite State Machine Engines - Provides an object-oriented finite state machine engine for managing states and transitions in Python.
  • State Transition Lifecycle Hooks - Provides automatic callbacks triggered during the entry and exit phases of state transitions.
  • Hierarchical State Composition - Supports hierarchical state nesting where sub-states inherit and override the logic of parent states.
  • Asynchronous State Transitions - Implements an asynchronous state machine that manages concurrent events and transitions using task runners.
  • State Lifecycle Callbacks - Executes registered functions automatically during specific transition phases like entry and exit.
  • Hierarchical State Machines - Implements a system for nesting states within other states to organize complex subtasks and logical contexts.
  • Object-Oriented State Mapping - Maps finite state machine logic directly onto Python objects by dynamically adding transition methods to their classes.
  • State Transition Models - Defines the trigger, source, and destination required to move a model from one state to another.
  • Conditional Transition Guards - Evaluates boolean conditions to determine if a transition between states is permitted.
  • State-Transition Execution - Triggers state moves by calling attached methods on a model or using dynamic trigger mechanisms.
  • Asynchronous State Transition Frameworks - Provides a framework for executing state changes that incorporate asynchronous operations and lifecycle hooks.
  • State Transition Validation - Verifies if a transition is permissible from the current state by evaluating conditions without executing the move.
  • Transition Event Queueing - Processes events sequentially in a queue to ensure one transition finishes before the next one begins.
  • State Logic Visualizers - Generates visual diagrams of states and transitions to document the logic of the state machine.
  • State Machine Visualizations - Provides tools for generating visual diagrams of states and transitions to document machine logic.
  • Reentrant Locks - Uses reentrant locks to prevent race conditions during simultaneous state transition triggers.
  • Asynchronous Event Loops - Implements non-blocking transitions and concurrent state changes using asynchronous event loop integration.
  • Asynchronous Action Handling - Manages concurrent transitions and task runners to prevent conflicts in non-blocking applications.
  • Persistence and Serialization - Provides utilities for serializing and persisting the current state of a machine across sessions.
  • Machine State Serialization - Saves and loads the current status of a state machine to persist progress across sessions.
  • Automated Transition Generators - Generates methods that allow a model to move to any target state regardless of its current position.
  • Thread-Safe State Transitions - Prevents data corruption during event dispatching via reentrant locks to ensure atomic state updates.
  • Dynamic Method Generation - Dynamically creates trigger methods on the fly to facilitate state transitions based on configuration.
  • State Timeouts - Automatically triggers events after a state has remained active for a specified duration of time.
  • Algorithms and Patterns - Lightweight finite state machine implementation.

Star history

Star history chart for pytransitions/transitionsStar history chart for pytransitions/transitions

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Transitions

These projects share indexed features with Transitions. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • jakesgordon/javascript-state-machinejakesgordon avatar

    jakesgordon/javascript-state-machine

    8,751View on GitHub↗

    This library is a finite state machine framework for JavaScript designed to manage application states and valid transitions. It provides a system for executing state changes with lifecycle hooks, conditional guards, and transition cancellation. The project is distinguished by its ability to inject state machine logic and transition capabilities directly into existing JavaScript class instances or objects. It also includes a visualization tool that exports state configurations into Graphviz DOT language for auditing system logic. The framework covers asynchronous transition execution and paus

    JavaScript
    View on GitHub↗8,751
  • dotnet-state-machine/statelessdotnet-state-machine avatar

    dotnet-state-machine/stateless

    6,191View on GitHub↗

    Stateless is a .NET state machine library used to manage complex object behaviors and lightweight workflows through C# code. It functions as an asynchronous workflow engine that executes state transitions, guards, and entry-exit actions using asynchronous tasks. The library implements a hierarchical state machine, allowing child states to inherit transitions and properties from parent superstates. It includes a state persistence framework that decouples state tracking from machine logic by reading and writing the current state to external properties or databases. Additionally, it features a g

    C#
    View on GitHub↗6,191
  • aasm/aasmaasm avatar

    aasm/aasm

    5,219View on GitHub↗

    This library provides a framework for defining finite state machines within Ruby classes to manage complex object lifecycles. It functions as a declarative workflow engine, allowing developers to model object states, events, and transitions through a readable domain-specific language. By integrating directly with database persistence layers, the framework ensures that state changes are synchronized with storage records while maintaining data integrity through transaction management and row locking. The library distinguishes itself by enforcing strict business rules through conditional transit

    Ruby
    View on GitHub↗5,219
  • statelyai/xstatestatelyai avatar

    statelyai/xstate

    29,734View on GitHub↗

    XState is a statechart logic library and finite state machine framework used to model complex application behavior. It provides a system for defining states, events, and transitions to govern how a system responds to inputs through a formal schema. The project includes a visual state machine editor that allows for the design of state machine diagrams which automatically generate the corresponding logic and code. It implements an actor model to manage independent concurrent entities that communicate via asynchronous events to coordinate behavioral flows. The framework covers event-driven stat

    TypeScriptbackground-jobsfinite-state-machinefsm
    View on GitHub↗29,734
Compare all 30 related projects→

Frequently asked questions

What does pytransitions/transitions do?

Transitions is an object-oriented finite state machine library for Python. It provides a framework for managing valid states and the logic for moving between them, including implementations for asynchronous state machines and thread-safe state managers.

What are the main features of pytransitions/transitions?

The main features of pytransitions/transitions are: Finite State Machine Engines, State Transition Lifecycle Hooks, Hierarchical State Composition, Asynchronous State Transitions, State Lifecycle Callbacks, Hierarchical State Machines, Object-Oriented State Mapping, State Transition Models.

Which projects share features with pytransitions/transitions?

Projects with overlapping indexed features include: jakesgordon/javascript-state-machine — This library is a finite state machine framework for JavaScript designed to manage application states and valid… dotnet-state-machine/stateless — Stateless is a .NET state machine library used to manage complex object behaviors and lightweight workflows through C#… aasm/aasm — This library provides a framework for defining finite state machines within Ruby classes to manage complex object… statelyai/xstate — XState is a statechart logic library and finite state machine framework used to model complex application behavior. It… pluginaweek/state_machine — This project is a Ruby library for defining and managing object lifecycles through states, events, and transition… chakra-ui/zag — Zag is a headless UI state machine library that provides unstyled component logic to ensure consistent behavior across…