lightweight configuration management library
Project description
conflit
Layered YAML configuration for Python. Compose multiple config files, patch nested keys without repeating unchanged ones, accumulate lists across layers, and optionally validate the result with Pydantic.
TLDR
# base.yaml
model:
num_layers: 6
hidden_dim: 512
features:
- mixed_precision
# gpu_large.yaml — only what changes; hidden_dim is preserved
model:
num_layers: 12
features: !append
- distributed_training
# experiment.yaml
_compose:
- base.yaml
- gpu_large.yaml
run_name: orion-v1-large
from pathlib import Path
from conflit import load
cfg = load(Path("experiment.yaml"))
# {"model": {"num_layers": 12, "hidden_dim": 512},
# "features": ["mixed_precision", "distributed_training"],
# "run_name": "orion-v1-large"}
cfg = load(Path("experiment.yaml"), schema=OrionConfig)
cfg.model.num_layers # 12 — typed, validated
See examples/ for the full walkthrough and docs/ for the configuration model reference.
Install
uv sync
poe # list available tasks
Contributing
See CONTRIBUTING.md.
Project details
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 conflit-0.1.2.tar.gz.
File metadata
- Download URL: conflit-0.1.2.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937957fba91c53b353fa10302119e733ad0db567f1c0cb1557f88179af65c75b
|
|
| MD5 |
902ddc03232d684197281471c2fbf614
|
|
| BLAKE2b-256 |
55d96f1c17cb246e6e3def485e448f68ca29e12afa4cf7cd0060a97237daf8cc
|
File details
Details for the file conflit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: conflit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2abf40cb8e5ea68085d07e51ff982a744625d6be6e54f7a2dcab6a7fc92b9e5
|
|
| MD5 |
c99018670abdf6c36e4d5ff3d9749772
|
|
| BLAKE2b-256 |
73d557492bb14f2339fed4febdb10003005168b30834a467704f5913625be75b
|