climate_ref_core.env
#
Environment variable management
get_available_cpu_count()
#
Detect the number of CPU cores available considering cgroup limitations.
Returns:
| Type | Description |
|---|---|
int
|
The number of allocated CPUs or total cpu count if not running in a cgroup-limited environment. |
Source code in packages/climate-ref-core/src/climate_ref_core/env.py
get_env()
#
Get the current environment
Returns:
| Type | Description |
|---|---|
Env
|
The current environment including any environment variables loaded from the .env file and any defaults set by this application. |