A Python library for managing multiple simultaneous active states with intelligent pathfinding and coordinated transitions
Project description
MultiState
A Python library for managing multiple simultaneous active states with intelligent pathfinding and coordinated transitions.
Overview
Unlike traditional FSM libraries that assume a single active state, MultiState handles:
- Multiple states active simultaneously
- State groups that activate/deactivate together
- Pathfinding to multiple target states
- Coordinated transition execution with phases
- Incoming transitions for newly activated states
Installation
pip install multistate
Quick Start
from multistate import StateManager, State, StateGroup, Transition
# Create states
login = State("login")
dashboard = State("dashboard")
toolbar = State("toolbar")
sidebar = State("sidebar")
# Group related states
workspace = StateGroup("workspace", [dashboard, toolbar, sidebar])
# Setup manager
manager = StateManager()
manager.add_state(login)
manager.add_group(workspace)
# Define transition that activates multiple states
login_transition = Transition(
from_states={login},
activate_group=workspace # Activates all states in group
)
# Execute transition
manager.execute_transition(login_transition)
assert manager.get_active_states() == {dashboard, toolbar, sidebar}
Documentation
📚 Full documentation with interactive playground: qontinui.github.io/multistate
Features:
- Complete API reference
- Mathematical formulas and proofs
- Interactive playground to try MultiState in your browser
- Usage examples and tutorials
Research
This library is based on research extending Model-based GUI Automation theory:
- Paper: Model-based GUI Automation - Springer SoSyM (October 2025)
- Mathematical model: Formal proofs of complexity reduction
- Related work: Analysis of state machine approaches
- Implementation details: See
paper/directory
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
License
MIT License - See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multistate-0.1.1.tar.gz.
File metadata
- Download URL: multistate-0.1.1.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a06a26a4eeb8ee7fdb0b49d55d5d060664c7e82decb610d267f6f32902c5bc7
|
|
| MD5 |
1b6ebb15dd8148db736eae32fc54a2bb
|
|
| BLAKE2b-256 |
1002a60e079676dd24fbd2e20c962ec2b00c7118117b95d49289f60a4577ed3a
|
File details
Details for the file multistate-0.1.1-py3-none-any.whl.
File metadata
- Download URL: multistate-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae3e18ffe6692720b5f9dffc604482059655d134b1fe374f0cbcaf0e32a7ff40
|
|
| MD5 |
408aa167f345222e9c9c0f994e43a1e2
|
|
| BLAKE2b-256 |
f8a03f4998640dae7e0db611cb8ec3bc9cb50d4ba672ed828df883ef5104ccf7
|