core.config.template_loader
Custom YAML loader with template and include support for jobmon logging configuration.
Classes
Custom YAML loader that supports !include and !template directives. |
Functions
|
Include another YAML file. |
|
Reference a template from the templates directory. |
|
Load all template files from the templates directory. |
|
Load a logconfig file with template support. |
|
Convenience function to load any YAML file with template support. |
|
Get the absolute path to core templates using package resources. |
Module Contents
- class core.config.template_loader.TemplateLoader(stream: Any)[source]
Bases:
yaml.SafeLoaderCustom YAML loader that supports !include and !template directives.
- core.config.template_loader.include_constructor(loader: TemplateLoader, node: yaml.nodes.ScalarNode) Any[source]
Include another YAML file.
- core.config.template_loader.template_constructor(loader: TemplateLoader, node: yaml.nodes.ScalarNode) Any[source]
Reference a template from the templates directory.
- core.config.template_loader.load_all_templates(config_root: str) Dict[str, Any][source]
Load all template files from the templates directory.
- core.config.template_loader.load_logconfig_with_templates(config_path: str) Dict[str, Any][source]
Load a logconfig file with template support.
Supports: - !include path/to/file.yaml - !template template_name - YAML merge operators (<<)
- Parameters:
config_path – Path to the main logconfig file
- Returns:
Fully resolved configuration dictionary