Installation¶
Requirements¶
- Python 3.11+
Core library¶
Includes PyYAML and simpleeval (for optional inline expr: guards when used from YAML). The core is fully stateless: StateMachine, EntitySession, guards, actions, and the orchestration pattern.
Optional extras¶
| Extra | Purpose |
|---|---|
pystator[api] |
FastAPI REST API, SQLAlchemy + Alembic, DB drivers, JWT, MkDocs stack for pystator docs serve / build |
pystator[ui] |
Serve or develop the Next.js UI (FastAPI/uvicorn stack) |
pystator[worker] |
Background worker, Redis/Celery, queue processing |
pystator[collab] |
Socket.IO relay for real-time collaboration |
pystator[docs] |
MkDocs + Material + mkdocstrings + mike (also pulled in via [api] and [dev]) |
pystator[all] |
api + worker + ui + collab |
pystator[dev] |
Full runtime extras plus pytest, Ruff, mypy, pre-commit, Jupyter, build/twine |
Default local ports¶
Defined in pystator.config.ports (overridable via env / pystator.cfg):
| Service | Default port |
|---|---|
pystator api |
8004 |
pystator ui dev / serve |
3004 |
pystator docs serve |
5004 |
Database (API / worker)¶
With [api] or [worker], configure PYSTATOR_DATABASE_URL or pystator.cfg (see repo pystator.cfg.example). Initialize migrations:
Documentation CLI¶
With [docs] or [dev] (or [api]):
Next steps¶
- Quick start — first FSM and
process() - Concepts — states, transitions, orchestrator
- Configuration — config file and environment