{ "info": { "author": "Matthew Tardiff", "author_email": "mattrix@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing" ], "description": "Pollute |Version| |Build| |Coverage| |Health|\n=============================================\n\n|Compatibility| |Implementations| |Format| |Downloads|\n\nA decorator and context manager for temporarily modifying ``os.environ``.\n\n.. code:: python\n\n # as a context manager\n with modified_environ(added={...}, absent=[...]):\n ...\n\n # as a decorator\n @modified_environ(added={...}, absent=[...])\n\n\nInstallation:\n\n.. code:: shell\n\n $ pip install pollute\n\n\n``modified_environ`` modifies ``os.environ`` in-place, ensuring that all\nreferences to it in the code are updated. All changes made by\n``modified_environ`` are reversed when exiting the context or decorator.\n\n\nExample\n-------\n\n.. code:: python\n\n import os\n from pollute import modified_environ\n\n\n assert 'HELLO' not in os.environ\n assert 'PATH' in os.environ\n\n with modified_environ(added={'HELLO': 'WORLD'}, absent=['PATH']):\n assert os.environ['HELLO'] == 'WORLD'\n assert 'PATH' not in os.environ\n\n assert 'HELLO' not in os.environ\n assert 'PATH' in os.environ\n\n\n.. |Build| image:: https://travis-ci.org/themattrix/python-pollute.svg?branch=master\n :target: https://travis-ci.org/themattrix/python-pollute\n.. |Coverage| image:: https://img.shields.io/coveralls/themattrix/python-pollute.svg\n :target: https://coveralls.io/r/themattrix/python-pollute\n.. |Health| image:: https://landscape.io/github/themattrix/python-pollute/master/landscape.svg\n :target: https://landscape.io/github/themattrix/python-pollute/master\n.. |Version| image:: https://pypip.in/version/pollute/badge.svg?text=version\n :target: https://pypi.python.org/pypi/pollute\n.. |Downloads| image:: https://pypip.in/download/pollute/badge.svg\n :target: https://pypi.python.org/pypi/pollute\n.. |Compatibility| image:: https://pypip.in/py_versions/pollute/badge.svg\n :target: https://pypi.python.org/pypi/pollute\n.. |Implementations| image:: https://pypip.in/implementation/pollute/badge.svg\n :target: https://pypi.python.org/pypi/pollute\n.. |Format| image:: https://pypip.in/format/pollute/badge.svg\n :target: https://pypi.python.org/pypi/pollute\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/themattrix/python-pollute", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pollute", "package_url": "https://pypi.org/project/pollute/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pollute/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/themattrix/python-pollute" }, "release_url": "https://pypi.org/project/pollute/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "A decorator and context manager for temporarily modifying os.environ.", "version": "1.0.2" }, "last_serial": 1385683, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7057a205bb5e085311c190a2fbcad991", "sha256": "221973ef4ca9880e212384c50d66ca346c3aebfaa695a44167bf44b6681bc57a" }, "downloads": -1, "filename": "pollute-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7057a205bb5e085311c190a2fbcad991", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 2979, "upload_time": "2015-01-10T00:01:39", "url": "https://files.pythonhosted.org/packages/a3/e9/ac292c4b41192760e693cb5faa78194c3543f65e963ee15366b49fcf796b/pollute-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b3cc6017e189b6e13a57e5dadc45d00", "sha256": "5b558a252ffcd1d29379bca634f76650f874c26dd45b5e3d63a80aaf15de93a7" }, "downloads": -1, "filename": "pollute-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3b3cc6017e189b6e13a57e5dadc45d00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2312, "upload_time": "2015-01-10T00:01:37", "url": "https://files.pythonhosted.org/packages/c6/7c/9567feddc2af999b12512160e84b0befa490becd49c5d538a70a2295ada2/pollute-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2baa3c22d66ae771540e2942001e7fe4", "sha256": "3d127c79173256d917edc0d4eaba04c9840ff8afa6043da42535566596a9b69e" }, "downloads": -1, "filename": "pollute-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2baa3c22d66ae771540e2942001e7fe4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 2983, "upload_time": "2015-01-13T20:40:12", "url": "https://files.pythonhosted.org/packages/a9/49/291a66d6927e55293534c2bf580d23a7146d4f2de64fb149b84613c98cc9/pollute-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5554e7c1db7754e44584b58f918ea0b1", "sha256": "01df95060e1495cdbd126e754260909af871283a64af0726eccc1ba28d2fe6f8" }, "downloads": -1, "filename": "pollute-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5554e7c1db7754e44584b58f918ea0b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2311, "upload_time": "2015-01-13T20:40:09", "url": "https://files.pythonhosted.org/packages/c3/96/a30f06e15168f57b4b9aee9f6cb80193232d648827dc76996094704c08ad/pollute-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "0a1934fbef47252ab4dc52df9205bd57", "sha256": "49e71e92d435bddbee53b30b416be4bf7916ee4b9bedaa94b2c4fbf156daaa57" }, "downloads": -1, "filename": "pollute-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0a1934fbef47252ab4dc52df9205bd57", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 2963, "upload_time": "2015-01-17T03:52:48", "url": "https://files.pythonhosted.org/packages/73/99/b6f564c514cc98aaceab5835be3732fc02d227e3db2d6a50ca14a6b3957c/pollute-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "118850fb77fb4dc9ea5e8b5938b3b2dc", "sha256": "187e39b55ee5ce2bec80a0414bab20194abf2620ef5b17625bb43b33b9f02ceb" }, "downloads": -1, "filename": "pollute-1.0.2.tar.gz", "has_sig": false, "md5_digest": "118850fb77fb4dc9ea5e8b5938b3b2dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2304, "upload_time": "2015-01-17T03:52:47", "url": "https://files.pythonhosted.org/packages/47/67/babf513c255a2c397b3ee7d37a8575991b441cfa61df98453e3995c8c09c/pollute-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0a1934fbef47252ab4dc52df9205bd57", "sha256": "49e71e92d435bddbee53b30b416be4bf7916ee4b9bedaa94b2c4fbf156daaa57" }, "downloads": -1, "filename": "pollute-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0a1934fbef47252ab4dc52df9205bd57", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 2963, "upload_time": "2015-01-17T03:52:48", "url": "https://files.pythonhosted.org/packages/73/99/b6f564c514cc98aaceab5835be3732fc02d227e3db2d6a50ca14a6b3957c/pollute-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "118850fb77fb4dc9ea5e8b5938b3b2dc", "sha256": "187e39b55ee5ce2bec80a0414bab20194abf2620ef5b17625bb43b33b9f02ceb" }, "downloads": -1, "filename": "pollute-1.0.2.tar.gz", "has_sig": false, "md5_digest": "118850fb77fb4dc9ea5e8b5938b3b2dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2304, "upload_time": "2015-01-17T03:52:47", "url": "https://files.pythonhosted.org/packages/47/67/babf513c255a2c397b3ee7d37a8575991b441cfa61df98453e3995c8c09c/pollute-1.0.2.tar.gz" } ] }