Skip to content

deep.config

Config values for deep.

Here we have the initial values for the config, there can be set as either static values, environment values or functions.

APP_ROOT = '' module-attribute

App root sets the prefix that can be removed to generate shorter file names. This value is calculated.

LOGGING_CONF = os.getenv('DEEP_LOGGING_CONF', None) module-attribute

The path to the logging config file to use

PLUGINS = [] module-attribute

User definable plugins.

POLL_TIMER = os.getenv('DEEP_POLL_TIMER', 10) module-attribute

The time in seconds to wait between each poll (default: 10)

SERVICE_AUTH_PROVIDER = os.getenv('DEEP_SERVICE_AUTH_PROVIDER', None) module-attribute

The Auth provider to use for the service (default: None)

SERVICE_SECURE = os.getenv('DEEP_SERVICE_SECURE', 'True') module-attribute

Is the service secured, should we connect with TLS or not (default: True)

SERVICE_URL = os.getenv('DEEP_SERVICE_URL', 'deep:43315') module-attribute

The URL for the service to connect to (default: deep:43315)

IN_APP_EXCLUDE()

Get the exclude app packages.

The packages to mark as NOT in app packages. (default: ''). Must be a command (,) seperated list.

Source code in deep/config/__init__.py
def IN_APP_EXCLUDE():
    """
    Get the exclude app packages.

    The packages to mark as NOT in app packages. (default: ''). Must be a command (,) seperated list.
    """
    user_defined = os.getenv('DEEP_IN_APP_EXCLUDE', None)
    if user_defined is None:
        user_defined = []
    else:
        if ',' in user_defined:
            user_defined = user_defined.split(',')
        user_defined = [user_defined]

    prefix = sys.exec_prefix
    user_defined.append(prefix)

    return user_defined

IN_APP_INCLUDE()

Get the included app packages.

The packages to mark as in app packages. (default: ''). Must be a command (,) seperated list.

Source code in deep/config/__init__.py
def IN_APP_INCLUDE():
    """
    Get the included app packages.

    The packages to mark as in app packages. (default: ''). Must be a command (,) seperated list.
    """
    user_defined = os.getenv('DEEP_IN_APP_INCLUDE', None)
    if user_defined is None:
        return []
    if ',' in user_defined:
        return user_defined.split(',')
    return [user_defined]