metobs_toolkit.settings_collection.settings.Settings.get#

classmethod Settings.get(key: str, default: Any | None = None) Any[source]#

Get a configuration value.

Parameters:
  • key (str) – The configuration key to retrieve. Use dot notation for nested keys (e.g., “label_def.goodrecord.label”).

  • default (Any, optional) – Default value if key is not found. Default is None.

Returns:

The configuration value.

Return type:

Any

Examples

>>> Settings.get("store_tz")
'UTC'
>>> Settings.get("label_def.goodrecord.label")
'ok'
>>> Settings.get("nonexistent_key", "fallback")
'fallback'