metobs_toolkit.settings_collection.settings.Settings#

class Settings[source]#

Singleton configuration class for metobs_toolkit.

This class stores global settings that are used across multiple functions and methods in the package. Settings stored here affect behavior throughout the toolkit (e.g., timezone handling, label definitions, logging).

Note: Settings specific to a single function or method are NOT stored here. Those are defined as default argument values in the function/method signature.

The class uses the singleton pattern to ensure only one instance exists. Settings are accessed and modified using class methods, so no instantiation is required by the user.

Examples

>>> import metobs_toolkit
>>> # Get current setting
>>> metobs_toolkit.Settings.get("store_tz")
'UTC'
__init__() None[source]#

Initialize settings with defaults (only once).

Methods

__init__()

Initialize settings with defaults (only once).

get(key[, default])

Get a configuration value.

get_info([printout])

Get a formatted string with all current settings.

reset([key])

Reset configuration to defaults.

set(key, value)

Set a configuration value.

to_dict()

Return all settings as a dictionary.

Attributes

cpu_count