Skip to main content

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

conflit-0.1.4.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conflit-0.1.4-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file conflit-0.1.4.tar.gz.

File metadata

  • Download URL: conflit-0.1.4.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for conflit-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3099dfbf515f060d0ee70576be7f05240e8a9c23887fbe085217a40103eccf2f
MD5 1fecaa3b1dec2fa4f3c7909f8bd160df
BLAKE2b-256 8f3bc46dc7bf12bb54bb48e55e4b735be07e6827803e9e227d22449f431b13fe

See more details on using hashes here.

File details

Details for the file conflit-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: conflit-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for conflit-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bc4540fceaa5a669f43aec78665426fa131a90028797dee29b361d470740dc85
MD5 faa9d4c2cd642245d28314afb468a761
BLAKE2b-256 3128566a0e55750fb1654982c6bd936c628cc378c697f31a8aaa808c0e3f714f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page