Skip to content

Config

Application Config

mountaineer.config.ConfigBase

Bases: BaseSettings

Base class for the running application's configuration. By convention all configuration parameters should be specified here in one payload. You'll often call your subclass ConfigBase.

Users are responsible for instantiating an AppConfig with your desired settings. This instance will be registered into the global space so it's accessible to your controllers. An error will be thrown if you attempt to instantiate more than one AppConfig.

PACKAGE class-attribute instance-attribute

PACKAGE = None

ENVIRONMENT class-attribute instance-attribute

ENVIRONMENT = 'development'

model_config class-attribute instance-attribute

model_config = {'frozen': True}

mountaineer.config.get_config

get_config()

Internal Functions

Used in unit testing or some other scenarios where you need specific control over the configuration that is mounted into the global registry.

mountaineer.config.register_config

register_config(config)

mountaineer.config.unregister_config

unregister_config()

mountaineer.config.get_config

get_config()