The config.py module#
Summary#
Resolved configuration values. |
Raised when an environment variable is set to an invalid value. |
Read and validate every recognized environment variable. |
|
Validate configuration. |
Description#
Centralized environment-variable configuration for PyFluent MPP.
Every FLUIDS_MCP_* variable is read once at startup and validated. validate_config()
is called from each leaf’s CLI entry point so a typo or out-of-range
value fails fast with a clear message instead of silently corrupting
runtime behavior later.
Module detail#
- config.load_config(env: dict[str, str] | None = None) FluidsMCPConfig#
Read and validate every recognized environment variable.
Pass
envto inject a synthetic environment for unit tests. UnknownFLUIDS_MCP_*variables produce a warning string in the returned config (also logged at WARNING level), but do not abort.
- config.validate_config(env: dict[str, str] | None = None) FluidsMCPConfig#
Validate configuration.
Alias of
load_config()that raisesConfigErroron any issue. Call once from each CLI entry point.