data_access_api.config
Attributes
Classes
Common settings shared across all environments (development and production). |
Functions
|
Get the application settings. |
Module Contents
- class data_access_api.config.Settings
Bases:
pydantic_settings.BaseSettingsCommon settings shared across all environments (development and production).
- ENV: Literal['development', 'production'] = 'development'
- classmethod coerce_empty_env(v: str) str
Treat empty-string ENV (e.g. from CI environment injection) as ‘development’.
- model_config
- LOG_LEVEL: str = 'INFO'
- COHORT_QUERY_THRESHOLD: int = 10
- CACHE_TTL_DAYS: int = 60
- CACHE_MAX_RESULT_ROWS: pydantic.PositiveInt = 50000
- CACHE_MAX_ENTRIES: pydantic.PositiveInt = 64
- OMOP_DB_SERVICE_NAME: str = 'omop-db'
- OMOP_DB_PORT: int = 5432
- DATA_ACCESS_POSTGRES_USER: str
- DATA_ACCESS_POSTGRES_PASSWORD: pydantic.SecretStr
- OMOP_POSTGRES_DB: str
- AES_KEY_BASE64: str
- TRUST_INTERNAL_SERVICE_KEY_HEADER: str = 'X-Trust-Internal-Service-Key'
- TRUST_INTERNAL_SERVICE_KEY: str = ''
- property OMOP_DATABASE_URL: pydantic.SecretStr
Construct the database URL for the OMOP database.
- Returns:
A
postgresql://URL wrapped as a SecretStr to avoid leaking the password in logs or error messages.- Return type:
SecretStr
- data_access_api.config._settings