opennem.settings package
Submodules
opennem.settings.log module
- exception opennem.settings.log.SettingsNotFound
Bases:
Exception
- opennem.settings.log.load_logging_config(filename: str = 'logging.yml', fail_silent: bool = True) Optional[dict]
opennem.settings.schema module
- class opennem.settings.schema.OpennemSettings(_env_file: Optional[Union[str, PathLike, List[Union[str, PathLike]], Tuple[Union[str, PathLike], ...]]] = '<object object>', _env_file_encoding: Optional[str] = None, _env_nested_delimiter: Optional[str] = None, _secrets_dir: Optional[Union[str, PathLike]] = None, *, env: str = 'development', endpoint: Optional[str] = None, log_level: str = 'DEBUG', requests_cache_path: str = '.requests', precision_default: int = 4, db_debug: bool = False, http_timeout: int = 30, http_retries: int = 5, http_cache_local: bool = False)
Bases:
BaseSettings
OpenNEMSettings Schema
- Parameters
BaseSettings ([type]) – Pydantic base settings
- Raises
Exception – [description]
- Returns
[description]
- Return type
[type]
- class Config
Bases:
object
- fields = {'endpoint': {'env': 'OPENNEM_API_ENDPOINT'}, 'env': {'env': 'OPENNEM_ENV'}, 'log_level': {'env': 'OPENMEM_LOG_LEVEL'}}
- db_debug: bool
- property debug: bool
- endpoint: Optional[str]
- env: str
- http_cache_local: bool
- http_retries: int
- http_timeout: int
- log_level: str
- precision_default: int
- requests_cache_path: str
- classmethod validate_log_level(log_value: str) Optional[str]
opennem.settings.utils module
- opennem.settings.utils.load_env_file(environment: Optional[str]) List[str]
Returns a list of env files to load
Module contents
Settings files - read settings from env
will read in order:
.env
.env.{environment}
system env
pydantic settings