pytransitions/transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 45 minutes ago
Added to GitGenius on September 10th, 2026
Created on October 12th, 2014
Open Issues & Pull Requests: 22 (+0)
GitHub issues: Enabled
Number of forks: 569
Total Stargazers: 6,588 (+0)
Total Subscribers: 98 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

transitions is a lightweight, object-oriented finite state machine implementation in Python with many extensions.

The tool addresses the need to model behavior as a finite number of states and transitions between them. It allows developers to embed state machine logic into Python objects by defining states, transitions between those states, and actions that execute during state changes or transitions. The approach is object-oriented, enabling state machines to be composed of multiple objects where some machines contain definitions for manipulating others.

The tool suits projects that need to manage complex workflows, conditional state changes, or multi-step processes. It is particularly valuable for applications requiring hierarchical or nested states, queued or asynchronous transitions, or visual state diagrams. Developers should choose it when they need a straightforward, lightweight alternative to building state management logic from scratch, especially for Python applications that benefit from explicit state definitions and callback hooks at various points in the state lifecycle.

The project maintains active engagement with its codebase through regular updates and refinements to its core state machine implementation. The maintainers have invested in comprehensive documentation covering both basic usage and advanced patterns, including detailed sections on callbacks, conditional transitions, and alternative initialization approaches. The project provides multiple extensions for specialized use cases such as hierarchical state machines, diagram generation, threading support, and asynchronous operations, indicating a commitment to supporting diverse application requirements. Type hints are supported throughout the codebase, reflecting attention to modern Python development practices.