advent22/api/advent22_api/settings.py
2022-10-08 23:36:16 +00:00

24 lines
421 B
Python

from pydantic import BaseSettings
class Settings(BaseSettings):
"""
Per-run settings.
"""
#####
# general settings
#####
production_mode: bool = False
#####
# openapi settings
#####
openapi_url: str = "/openapi.json"
docs_url: str | None = None if production_mode else "/docs"
redoc_url: str | None = None if production_mode else "/redoc"
SETTINGS = Settings()