Python EnvCFG (python-envcfg) provides a 'magic module' for accessing environment variables as attributes, automatically converting them to common Python types (str, int, float, bool). It also supports loading configuration from YAML files. The current version is 0.2.0, released in 2017, and the project appears to be no longer actively maintained.
pip install python-envcfgVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to access environment variables using the `env` magic module, including automatic type conversion and providing default values for unset variables. Note that environment variables must be set in `os.environ` before `envcfg` processes them.
Consider using actively maintained alternatives like `os.getenv`, `python-decouple`, `dynaconf`, or `pydantic-settings` for robust environment variable management.
Thoroughly test `python-envcfg` in your target Python environment. Be prepared to switch to an alternative if compatibility issues arise.
Always verify the types of retrieved values. Use the default value mechanism `env.VAR('default_string')` to explicitly retrieve a string or manually convert if necessary.No dependency data recorded yet.