rubem.configuration.app_settings.AppSettings
- class AppSettings(**data)[source]
-
Bases:
BaseModelThe application settings.
- Parameters:
-
value_ranges – Admissible ranges of the input rasters and the model variables.
i18n – Language settings.
logging – A
logging.config.dictConfigdictionary; empty for the default setup. Read-only on the instance;get_setting()andmodel_dump()hand out plain copies.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
The settings of
default_file(), read once per file.The settings file selected by
PYTHON_ENVIRONMENT, or the packaged one.Return a top-level setting as plain data, or
Nonewhen absent.Load the settings from a JSON file.
Attributes
value_rangesi18nlogging- classmethod default()[source]
-
The settings of
default_file(), read once per file.- Return type:
- classmethod default_file()[source]
-
The settings file selected by
PYTHON_ENVIRONMENT, or the packaged one.- Return type:
-
Path
- get_setting(key)[source]
-
Return a top-level setting as plain data, or
Nonewhen absent.Kept for callers written against the previous dictionary-based settings.
- Return type:
-
Any
- classmethod load(settings_file)[source]
-
Load the settings from a JSON file.
- Raises:
-
FileNotFoundError – If the file does not exist.
- Return type:
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'frozen': True}
-
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].