config_wrangler.config_templates.config_hierarchy module
- pydantic model config_wrangler.config_templates.config_hierarchy.ConfigHierarchy[source]
Bases:
BaseModelA non-root member of a hierarchy of configuration items.
NOTE: This class requires that the top of the hierarchy be an instance of
config_wrangler.config_root.ConfigRoot- Config:
validate_default: bool = True
validate_assignment: bool = True
validate_credentials: bool = True
- add_child(name: str, child_object: ConfigHierarchy)[source]
Set this configuration as a child in the hierarchy of another config. For any programmatically created config objects this is required so that the new object ‘knows’ where it lives in the hierarchy – most importantly so that it can find the hierarchies root object.
- full_item_name(item_name: str | None = None, delimiter: str = ' -> ')[source]
The fully qualified name of this config item in the config hierarchy.
- get_copy(copied_by: str = 'get_copy') ConfigHierarchy[source]
Copy this configuration. Useful when you need to programmatically modify a configuration without modifying the original base configuration.
- model_dump_non_private(*, mode: Literal['json', 'python'] | str = 'python', exclude: Set[str] | None = None) dict[str, Any][source]
- set_as_child(name: str, other_config_item: ConfigHierarchy)[source]
- static translate_config_data(config_data: MutableMapping)[source]
Children classes can provide translation logic to allow older config files to be used with newer config class definitions.