Runnable examples demonstrating the OpenDecree Python SDK.
Start the decree server and seed example data:
# From this directory
make setupThis starts PostgreSQL, Redis, and the decree server via Docker Compose, then creates an example schema, tenant, and initial config values.
The tenant ID is written to .tenant-id — examples read it automatically.
pip install opendecreeFor the FastAPI example, also install:
pip install fastapi uvicorn| Example | What it shows | Server required |
|---|---|---|
| quickstart | Context manager, typed get(), set() |
Yes |
| async-client | async with, await, asyncio.gather() |
Yes |
| live-config | ConfigWatcher, @on_change decorator, changes() iterator |
Yes |
| fastapi-integration | AsyncConfigWatcher as FastAPI lifespan dependency |
Yes |
| error-handling | RetryConfig, nullable=True, error hierarchy |
Yes |
# After make setup:
cd quickstart
python main.pyOr run all examples as tests:
make testmake down