Constants¶
import knots_hub.constants
Variables that are constants through the app runtime.
- knots_hub.constants.EXECUTABLE_NAME = 'knots_hub-v0.13.2'¶
Name to give to the packaged executable, without the file extension.
- knots_hub.constants.EXECUTABLE_NAME_REGEX = re.compile('knots_hub-v[\\d.]+')¶
An expression that must match wen a string is a potential EXECUTABLE_NAME
- class knots_hub.constants.Environ¶
Global list of supported environment variables.
- DISABLE_LOCAL_CHECK = 'KNOTSHUB_DISABLE_LOCAL_CHECK'¶
Disable the check verifying if the app is directly launched from the server or locally.
- FORCE_CONSIDER_RUNTIME_LOCAL = 'KNOTSHUB_FORCE_CONSIDER_RUNTIME_LOCAL'¶
Any non-empty value to force ‘is_runtime_from_local_install’ to return True.
Intended for testing purpose only.
- INSTALLER = 'KNOTSHUB_INSTALLER'¶
Expression like ‘version=path’ indicating configuration for installing the hub.
- IS_RESTARTED = 'KNOTSHUB__IS_RESTARTED__'¶
A number indicating the number of time the runtime has been restarted.
For private use only.
- RUNTIME_STORAGE_ROOT = 'KNOTSHUB_RUNTIME_STORAGE_PATH'¶
Filesystem path to a directory that may not exists (but whose parent must).
Intended for testing purpose as knots-hub already provides a sensible default for actual users.
- USER_INSTALL_PATH = 'KNOTSHUB_USER_INSTALL_PATH'¶
Filesystem path to the location on the user system where the hub is installed.
- VENDOR_INSTALLER_CONFIG_PATHS = 'KNOTSHUB_VENDOR_INSTALLER_CONFIG_PATHS'¶
List of filesystem path to existing json files used to specify which external program to install with which version. The list of path is separated by the system path separator character.
- knots_hub.constants.INTERPRETER_PATH: Path = PosixPath('/home/runner/.cache/pypoetry/virtualenvs/knots-hub-rsvubUUj-py3.9/bin/python')¶
Filesystem path to the python interpeter or executable running the current code.
- knots_hub.constants.IS_APP_FROZEN = False¶
Find if the current runtime is a packaged executable.
- class knots_hub.constants.OS¶
Current operating system.
- classmethod is_linux() bool ¶
- classmethod is_mac() bool ¶
- classmethod is_windows() bool ¶
- classmethod name() str ¶
- classmethod raise_unsupported()¶
- knots_hub.constants.SHORTCUT_NAME = 'knots-hub'¶
Name of the shortcut to the last executable, without the file extension.
Changing this could have unplanned consequences.