Track where every value in your YAML configuration came from — file, line, column — and its full history of changes.
pip install yaml-provenancefrom yaml_provenance import load_yaml, DictWithProvenance, ProvenanceConfig
# Load a YAML file with provenance tracking
config = load_yaml("config.yaml")
# Inspect where a value came from
print(config["database"]["host"].provenance[-1])
# {'line': 3, 'col': 9, 'yaml_file': 'config.yaml'}
# Merge configurations — provenance history is preserved
defaults = load_yaml("defaults.yaml")
config.update(defaults)
# See the full history
print(config["database"]["host"].provenance)By default, history tracking is off for performance. Only the current provenance is stored:
from yaml_provenance import configure, ProvenanceConfig
# Enable full history tracking
configure(ProvenanceConfig(track_history=True))- Track file, line, and column for every YAML value
- Optional full history of changes (who modified what and when)
- Configurable category hierarchy for conflict resolution
- Works with any YAML-based configuration system
- Lightweight mode (default) for minimal overhead
MIT