Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_data-rentgen /data_rentgen /settings /base.py
| # SPDX-FileCopyrightText: 2026-present MTS PJSC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| import os | |
| from pydantic_settings import BaseSettings as PydanticBaseSettings | |
| from pydantic_settings import ( | |
| PydanticBaseSettingsSource, | |
| SettingsConfigDict, | |
| YamlConfigSettingsSource, | |
| ) | |
| class BaseSettings(PydanticBaseSettings): | |
| model_config = SettingsConfigDict( | |
| env_prefix="DATA_RENTGEN__", | |
| env_nested_delimiter="__", | |
| extra="ignore", | |
| ) | |
| def settings_customise_sources( | |
| cls, | |
| settings_cls: type[PydanticBaseSettings], | |
| init_settings: PydanticBaseSettingsSource, | |
| env_settings: PydanticBaseSettingsSource, | |
| dotenv_settings: PydanticBaseSettingsSource, | |
| file_secret_settings: PydanticBaseSettingsSource, | |
| ) -> tuple[PydanticBaseSettingsSource, ...]: | |
| yaml_file_path = os.getenv("DATA_RENTGEN_CONFIG_FILE", "config.yml") | |
| yaml_settings = YamlConfigSettingsSource( | |
| settings_cls, | |
| yaml_file=yaml_file_path, | |
| yaml_file_encoding="utf-8", | |
| ) | |
| return ( | |
| init_settings, | |
| yaml_settings, | |
| env_settings, | |
| dotenv_settings, | |
| file_secret_settings, | |
| ) | |
Xet Storage Details
- Size:
- 1.26 kB
- Xet hash:
- 3d0294be5821718f4f5969c8753a321e41be8cfbb64796af7a085cb22d5aa6de
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.