{"id":10160,"library":"python-envcfg","title":"Python EnvCFG","description":"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.","status":"abandoned","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/tonyseek/python-envcfg","tags":["environment variables","configuration","settings","yaml"],"install":[{"cmd":"pip install python-envcfg","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"wrong":"from envcfg import env","symbol":"env","correct":"import envcfg"}],"quickstart":{"code":"import os\nfrom envcfg import env\n\n# Simulate setting environment variables for demonstration\nos.environ['DATABASE_URL'] = 'postgres://user:password@host:port/database'\nos.environ['DEBUG'] = 'true'\nos.environ['PORT'] = '8000'\n\nprint(f\"Database URL: {env.DATABASE_URL} (type: {type(env.DATABASE_URL)})\")\nprint(f\"Debug Mode: {env.DEBUG} (type: {type(env.DEBUG)})\") # Auto-converts 'true' to True\nprint(f\"Port Number: {env.PORT} (type: {type(env.PORT)})\") # Auto-converts '8000' to 8000\n\n# Accessing an undefined variable with a default\napp_env = env.APP_ENV('development')\nprint(f\"App Environment: {app_env} (type: {type(app_env)})\")\n\n# Example of retrieving an explicitly string value:\nstring_port = env.PORT('default_string_port') # Ensures string type\nprint(f\"Port as String: {string_port} (type: {type(string_port)})\")","lang":"python","description":"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."},"warnings":[{"fix":"Consider using actively maintained alternatives like `os.getenv`, `python-decouple`, `dynaconf`, or `pydantic-settings` for robust environment variable management.","message":"Project Abandonment: `python-envcfg` has not been updated since 2017 and is no longer actively maintained. This means no new features, bug fixes, or security updates are to be expected.","severity":"gotcha","affected_versions":"0.2.0 and earlier"},{"fix":"Thoroughly test `python-envcfg` in your target Python environment. Be prepared to switch to an alternative if compatibility issues arise.","message":"Potential Python Version Incompatibility: While `0.2.0` listed Python 3 support, it has not been tested or updated for modern Python versions (e.g., 3.9+). Users may encounter unexpected runtime errors or deprecated syntax issues.","severity":"gotcha","affected_versions":"0.2.0"},{"fix":"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.","message":"Implicit Type Conversion Risks: EnvCFG automatically converts environment variable strings to `bool`, `int`, or `float`. This can lead to unexpected values (e.g., '0' becoming `False`, 'false' becoming `False`) if the intended value was a string.","severity":"gotcha","affected_versions":"0.2.0"}],"env_vars":null,"search_vec":"'0.2.0':41 '2017':44 'access':13 'activ':53 'also':30 'appear':48 'attribut':17 'automat':18 'bool':28 'common':22 'configur':33,57 'convert':19 'current':38 'envcfg':2,4,7 'environ':14,55 'file':36 'float':27 'int':26 'load':32 'longer':52 'magic':10 'maintain':54 'modul':11 'project':47 'provid':8 'python':1,3,6,23 'python-envcfg':5 'releas':42 'set':58 'str':25 'support':31 'type':24 'variabl':15,56 'version':39 'yaml':35,59","created_at":"2026-04-17T01:22:40.586589+00:00","updated_at":"2026-04-17T01:22:40.586589+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.2.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/tonyseek/python-envcfg","docs":null,"changelog":null,"pypi":"https://pypi.org/project/python-envcfg/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}