State Stores¶
Abstract interface and implementations for persisting entity state.
StateStoreClient
¶
Base class for persistent state store implementations.
Provides connect/disconnect lifecycle, context manager support, and
connection guards. Mirrors pycharter's MetadataStoreClient.
Subclasses must override connect() and should call
_require_connection() at the top of every method that touches the
backend.
Source code in src/pystator/stores/base.py
connect
¶
InMemoryStateStore
¶
In-memory state store for testing and simple use cases.
Implements sync, async, and versioned protocols. Not suitable for production.
Source code in src/pystator/stores/base.py
Other backends (SQLiteStateStore, PostgresStateStore, MongoDBStateStore, RedisStateStore) are available from pystator.stores when the corresponding optional dependencies are installed. See the package structure and state stores guide.