devctrl.utility.config_file.ConfigFile#
- class ConfigFile(filepath: str, init_values=None)[source]#
Bases:
objectClass managing a yaml config file. The file is loaded on creation and can be saved with .save().
You may initialize an instance with empty string as filepath, in this case no file will not be loaded or saved.
Methods
getget_orGet a path with ~ and environment variables expanded :raise KeyError: if name is not a valid key
get_path_orGet a copy of the values dictionary
Save the current variables to the config file
setSet the values from a dictionary