Config

Purpose

The config module stores package-wide EasyIDP preferences in a small JSON file. It is the single public entry point for settings such as the demo dataset root, logger level, and startup banner display.

Most users should access it through easyidp.config:

import easyidp as idp

idp.config.set(data_dir="/path/to/easyidp.data")
data_dir = idp.config.get("data_dir")

Settings

data_dir

Root folder for EasyIDP demo datasets.

log_level

Logger level used by EasyIDP, such as "INFO" or "DEBUG".

show_banner

Whether EasyIDP shows the startup banner during import.

Functions

get([key])

Return current config value(s).

set(**kwargs)

Update config values and persist JSON immediately.

reset()

Restore factory defaults and persist JSON immediately.

Advanced API

Most users should only call the module-level get(), set(), and reset() functions above. Internally, easyidp.config creates one module-level configuration object and exposes bound methods from it:

config = EasyIDPConfig()
get = config.get
set = config.set
reset = config.reset

This means idp.config.set(...) is the public shortcut for the singleton configuration object’s set(...) method, not a request for users to instantiate EasyIDPConfig themselves.

The objects below are mainly useful for contributors and advanced users who need to inspect EasyIDP’s platform-specific default locations or test custom configuration paths.

Classes

EasyIDPConfig(config_path, data_dir, ...)

JSON-backed package configuration.

Functions

default_config_path()

Return the default EasyIDP JSON config path.

default_data_dir()

Return the default EasyIDP dataset directory.