{ "info": { "author": "Memo Garcia", "author_email": "root@memogarcia.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: OpenStack", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: POSIX :: BSD :: FreeBSD", "Operating System :: POSIX :: BSD :: NetBSD", "Operating System :: POSIX :: BSD :: OpenBSD", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Env2\n\nos.environ on stereoids\n\nenv2 allows raising errors on missing environment variables without too much bolierplate code. This is very useful when developing microservices that depends on environment variables.\n\n## How it works\n\nWith env2 you can replace this:\n\n```python\nimport os\n\nvar = os.environ.get('key', None)\nif not var:\n raise Exception(f'{key} not found in environment variables')\nreturn var\n```\n\nWith this:\n\n```python\nfrom env2 import env2\n\nvar = env2('key')\n```\n\nenv2 will automatically raise on a missing key, to avoid that:\n\n```python\nfrom env2 import env2\n\nvar = env2('key', raise_error=False)\n```\n\nenv2 allows to set default values as well:\n\n```python\nfrom env2 import env2\n\nvar = env2('key', default='key2')\n```\n\n## License\n\nThis software is under [WTFPL](http://www.wtfpl.net) license", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/memogarcia/env2", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "env2", "package_url": "https://pypi.org/project/env2/", "platform": "", "project_url": "https://pypi.org/project/env2/", "project_urls": { "Homepage": "https://github.com/memogarcia/env2" }, "release_url": "https://pypi.org/project/env2/0.0.0/", "requires_dist": null, "requires_python": "", "summary": "os.environ on steroids", "version": "0.0.0" }, "last_serial": 3323227, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "b95679c006c8a5e806824c39105061ce", "sha256": "34b54bf1636069cbb6266a278226d26d84d1ade736a4c36f4340664394a7ae2f" }, "downloads": -1, "filename": "env2-0.0.0.tar.gz", "has_sig": false, "md5_digest": "b95679c006c8a5e806824c39105061ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2933, "upload_time": "2017-11-10T20:41:58", "url": "https://files.pythonhosted.org/packages/96/22/63b196fbb1cb4dabf408797c550efd59d3c241a04b663052a3ad1c1d11e4/env2-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b95679c006c8a5e806824c39105061ce", "sha256": "34b54bf1636069cbb6266a278226d26d84d1ade736a4c36f4340664394a7ae2f" }, "downloads": -1, "filename": "env2-0.0.0.tar.gz", "has_sig": false, "md5_digest": "b95679c006c8a5e806824c39105061ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2933, "upload_time": "2017-11-10T20:41:58", "url": "https://files.pythonhosted.org/packages/96/22/63b196fbb1cb4dabf408797c550efd59d3c241a04b663052a3ad1c1d11e4/env2-0.0.0.tar.gz" } ] }