StrataConf
A layered configuration library for Python. StrataConf merges configuration from three layers: defaults, configs and overrides. Each layer can have multiple sources with all sources and layers being maintained independently.
Features include:
- Includes via
includes:from files or published packages - Interpolation via
${...}using configuration paths or resolvers - Object instantiation via
_target_with typed coercion - Configuration of
argparsefrom YAML files to enable command-line overrides - Extracting field defaults from dataclass/Pydantic classes
- Overriding function parameter defaults via the
config_defaultsdecorator - Tracking actively-used configuration values
- Creating a unique fingerprint of a subset of configuration values
It is built on OmegaConf, with some changes to streamline usage (e.g., resolvers are not namespaced).
Documentation
Full documentation, including a user guide and API reference, is available at fastfedora.github.io/strataconf.
Install
pip install strataconf
Quick Start
from strataconf import Config
config = Config()
config.load_defaults("configs/defaults.yaml") # base layer
config.load_config("configs/config.yaml") # main layer, on top of defaults
config.add_overrides({"server": {"port": 9000}}) # highest-precedence layer
port = config.get("server.port") # merged + interpolated value
See the documentation for the full guide and API reference.
Development
uv sync
just test # run the test suite
just lint # ruff + pyright
just docs # preview the docs (Quarto)
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strataconf-1.0.0.tar.gz.
File metadata
- Download URL: strataconf-1.0.0.tar.gz
- Upload date:
- Size: 155.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a37ac509c831e8f653a8f51fd1060216350c9e742545808558a2f4804cdbb32d
|
|
| MD5 |
cba1a6155898396ed09d9d5f432c8e2c
|
|
| BLAKE2b-256 |
aa275076e3a00d82f2251e4908a7451246d50bee32e72a98dbde7bc9cb087860
|
Provenance
The following attestation bundles were made for strataconf-1.0.0.tar.gz:
Publisher:
publish.yml on fastfedora/strataconf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strataconf-1.0.0.tar.gz -
Subject digest:
a37ac509c831e8f653a8f51fd1060216350c9e742545808558a2f4804cdbb32d - Sigstore transparency entry: 2679460965
- Sigstore integration time:
-
Permalink:
fastfedora/strataconf@ad5ca622591e5331c3c3a8df6dc9c36ef17628d1 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fastfedora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad5ca622591e5331c3c3a8df6dc9c36ef17628d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file strataconf-1.0.0-py3-none-any.whl.
File metadata
- Download URL: strataconf-1.0.0-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916f515046a1f2920661ec1e18bb9a774c1e77c43fcaf6a6d2dec12b3c28a44e
|
|
| MD5 |
b3d565229ea0bc186d3ee802123e34d4
|
|
| BLAKE2b-256 |
5bf552c762053f8ed06dc635de0e01ac20a489db4cf634f6075f30b491acdf2d
|
Provenance
The following attestation bundles were made for strataconf-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on fastfedora/strataconf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strataconf-1.0.0-py3-none-any.whl -
Subject digest:
916f515046a1f2920661ec1e18bb9a774c1e77c43fcaf6a6d2dec12b3c28a44e - Sigstore transparency entry: 2679461010
- Sigstore integration time:
-
Permalink:
fastfedora/strataconf@ad5ca622591e5331c3c3a8df6dc9c36ef17628d1 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fastfedora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad5ca622591e5331c3c3a8df6dc9c36ef17628d1 -
Trigger Event:
release
-
Statement type: