Examples
Examples
Coyaml includes runnable examples in the repository root under examples/.
Running the examples
- Ensure you have a working environment (optional but recommended):
uv run python -c "import sys; print(sys.version)"
- Run the basic example:
PYTHONPATH=src uv run python examples/base.py
This will:
- load configuration from examples/config/config.yaml
- resolve templates (env, file, config, yaml)
- inject values into functions decorated with @coyaml
What to look at
examples/base.py: small end-to-end demo usingYSettings, DI via@coyaml, and Pydantic modelsexamples/config/config.yaml: configuration file showcasing templates and nesting