{ "info": { "author": "Jonathan Lloyd", "author_email": "jonathan@thisisjonathan.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3" ], "description": "envpy\n=====\n\nOverview\n--------\n\nPython library for loading config from environment variables. Suitable\nfor implementing the config requirements of a 12-factor app:\nhttps://12factor.net/config\n\nGetting Started\n---------------\n\nInstallation\n~~~~~~~~~~~~\n\nTo install use pip:\n\n::\n\n $> pip install envpy\n\nRequirements before installation: \n - python3\n - pip3\n\nUsage\n~~~~~\n\n.. code:: python\n\n \"\"\"Basic usage script for envpy\"\"\"\n\n import envpy\n\n CONFIG = envpy.get_config({\n # This will raise an error if it cannot be found in the environment\n # because no default has been set.\n 'SECRET_KEY': envpy.Schema(value_type=str),\n # This has a default value and as such won't raise an error if it cannot\n # be found in the environment. However, the value type is set to 'int'\n # which means that an error will be raised if a value is present in the\n # environment but cannot be parsed as an integer.\n 'NUM_WORKERS': envpy.Schema(value_type=int, default=4),\n })\n\n if __name__ == '__main__':\n print('Secret Key:', config['SECRET_KEY'])\n print('Number of workers:', config['NUM_WORKERS'])\n\nValue Types\n-----------\n\n**str**\n\nNo parsing is applied and the string is returned directly from the\nenvironment.\n\n**int**\n\nThe value will be parsed as an integer. Must match: ^[0-9]+$.\n\n**float**\n\nThe value will be parsed as a float. Must match: ^[0-9]+.[0-9]+$.\n\n**bool**\n\nThe value will be parsed as a boolean. Must be one of the following:\n - \"1\" (True)\n - \"0\" (False)\n - \"true\" (True, case insensitive)\n - \"false\" (False, case insensitive)\n\nDevelopment\n-----------\n\nInstallation\n~~~~~~~~~~~~\n\nThis project makes use of virtual environments to provision your\ndevelopment environment. Once the following requirements have been met\nfurther installation is managed automatically by the Makefile.\n\nRequirements before provisioning:\n - python3\n - pip3\n - virtualenv\n - make\n\nUsage\n~~~~~\n\nThe following commands will create a virtual environment (if not already\npresent) for the application and will install the necessary dependencies\nthere before running the requested command.\n\nRun the package:\n\n::\n\n $> make\n\nRun the unit tests:\n\n::\n\n $> make test\n\nRun the linter:\n\n::\n\n $> make lint\n\nRebuild your virtual environment:\n\n::\n\n $> make rebuild_venv\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/turingincomplete/envpy/archive/v0.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/turingincomplete/envpy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "envpy", "package_url": "https://pypi.org/project/envpy/", "platform": "", "project_url": "https://pypi.org/project/envpy/", "project_urls": { "Download": "https://github.com/turingincomplete/envpy/archive/v0.1.0.tar.gz", "Homepage": "https://github.com/turingincomplete/envpy" }, "release_url": "https://pypi.org/project/envpy/0.1.0/", "requires_dist": null, "requires_python": ">=3", "summary": "Python library for loading config from environment variables.", "version": "0.1.0" }, "last_serial": 4291647, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "9b3cc7614b36d8a749f43b16d222f387", "sha256": "364a4e3c02ad153eda76564c7fc3a7b4441f81340d7ae8f0310b657e9fc6279c" }, "downloads": -1, "filename": "envpy-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9b3cc7614b36d8a749f43b16d222f387", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 5657, "upload_time": "2017-07-23T12:22:24", "url": "https://files.pythonhosted.org/packages/a9/f8/775f6151468897473606d71561be5755e41435bb9d92cf5febd85178010f/envpy-0.0.4-py2.py3-none-any.whl" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "00933b28591a6a0b355061caf953d667", "sha256": "a3aa17f3cf0225ee674a64497905d53e06212fe9ac5bff1a8f343b4cf2c5dbd4" }, "downloads": -1, "filename": "envpy-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "00933b28591a6a0b355061caf953d667", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 5648, "upload_time": "2017-07-23T12:26:49", "url": "https://files.pythonhosted.org/packages/27/e4/73208d404e75bd41c857a1c5ff1954c2d358551ccaad2b62e6286e4cd1dc/envpy-0.0.5-py2.py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "683ec7db7160c040f3281850f44c139b", "sha256": "56b5a1e7aa7352a89becded843b126cf11173cdbb7f09ab5bff228f5a18f0089" }, "downloads": -1, "filename": "envpy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "683ec7db7160c040f3281850f44c139b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 5647, "upload_time": "2017-07-23T12:30:03", "url": "https://files.pythonhosted.org/packages/a0/c0/d519dd6d82309b344d82cfae4b5ee2cac961d0372d149168a432c41ee128/envpy-0.1.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "683ec7db7160c040f3281850f44c139b", "sha256": "56b5a1e7aa7352a89becded843b126cf11173cdbb7f09ab5bff228f5a18f0089" }, "downloads": -1, "filename": "envpy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "683ec7db7160c040f3281850f44c139b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 5647, "upload_time": "2017-07-23T12:30:03", "url": "https://files.pythonhosted.org/packages/a0/c0/d519dd6d82309b344d82cfae4b5ee2cac961d0372d149168a432c41ee128/envpy-0.1.0-py2.py3-none-any.whl" } ] }