Config

Main configuration module.

CONFIG_FILE_DEFINITION: tuple[str, str] = ('command-line-assistant', 'config.toml')

Define the config file path.

class Config(database=<factory>, history=<factory>, backend=<factory>, logging=<factory>)[source]

Class that holds our configuration file representation.

With this class, after being initialized, one can access their fields like:

>>> config = Config()
>>> config.output.enforce_script
database

Match the py:DatabaseSchema class and their fields

Type:

DatabaseSchema

history

Match the py:HistorySchema class and their fields

Type:

HistorySchema

backend

Match the py:BackendSchema class and their fields

Type:

BackendSchema

logging

Match the py:LoggingSchema class and their fields

Type:

LoggingSchema

backend: BackendSchema
database: DatabaseSchema
history: HistorySchema
logging: LoggingSchema
load_config_file()[source]

Load the configuration file from the system.

Return type:

Config

Raises:
Returns:

An instance of the configuration file

Return type:

Config