api.siibra_api_config
This module houses the configuration of siibra-api.
This should be the only place where user can influence the configuration of siibra-api.
As siibra-api will attempt to load this module, user can either configure siibra-api with environment variables, or overwrite the this file directly (with docker volume mount, for example).
CELERY_CHANNEL = os.environ.get('SIIBRA_API_CELERY_CHANNEL', f'siibra-api-{__version__}')
module-attribute
CELERY_CHANNEL
GIT_HASH = os.getenv('GIT_HASH', 'unknown-hash')
module-attribute
GIT_HASH
MONITOR_FIRSTLVL_DIR = os.getenv('MONITOR_FIRSTLVL_DIR') or os.getenv('_MONITOR_FIRSTLVL_DIR')
module-attribute
MONITOR_FIRSTLVL_DIR
NAME_SPACE = os.environ.get('SIIBRA_API_NAMESPACE', 'siibraapi')
module-attribute
NAME_SPACE
QUEUE_PREFIX = f'{__version__}.{NAME_SPACE}'
module-attribute
QUEUE_PREFIX
REDIS_HOST = os.getenv('SIIBRA_API_REDIS_HOST') or os.getenv('SIIBRA_REDIS_SERVICE_HOST') or os.getenv('REDIS_SERVICE_HOST') or os.getenv('REDIS_HOST') or 'localhost'
module-attribute
REDIS_HOST
REDIS_PASSWORD = os.getenv('SIIBRA_API_REDIS_PASSWORD')
module-attribute
REDIS_PASSWORD
REDIS_PORT = os.getenv('SIIBRA_API_REDIS_PORT') or os.getenv('SIIBRA_REDIS_SERVICE_PORT') or os.getenv('REDIS_SERVICE_PORT') or os.getenv('REDIS_PORT') or 6379
module-attribute
REDIS_PORT
ROLE = os.environ.get('SIIBRA_API_ROLE', 'all')
module-attribute
ROLE
__version__ = _config_hash and f'c.{_config_hash}' or __version__
module-attribute
siibra api version
CELERY_CONFIG
CELERY_CONFIG