Skip to content

Core

elva.core

Definition of library constants.

Functions:

Attributes:

APP_NAME = 'ELVA' module-attribute

Default app name.

CONFIG_NAME = APP_NAME.lower() + '.toml' module-attribute

Default ELVA configuration file name.

FILE_SUFFIX = '.y' module-attribute

Default ELVA data file suffix.

LOG_SUFFIX = '.log' module-attribute

Default log file suffix.

ELVA_APP_DIR_NAME = 'apps' module-attribute

Directory name where app namespace packages are searched for.

ELVA_WIDGET_DIR_NAME = 'widgets' module-attribute

Directory name where widget namespace packages are expected.

get_app_import_path(app)

Get the Python import path for an app.

Parameters:

  • app (str) –

    the app namespace package name.

Returns:

  • str

    the import path of an app namespace package.

Source code in src/elva/core.py
def get_app_import_path(app: str) -> str:
    """
    Get the Python import path for an app.

    Arguments:
        app: the app namespace package name.

    Returns:
        the import path of an app namespace package.
    """
    return f"elva.{ELVA_APP_DIR_NAME}.{app}"