Skip to main content

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.

Metadata

Release files for conflit 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conflit 0.1.4
File Size Uploaded
conflit-0.1.4.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for conflit 0.1.4
File Interpreter ABI Platform
conflit-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 50.0 kB

Release files / conflit-0.1.4.tar.gz

Download URL conflit-0.1.4.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3099dfbf515f060d0ee70576be7f05240e8a9c23887fbe085217a40103eccf2f
BLAKE2b-256 checksum
How to use checksums
8f3bc46dc7bf12bb54bb48e55e4b735be07e6827803e9e227d22449f431b13fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / conflit-0.1.4-py3-none-any.whl

Download URL conflit-0.1.4-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc4540fceaa5a669f43aec78665426fa131a90028797dee29b361d470740dc85
BLAKE2b-256 checksum
How to use checksums
3128566a0e55750fb1654982c6bd936c628cc378c697f31a8aaa808c0e3f714f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page