visiomode package

Submodules

visiomode.config module

App configuration loader

class visiomode.config.Config(path='/etc/visiomode/config.yaml')

Bases: object

Configuration class for visiomode components.

Defaults to development settings unless initialised with a valid path to a config YAML, or the file specified by DEFAULT_PATH exists.

__init__(path='/etc/visiomode/config.yaml')

Initialises Config with a path to a configuration file.

If a valid configuration file exists, the program assumes it is NOT in debug mode, unless the config file specifies otherwise.

Parameters

path – Path to config YAML, defaults to DEFAULT_PATH. Only used if it exists.

debug = True
flask_key = 'dev'
load(path)

Loads YAML file parameters as class attributes.

Parameters

path – Path to config YAML, assumed to exist.

redis_host = 'localhost'
redis_port = 6379

Module contents