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.

# 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.1.tar.gz (8.7 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.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for conflit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 53f94a7231ba0a19fb71cef8361e2a38a62c3ae6beae228e8954a24da2e71fae
MD5 914242dd91930cf3fc483595afc013e8
BLAKE2b-256 7429dd43b4c7ac3cc0996c40b00827a836aaf13236e3066b75892c132f686ffa

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for conflit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8514d32e6e3b1cd3e3d8c1b2059bc89fa0e115a5667aaff81b601c5879ccfa31
MD5 fd580af82c2f2de59a3f1f322f5f2a2a
BLAKE2b-256 ed117f242bd44cc29e5f017f5ff3236a0f3ad689f54ebf4ab10f0149e616140a

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