How-To Guides¶
Practical guides for PyStator: architecture, persistence, workers, discovery, and observability.
Core¶
-
Architecture
Design goals, sandwich pattern, and how components fit together.
-
Package structure
Core vs optional extras (
[api],[worker],[ui],[all],[dev]). -
EntitySession
Per-entity stateful wrapper:
send(), snapshots, auto-generated helpers. -
Declarative features
YAML
check:fields, effects (set,timestamp, …), andStateMachineBuilder.
Execution and persistence¶
-
Schedulers
Delayed transitions: asyncio, Redis, Celery.
-
State stores
In-memory, PostgreSQL, Redis, MongoDB, custom
StateStoreadapters. -
Configuration
pystator.cfg, environment variables, database URL resolution. -
Deployment
Docker, Kubernetes, scaling replicas, default ports.
-
Worker
pystator worker,submit_event,worker_eventsqueue. -
DLQ migration
Dead-letter queue configuration and migration notes.
Quality and observability¶
-
Linting
Static FSM warnings with
pystator.lint.lint(). -
Hooks and metrics
TransitionObserver, hooks, metrics collectors. -
Context and sinks
TransitionContext, event/metric sinks. -
Visualization
Mermaid, DOT, SCXML export and statistics.
Discovery¶
-
Discovery (inferred FSM)
Inference engine, candidates, shadow mode, stores.
-
Classification
Infer state from data,
StateClassifier, ingestion.
Need more?¶
- Tutorials — step-by-step workflows
- API reference — mkdocstrings-generated Python API
- FSM config reference — YAML/JSON schema