data_access_api.config ====================== .. py:module:: data_access_api.config Attributes ---------- .. autoapisummary:: data_access_api.config._settings Classes ------- .. autoapisummary:: data_access_api.config.Settings Functions --------- .. autoapisummary:: data_access_api.config.get_settings Module Contents --------------- .. py:class:: Settings Bases: :py:obj:`pydantic_settings.BaseSettings` Common settings shared across all environments (development and production). .. py:attribute:: ENV :type: Literal['development', 'production'] :value: 'development' .. py:method:: coerce_empty_env(v: str) -> str :classmethod: Treat empty-string ENV (e.g. from CI environment injection) as 'development'. .. py:attribute:: model_config .. py:attribute:: LOG_LEVEL :type: str :value: 'INFO' .. py:attribute:: COHORT_QUERY_THRESHOLD :type: int :value: 10 .. py:attribute:: CACHE_TTL_DAYS :type: int :value: 60 .. py:attribute:: CACHE_MAX_RESULT_ROWS :type: pydantic.PositiveInt :value: 50000 .. py:attribute:: CACHE_MAX_ENTRIES :type: pydantic.PositiveInt :value: 64 .. py:attribute:: OMOP_DB_SERVICE_NAME :type: str :value: 'omop-db' .. py:attribute:: OMOP_DB_PORT :type: int :value: 5432 .. py:attribute:: DATA_ACCESS_POSTGRES_USER :type: str .. py:attribute:: DATA_ACCESS_POSTGRES_PASSWORD :type: pydantic.SecretStr .. py:attribute:: OMOP_POSTGRES_DB :type: str .. py:attribute:: AES_KEY_BASE64 :type: str .. py:attribute:: TRUST_INTERNAL_SERVICE_KEY_HEADER :type: str :value: 'X-Trust-Internal-Service-Key' .. py:attribute:: TRUST_INTERNAL_SERVICE_KEY :type: str :value: '' .. py:property:: OMOP_DATABASE_URL :type: 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. :rtype: SecretStr .. py:data:: _settings .. py:function:: get_settings() -> Settings Get the application settings. :returns: An instance of the Settings class containing configuration values. :rtype: Settings