Skip to main content

OmegaConf

Flexible configuration for Python. Create configs from Python or YAML, merge sources, and validate values with structured schemas.

Documentation for stable 2.3 · 2.4 prerelease

config.pyPython
from omegaconf import OmegaConf

base = OmegaConf.create({"port": 80})
config = OmegaConf.merge(
base, {"port": 8080}
)
print(config.port) # 8080
Output8080

Explore the documentation