skeydula.server.config.main module¶
Stateless functions and configuration for loading arbitrary configuration.
- skeydula.server.config.main.ENV_VAR_SPECS = (EnvVarSpec(key='NO_DB', type=<class 'bool'>, required=False), EnvVarSpec(key='DB_HOST', type=<class 'str'>, required=False), EnvVarSpec(key='DB_PORT', type=<class 'int'>, required=False), EnvVarSpec(key='DB_USER', type=<class 'str'>, required=False), EnvVarSpec(key='DB_PASSWORD', type=<class 'str'>, required=False), EnvVarSpec(key='DB_NAME', type=<class 'str'>, required=False), EnvVarSpec(key='DB_DIALECT', type=<class 'str'>, required=False), EnvVarSpec(key='DB_DRIVER', type=<class 'str'>, required=False), EnvVarSpec(key='SQLALCHEMY_FUTURE', type=<class 'bool'>, required=False), EnvVarSpec(key='SQLALCHEMY_POOL_PRE_PING', type=<class 'bool'>, required=False), EnvVarSpec(key='SQLALCHEMY_AUTOCOMMIT', type=<class 'bool'>, required=False), EnvVarSpec(key='SQLALCHEMY_AUTOFLUSH', type=<class 'bool'>, required=False), EnvVarSpec(key='DEBUG', type=<class 'bool'>, required=False), EnvVarSpec(key='TESTING', type=<class 'bool'>, required=False))¶
Supported environment variables.
- skeydula.server.config.main.generate_app_config(starlette_config, env_var_specs)¶
Generates a configuration given all inputs.
See the skeydula.server.config.schema module for the classes that determine the schema for the configuration.
This function determines the mapping between environment keys, to the internal application configuration.
- Parameters:
env_config – The unvalidated environment configuration inputs.
starlette_config (Config) –
env_var_specs (tuple[skeydula.server.config.env.EnvVarSpec, ...]) –
- Returns:
The validated configuration for the application.
- Return type:
app_config