b3j0f.conf.driver package¶
Subpackages¶
Submodules¶
Module contents¶
-
class
b3j0f.conf.driver.
ConfDriver
[source]¶ Bases:
object
Base class for managing conf.
-
CONF_FILE
= 'CONF_FILE'¶
-
get_conf
(conf_path, logger, conf=None, override=True)[source]¶ Parse a configuration_files with input conf and returns parameters and errors by param name.
Parameters: - conf_path (str) – conf file to parse and from get parameters.
- conf (Configuration) – conf to fill with conf_path values and conf param names.
- logger (Logger) – logger to use in order to trace information/error.
- override (bool) – if True (by default), override self configuration.
-
static
get_driver
(path)[source]¶ Add a conf driver by its path definition.
Parameters: path (str) – driver path to add. Must be a full path from a known package/module.
-
handle
(conf_path, logger)[source]¶ True iif input conf_path can be handled by self.
Returns: True iif input conf_path can be handled by self. Return type: bool
-
set_conf
(conf_path, conf, logger)[source]¶ Set input conf in input conf_path.
Parameters: - conf_path (str) – conf file to parse and from get parameters.
- conf (Configuration) – conf to write to conf_path.
- logger (Logger) – used to log info/errors
-