ConfigMate
Configuration that fits your Python application.
ConfigMate loads settings from environment variables and files, supports nested
keys, and validates values without adding required runtime dependencies.
**PYTHON CONFIGURATION**
## Keep application settings clear and predictable
Start with a small API, then add typed defaults, validation, and environment
overrides as your application needs them. Stellar Python applications can use
`StellarConfig` to keep Horizon and Soroban RPC endpoints aligned with the
selected network.
[Read the configuration guide](/configmate/configuration/usage.html){ .md-button .md-button--primary }
[Configure Stellar endpoints](/configmate/configuration/stellar.html){ .md-button }
[Browse the API](/configmate/api/config.html){ .md-button }
**A quick look**
```python
from configmate import Config
config = Config()
config.set_default("debug", False, bool)
config.load_from_env(prefix="APP_")
if config.get("debug"):
print("Debug mode is enabled")
```
### Multiple sources
Load values from environment variables and JSON files. YAML support is
available as an optional extra.
### Nested settings
Use dot notation such as `database.host` in your code and double underscores
such as `APP_DATABASE__HOST` in the environment.
### Validation built in
Declare required keys, type hints, and custom validators, then collect
configuration errors with `validate_all()`.
Find your next step
### Guides
Set up configuration from files or environment variables. Stellar Python
applications can use `StellarConfig` to select network-matched Horizon and
Soroban RPC defaults, or to supply explicit endpoint URLs for custom networks.
[Configuration guide](/configmate/configuration/usage.html) ·
[Stellar configuration](/configmate/configuration/stellar.html)
### Reference and examples
Explore the public API and copy working examples into your project.
[API reference](/configmate/api/config.html) ·
[Basic example](/configmate/examples/basic.html) ·
[Stellar example](/configmate/examples/stellar.html)
Install
The PyPI name configmate belongs to another project. Install this project
from PyPI as kairo-configmate:
pip install kairo-configmate
For development from a source checkout, run pip install ..
For YAML configuration files, install the optional extra:
pip install "kairo-configmate[yaml]"
ConfigMate is maintained by Kairo Solutions and released under the MIT
license. Contributions are welcome; see the
contributor guide.