easyidp.config.get

easyidp.config.get(key: str | None = None) Any

Return current config value(s).

Parameters:

key (str or None, optional) – Config key name. None returns a plain dict snapshot.

Returns:

Value for key, or a dict with all known settings.

Return type:

Any

Raises:

KeyError – If key is not a recognised config key.

Examples

>>> from pathlib import Path
>>> import tempfile
>>> tmp = tempfile.TemporaryDirectory()
>>> cfg = EasyIDPConfig(config_path=Path(tmp.name) / "config.json")
>>> cfg.get("log_level")
'INFO'
>>> sorted(cfg.get())
['data_dir', 'log_level', 'show_banner']
>>> tmp.cleanup()