Skip to content

deep

Main entry for Deep Client.

start(config=None)

Start DEEP.

:param config: a custom config :return: the created Deep instance

Source code in deep/__init__.py
def start(config=None) -> 'Deep':
    """
    Start DEEP.

    :param config: a custom config
    :return: the created Deep instance
    """
    if config is None:
        config = {}

    # we use the app root to shorten file paths for display
    if 'APP_ROOT' not in config:
        # if app root is not set then we use the folder in which the code that called us is in as the app root
        config['APP_ROOT'] = os.getenv("DEEP_APP_ROOT", None) or os.path.dirname(
            os.path.dirname(inspect.stack()[1].filename))

    from deep.config.config_service import ConfigService
    cfg = ConfigService(config)
    logging.init(cfg)

    logging.info("Deep Python Client [%s] (c) 2023 Intergral GmbH", version.__version__)

    deep = Deep(cfg)
    deep.start()
    return deep