pain001.config package
Configuration loading and profile resolution.
pain001.config.manager module
Hierarchical configuration loader for CLI and library usage.
-
class pain001.config.manager.ConfigManager[source]
Bases: object
Load and merge project, user, env, preset, and CLI configuration.
-
discover_project_config() → Path | None[source]
Return the first project config found in the cwd.
-
discover_user_config() → Path | None[source]
Return the default user config path if present.
-
get_profile(profile_name: str) → dict[str, Any][source]
Return a built-in preset or user-defined profile.
-
load_from_file(path: str | Path) → dict[str, Any][source]
Load one config file in YAML, TOML, or INI format.
-
resolve(cli_args: Mapping[str, Any]) → dict[str, Any][source]
Merge defaults, user/project config, env, profile, and CLI args.