Skip to main content
Version: 2.4 (prerelease)

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 YAMLOmegaConf.create()
Combine configs, with later values taking precedenceOmegaConf.merge()
Read a nested value by pathOmegaConf.select()
Write a nested value by pathOmegaConf.update()
Convert a config to a Python containerOmegaConf.to_container()
Serialize a config to a YAML stringOmegaConf.to_yaml()
Resolve interpolations in placeOmegaConf.resolve()

Types and helpers​

Use MISSING to mark a mandatory missing value, II and SI for interpolations, and open_dict, read_write, or flag_override for temporary flag changes.

For explicit container types in 2.4, see typed_list, typed_dict, and typed_tuple.

Deprecated functions​

In 2.4, use OmegaConf.register_resolver() instead of these deprecated registration methods:

Deprecated functionReplacement
register_new_resolver()register_resolver()
legacy_register_resolver()register_resolver()

Browse every public symbol β†’