Skip to content

PyStator Documentation

PyStator is a configuration-driven, stateless finite state machine library for Python. Define behavior in YAML or JSON; compute transitions from (current state + event + context); run guards and actions.

Documentation map

Section Description
Getting started Install, first FSM, first process() call
Concepts States, transitions, guards, actions, EntitySession vs Orchestrator, hierarchical and parallel
Package structure Core (machine, instance, guards, actions, stores, orchestrator) vs optional (API, DB, UI, schedulers)
Architecture Design goals, core flow, components, sandwich pattern
Schedulers Choosing a scheduler, delayed transitions (after), minimal Orchestrator example
Configuration Config file, environment, database (API)
Worker Continuous event-processing service: pystator worker, worker_events, submit_event
Tutorials Step-by-step: order workflow, API & UI
Examples Runnable examples and what they demonstrate
Reference FSM config (YAML/JSON) schema and validation
API reference StateMachine, EntitySession, Orchestrator, Worker, schedulers, execution modes

Prerequisites

  • Python 3.10+
  • For API/UI: pip install pystator[api]
  • For inline guard expressions: pip install pystator[recipes]