{ "info": { "author": "Alexandr Mansurov", "author_email": "alex@eghuro.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System", "Topic :: Utilities" ], "description": "============\n@environment\n============\n\n\n.. image:: https://img.shields.io/pypi/v/atenvironment.svg\n :target: https://pypi.python.org/pypi/atenvironment\n\n.. image:: https://img.shields.io/travis/eghuro/atenvironment.svg\n :target: https://travis-ci.org/eghuro/atenvironment\n\n.. image:: https://readthedocs.org/projects/atenvironment/badge/?version=latest\n :target: https://atenvironment.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://pyup.io/repos/github/eghuro/atenvironment/shield.svg\n :target: https://pyup.io/repos/github/eghuro/atenvironment/\n :alt: Updates\n\n\n.. image:: https://codecov.io/gh/eghuro/atenvironment/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/eghuro/atenvironment\n\n\n\nDecorator for convenient loading of environment variables.\n@environment allows you to declare dependencies on environment variables so that it's clear what needs to be set. Also, any error handling is moved away making the code clearer.\n\n\n* Free software: MIT license\n* Documentation: https://atenvironment.readthedocs.io.\n\n\nGetting started\n---------------\nInstall @environment from pip:\n\n pip install atenvironment\n\n\nUsing @environment is as simple as::\n\n from atenvironment import environment\n\n @environment('API_KEY', 'TOKEN')\n def check(a, b, c, key, token):\n # API_KEY is in key\n # TOKEN is in token\n\nThen call the function as::\n\n check(a, b, c)\n\nEnvironment variables are checked and provided to the function as trailing parameters in order of declaration. In case the token is not in environment an ``atenvironment.EnvironMiss`` exception is raised.\nYou can also provide your own error handling function. In addition, some environment variables can be loaded directly into object variable in case instance property is to be initialized.\n\n\nSee the docummentation for more details.\n\n\n=======\nHistory\n=======\n\n0.2.0 (2018-06-24)\n------------------\n\n* on error: optional function to be called if any of the environment tokens in value is not present in environment\n* in self: optional variable name in case instance property is to be initialized\n* package slightly restructured\n\n0.1.0 (2018-06-12)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/eghuro/atenvironment", "keywords": "atenvironment", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "atenvironment", "package_url": "https://pypi.org/project/atenvironment/", "platform": "", "project_url": "https://pypi.org/project/atenvironment/", "project_urls": { "Homepage": "https://github.com/eghuro/atenvironment" }, "release_url": "https://pypi.org/project/atenvironment/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Decorator for convenient loading of environment variables", "version": "0.2.1" }, "last_serial": 5008570, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ed4ea1a6c9a0e5c9fe4dcf7a5b6ebab0", "sha256": "901bf6eecd2cb27b74793dc2ac76ffee09d862bde9dfacc3c775473203e6bbd9" }, "downloads": -1, "filename": "atenvironment-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ed4ea1a6c9a0e5c9fe4dcf7a5b6ebab0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2667, "upload_time": "2018-06-24T02:16:45", "url": "https://files.pythonhosted.org/packages/60/0d/d6477b59e9ed384b127bdaf224545736be970f58ed0aa432a70b9c9dc460/atenvironment-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b5587affbee5759da9c35b8e4016ac5", "sha256": "02814ccfa86aa0d26c4a1829cf8d9176b3230a832cc8b95fa000ac74454b617c" }, "downloads": -1, "filename": "atenvironment-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5b5587affbee5759da9c35b8e4016ac5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8836, "upload_time": "2018-06-12T01:04:39", "url": "https://files.pythonhosted.org/packages/8e/98/2f8480c0c60bd58a22c4da5683ede87cb526e2c2cde837d1dcca1712fc7c/atenvironment-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "20e4b67498762ae469ef1367f2f7dc0a", "sha256": "aefd0835ad63deb83a19ef6fc444e62708ec6364eb0fbf0d0334abb2ac96ef88" }, "downloads": -1, "filename": "atenvironment-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "20e4b67498762ae469ef1367f2f7dc0a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3303, "upload_time": "2018-06-24T12:52:16", "url": "https://files.pythonhosted.org/packages/f1/b1/2f47bed9e22fe85aae09f66e54ca54772facc299254eaf9b7419183f5d87/atenvironment-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7be7fef30e8c2ca5afb94bf285c4501", "sha256": "2390b61c65ad008c94f7f8d91932a390f708a5b80c7be8da74f8b1cdb9ae5663" }, "downloads": -1, "filename": "atenvironment-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e7be7fef30e8c2ca5afb94bf285c4501", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10870, "upload_time": "2018-06-24T12:52:17", "url": "https://files.pythonhosted.org/packages/8e/b9/c58075a8c915224ad14cf7a447b95e60a874f9c49b6a88b01c3a15fc48c1/atenvironment-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "15455ee20becc4c8652a37bb04e03d47", "sha256": "db729dc0266f0a074b8d26c03f46bdb3e88d9070a4e1091f12b2b2fcdc8669bb" }, "downloads": -1, "filename": "atenvironment-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "15455ee20becc4c8652a37bb04e03d47", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4918, "upload_time": "2019-03-31T04:27:45", "url": "https://files.pythonhosted.org/packages/e5/e1/69d8b9ec853f0441c4ca8d79c6dc1343cdb5d8a78d34d14e6742f6386b32/atenvironment-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a12b5961c96235844960638cd7cfdc9f", "sha256": "e5740392550ceff9e8de5aada86da2f6410f5b808445e68bb768ca7fe2adcbfb" }, "downloads": -1, "filename": "atenvironment-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a12b5961c96235844960638cd7cfdc9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10502, "upload_time": "2019-03-31T04:27:46", "url": "https://files.pythonhosted.org/packages/81/ee/c648ac44824516c7964fec6727cb75ef6088dc59059aeaab351efe1e245e/atenvironment-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15455ee20becc4c8652a37bb04e03d47", "sha256": "db729dc0266f0a074b8d26c03f46bdb3e88d9070a4e1091f12b2b2fcdc8669bb" }, "downloads": -1, "filename": "atenvironment-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "15455ee20becc4c8652a37bb04e03d47", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4918, "upload_time": "2019-03-31T04:27:45", "url": "https://files.pythonhosted.org/packages/e5/e1/69d8b9ec853f0441c4ca8d79c6dc1343cdb5d8a78d34d14e6742f6386b32/atenvironment-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a12b5961c96235844960638cd7cfdc9f", "sha256": "e5740392550ceff9e8de5aada86da2f6410f5b808445e68bb768ca7fe2adcbfb" }, "downloads": -1, "filename": "atenvironment-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a12b5961c96235844960638cd7cfdc9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10502, "upload_time": "2019-03-31T04:27:46", "url": "https://files.pythonhosted.org/packages/81/ee/c648ac44824516c7964fec6727cb75ef6088dc59059aeaab351efe1e245e/atenvironment-0.2.1.tar.gz" } ] }