Python API
OmegaConf's public API centers on the OmegaConf class. Start with an
operation below, then follow the link to its generated signature, parameters,
and return value.
| I want to… | Start with |
|---|---|
| Create a config from Python data or YAML | OmegaConf.create() |
| Combine configs, with later values taking precedence | OmegaConf.merge() |
| Read a nested value by path | OmegaConf.select() |
| Write a nested value by path | OmegaConf.update() |
| Convert a config to a Python container | OmegaConf.to_container() |
| Save a config as YAML | OmegaConf.to_yaml() |
| Resolve interpolations in place | OmegaConf.resolve() |
Helpers
Use MISSING for a mandatory value,
II and SI for
interpolations, and open_dict,
read_write, or
flag_override for temporary flag
changes.