fastapi_config_patterns.base_settings

Base FastAPI settings patterns.

Extracted from GridFlow backend/src/config.py

Classes

BaseFastAPISettings

Base settings for FastAPI applications.

Module Contents

class fastapi_config_patterns.base_settings.BaseFastAPISettings

Bases: pydantic_settings.BaseSettings

Base settings for FastAPI applications.

Provides common configuration fields that most FastAPI apps need. Extend this class in your project to add app-specific settings.

Example:
>>> class MyAppSettings(BaseFastAPISettings):
...     app_name: str = "my-app"
...
>>> settings = MyAppSettings()
model_config
debug: bool = False
api_v1_str: str = '/v1'
host: str = '0.0.0.0'
port: int = 8000
allowed_origins: str | List[str]
cors_allow_credentials: bool = False
cors_max_age: int = 600