settings
All configuration via environment.
Take note of the environment variable prefixes required for each
settings class, except AppSettings.
APISettings ¶
Bases: BaseSettings
API specific configuration.
Prefix all environment variables with API_, e.g., API_CACHE_EXPIRATION.
Attributes¶
int
Default cache key expiration in seconds.
int
Max records received for collection routes.
AppSettings ¶
Bases: BaseSettings
Generic application settings. These settings are returned as json by the
healthcheck endpoint, so do not include any sensitive values here, or if
you do ensure to exclude them from serialization in the Config object.
Attributes¶
str
Identity of the CI build of current app instance.
bool
If True runs Starlite in debug mode.
str
"dev", "prod", etc.
str
Stdlib log level names, "DEBUG", "INFO", etc.
str
App name.
DatabaseSettings ¶
Bases: BaseSettings
Configures the database for the application.
Prefix all environment variables with DB_, e.g., DB_URL.
Attributes¶
bool
Enables SQLAlchemy engine logs.
PostgresDsn
URL for database connection.
OpenAPISettings ¶
Bases: BaseSettings
Configures OpenAPI for the application.
Prefix all environment variables with OPENAPI_, e.g., OPENAPI_TITLE.
Attributes¶
str
OpenAPI document title.
str
OpenAPI document version.
str
OpenAPI document contact name.
str
OpenAPI document contact email.