config module¶
The config module is part of the AMLE suite.
It represents AMLE configuration data that is global, i.e. not project-specific
It loads configuration from file, validates keys and provides access to values
It expects a file called “config.yaml” to be in the config subdirectory, containing properly formed YAML
-
class
config.Config(dir_default='config', dir_user='config/user', config_filename='config.yaml')¶ Bases:
baseclass.BaseClassThis class provides methods to ingest the configuration file and provides access to the config keys/values. Config file is YAML format in config subdirectory, and is called ‘config.yaml’
-
get_value(config_key)¶ Passed a key and see if it exists in the config YAML. If it does then return the value, if not return 0
-
ingest_config_default(config_filename, dir_default)¶ Ingest default config file
-
ingest_config_file(fullpath)¶ Passed full path to a YAML-formatted config file and ingest into a dictionary
-
ingest_config_user(config_filename, dir_user)¶ Ingest user config file that overrides values set in the default config file.
-
inherit_logging(config)¶ Call base class method to set up logging properly for this class now that it is running
-