Skip to main content

MultiState

PyPI version Python 3.10+ License: MIT Documentation

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.

Metadata

Release files for multistate 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multistate 0.1.1
File Size Uploaded Provenance
multistate-0.1.1.tar.gz 25.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for multistate 0.1.1
File Interpreter ABI Platform
multistate-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 56.5 kB

Release files / multistate-0.1.1.tar.gz

Download URL multistate-0.1.1.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a06a26a4eeb8ee7fdb0b49d55d5d060664c7e82decb610d267f6f32902c5bc7
BLAKE2b-256 checksum
How to use checksums
1002a60e079676dd24fbd2e20c962ec2b00c7118117b95d49289f60a4577ed3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.10 Windows/10

Release files / multistate-0.1.1-py3-none-any.whl

Download URL multistate-0.1.1-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae3e18ffe6692720b5f9dffc604482059655d134b1fe374f0cbcaf0e32a7ff40
BLAKE2b-256 checksum
How to use checksums
f8a03f4998640dae7e0db611cb8ec3bc9cb50d4ba672ed828df883ef5104ccf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.10 Windows/10

Security for multistate 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page