YamlConfig¶
YamlConfig - ImportConfig subclass for loading YAML files.
- class importconfig.yamlconfig.YamlConfig(file_path, lazy=False)[source]¶
Bases: importconfig.importconfig.ImportConfig
YamlConfig will load a YAML file into a dict.
Parameters: - file_path (str) – The path to the yaml file that will be loaded
- lazy (bool, optional) – Do not load the yaml file immediately in the constructor. default: False
- importconfig.yamlconfig.yamlconfig(file_path, lazy=False)[source]¶
Will load a YAML file into a dict.
Expanding any "@file" attributes that are found a long the way.
Note
Using this method is the same as calling YamlConfig(file_path, lazy=False).load()
Parameters: - file_path (str) – The path to the JSON file that will be loaded
- lazy (bool, optional) – Do not load the JSON file immediately in the constructor. default: False
Returns: If lazy=True it will return an instance of YamlConfig else a dict will be returned.