# 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
```bash
pip install multistate
```
## Quick Start
```python
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 available at [https://jspinak.github.io/multistate/](https://jspinak.github.io/multistate/)
## Research
This library is based on research extending Model-based GUI Automation theory. See the `paper/` directory for:
- Formal mathematical model
- Related work analysis
- Implementation details
## Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
## License
MIT License - See LICENSE file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/jspinak/multistate",
"name": "multistate",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "state-machine, fsm, multi-state, pathfinding, gui-automation, state-management, transitions",
"author": "Josip Spi\u00f1ak",
"author_email": "jspinak@example.com",
"download_url": "https://files.pythonhosted.org/packages/ce/b2/a7d3c2617790bd5e58c6e73f6dbcb1db4235efce5392565aed65e39783db/multistate-0.1.0.tar.gz",
"platform": null,
"description": "# MultiState\n\nA Python library for managing multiple simultaneous active states with intelligent pathfinding and coordinated transitions.\n\n## Overview\n\nUnlike traditional FSM libraries that assume a single active state, MultiState handles:\n- Multiple states active simultaneously\n- State groups that activate/deactivate together\n- Pathfinding to multiple target states\n- Coordinated transition execution with phases\n- Incoming transitions for newly activated states\n\n## Installation\n\n```bash\npip install multistate\n```\n\n## Quick Start\n\n```python\nfrom multistate import StateManager, State, StateGroup, Transition\n\n# Create states\nlogin = State(\"login\")\ndashboard = State(\"dashboard\")\ntoolbar = State(\"toolbar\")\nsidebar = State(\"sidebar\")\n\n# Group related states\nworkspace = StateGroup(\"workspace\", [dashboard, toolbar, sidebar])\n\n# Setup manager\nmanager = StateManager()\nmanager.add_state(login)\nmanager.add_group(workspace)\n\n# Define transition that activates multiple states\nlogin_transition = Transition(\n from_states={login},\n activate_group=workspace # Activates all states in group\n)\n\n# Execute transition\nmanager.execute_transition(login_transition)\nassert manager.get_active_states() == {dashboard, toolbar, sidebar}\n```\n\n## Documentation\n\nFull documentation available at [https://jspinak.github.io/multistate/](https://jspinak.github.io/multistate/)\n\n## Research\n\nThis library is based on research extending Model-based GUI Automation theory. See the `paper/` directory for:\n- Formal mathematical model\n- Related work analysis\n- Implementation details\n\n## Contributing\n\nWe welcome contributions! Please see CONTRIBUTING.md for guidelines.\n\n## License\n\nMIT License - See LICENSE file for details.",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library for managing multiple simultaneous active states with intelligent pathfinding and coordinated transitions",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://jspinak.github.io/multistate/",
"Homepage": "https://github.com/jspinak/multistate",
"Repository": "https://github.com/jspinak/multistate"
},
"split_keywords": [
"state-machine",
" fsm",
" multi-state",
" pathfinding",
" gui-automation",
" state-management",
" transitions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "954c98f159a8f7a97a0f28271750c45130be7707fdcc925f1d701c017a11dada",
"md5": "afbd17af9c858f375d20f8dccd12e2bc",
"sha256": "ab4b620675bf4cc35c6928305accd114b1efff11f796a05a9dd070fb30963c8a"
},
"downloads": -1,
"filename": "multistate-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "afbd17af9c858f375d20f8dccd12e2bc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 30525,
"upload_time": "2025-10-09T11:16:36",
"upload_time_iso_8601": "2025-10-09T11:16:36.653489Z",
"url": "https://files.pythonhosted.org/packages/95/4c/98f159a8f7a97a0f28271750c45130be7707fdcc925f1d701c017a11dada/multistate-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ceb2a7d3c2617790bd5e58c6e73f6dbcb1db4235efce5392565aed65e39783db",
"md5": "fea78158353648c873264ecab30d9fee",
"sha256": "4540bf5b33cc0ba30472e8f42791edb1012eeb2fb6eecec36fe5e932218d6c4b"
},
"downloads": -1,
"filename": "multistate-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fea78158353648c873264ecab30d9fee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 24159,
"upload_time": "2025-10-09T11:16:37",
"upload_time_iso_8601": "2025-10-09T11:16:37.918713Z",
"url": "https://files.pythonhosted.org/packages/ce/b2/a7d3c2617790bd5e58c6e73f6dbcb1db4235efce5392565aed65e39783db/multistate-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-09 11:16:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jspinak",
"github_project": "multistate",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "multistate"
}