Basic Usage
API
Values can be strings, numbers, lists, dicts, or any JSON-serializable Python object.
State Lifecycle
- Persists across stage transitions within a session
- Cleared when
terminate_session()is called - Isolated per session:no cross-session leaks
State Backends
In-Memory (Default)
Postgres
With Postgres state, sessions survive server restarts. A user can start a checkout flow, come back hours later, and their cart is still there.