twtb.config#

File for the main config.

Module Contents#

Classes#

Config

The main config that holds everything in itself.

Attributes#

BASE_DIR[source]#
class Config[source]#

The main config that holds everything in itself.

db: twtb.logic.shared.db.DatabaseConfigSection[source]#
telegram: twtb.logic.telegram.config.TelegramConfigSection[source]#
logging: twtb.logic.shared.logging.LoggingConfigSection[source]#
sentry: twtb.logic.shared.sentry_config.SentryConfigSection[source]#
classmethod _setup() typing_extensions.Self[source]#

Set up the config.

It is just load config from file, also it is rewrite config with merged data.

Returns:

Config instance.

static _handle_env_variables(cfg: omegaconf.dictconfig.DictConfig, *, prefix: str | None = None) None[source]#

Process all values, and redef them with values from env variables.

Parameters:
  • cfgConfig instance.

  • prefix – Prefix for env variable. Example prefix="telegram" and key="token" will look for TELEGRAM_TOKEN.