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.3.tar.gz (13.9 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.3-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for conflit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c88b3ac1d2aff9c8c2213886dd0ac8ec3402bdd3bce98d9313425626ec09f4d7
MD5 4665e8003fe346c4f3593dcd05405916
BLAKE2b-256 f0b5713bcfe794c151b92c6f3b2e0dfc3d815b79ed6633477c4b1d86dce65c19

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for conflit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 07ef2618c6d0a72fc0986fe5da19f2d3edd5f34fbaccd221664f406f46cf0b35
MD5 a81994098a29403668cfd42ed746aa17
BLAKE2b-256 4746337278cd917837cdbb41b427bf1543b3dd1ad3f2a6b8464a926b667f6cf7

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