{ "info": { "author": "James Kelly", "author_email": "pthread1981@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "YAEP - Yet Another Environment Package\n======================================\n\nAs the name says, this package enters the crowded field of \nenvironment related packages. The main goal of this package\nis to provide you with the ability to populate your\nenvironment with a a source (by default reading a .env file)\nand then use a simple function in your configuration files\nto read these values or use defaults.\n\nIt's worth noting that this software is under active\ndevelopment and interfaces will change without warning.\n\nUsage\n-----\n\nUsage is simple. Early in the execution of your project, or\nin a dedicated module for configuration, import `populate_env`\nfrom the yaep package. Running this will populate your\nenvironment with values from your .env file. You can\nalternatively set the env_file argument or the ENV_FILE\nenvironment variable to read from another env file.\n\n from yaev import populate_env\n populate_env()\n\nNow you can setup your configuration. For example, in a\nsettings.py or config.py:\n\n from yaev import env\n DATABASE_URL = env('DATABASE_URL', 'sqlite://:memory:')\n\nThe env function has a few other useful tricks. For example,\nallowing for a default that is \"sticky\" - meaning if it is\nemployed it is set in the environment.\n\n os.getenv('foo') # Returns None\n FOO = env('FOO', 'bar', sticky=True)\n os.getenv('FOO') # Returns 'bar'\n\nAdditionally, you can by default allow for boolean-like values\nto be changed to booleans on the fly.\n\n os.getenv('SOMETHING') # Returns 'True'\n env('SOMETHING') # Returns True\n\nBy default a case-insensitive comparison to 'True' and 'False'\nis done, along with 1 and 0. You can change the available\nvalues by passing in a new boolean map:\n\n env('pony', boolean_map={True: ['True', '1', 'Pony']})\n # Returns True\n\nOn the subject of 1s and 0s - you might consider that if\nyou are intending to get an integer that you will instead\nend up with 'True' or 'False' - you can overcome this by\nsetting convert_booleans to False. Additionally, you can\ncast your return value explicitly by setting the type_class,\nthough note that if convert_booleans is True that will\noverride your type_class. Some examples:\n\n # SOMETHING is set to '1' in the environment\n env('SOMETHING') # Returns True\n env('SOMETHING', convert_booleans=False) # Returns '1'\n env('SOMETHING', convert_booleans=False, type_class=int) # Returns 1\n\nFinally, you can also raise an exception if a value is not\nset in your environment:\n\n env('IMPORTANT', default=yaep.exceptions.UnsetException)\n # Raises yaep.exceptions.UnsetException\n\n\nUsing Other Environment Sources\n-------------------------------\n\nA goal of the project is to be able to override or add to the\ndefault of pulling values in from an env file. Supporting\nalternate sources such as credential servers is the goal.\n\nWork in this area is slated for a future release.\n\n\nA list of versions and changes to the project:\n\n- v0.0.6 - Remove setup_requires dependency on pypandoc.\n- v0.0.5 - Fix install error when installing from sdist (missing README)\n- v0.0.4 - Fix issue with pypandoc usage.\n- v0.0.3 - Fixed issue with boolean defaults, allow for type_class and UnsetExceptions.\n- v0.0.2 - Fixed issue with ConfigParser lowercasing keys.\n- v0.0.1 - Initial commit to GitHub.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jimjkelly/yaep", "keywords": "", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "yaep", "package_url": "https://pypi.org/project/yaep/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yaep/", "project_urls": { "Homepage": "https://github.com/jimjkelly/yaep" }, "release_url": "https://pypi.org/project/yaep/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "YAEP - Yet Another Environment Package", "version": "0.0.6" }, "last_serial": 2064535, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "bb862fb392ea47bf1921337203b1fd21", "sha256": "f99b8de5b769ed2fdfbfbbad90f9c9f032e85291e51fc69a319ebf866d9c4f6e" }, "downloads": -1, "filename": "yaep-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "bb862fb392ea47bf1921337203b1fd21", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6045, "upload_time": "2016-03-25T22:27:09", "url": "https://files.pythonhosted.org/packages/88/fe/26d93f33681e2502c3c4e713a61deadc97d9820a1199054f6db468946a74/yaep-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6db1cd8998c424abe8abd538b981f48", "sha256": "76ffb801a9d9164d60d2187496b8dd8060e779916a87c0b0613e594d57c7c605" }, "downloads": -1, "filename": "yaep-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a6db1cd8998c424abe8abd538b981f48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3395, "upload_time": "2016-03-25T22:27:15", "url": "https://files.pythonhosted.org/packages/f6/cf/8fef1d23ea8db1808f9a7e215fbe6a7b157da2e33aa0d55efae692968590/yaep-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "2e72349ee1357f7a1310cf4af4e4457a", "sha256": "58f8893bffb12cf79d5df96892466e9e4da3cc91924491fca16088fc1dffff94" }, "downloads": -1, "filename": "yaep-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "2e72349ee1357f7a1310cf4af4e4457a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6276, "upload_time": "2016-04-14T20:40:01", "url": "https://files.pythonhosted.org/packages/35/70/08715c29d78c952d8e2e945b0c669e2a4b4f71697005f30d73f0b26dec85/yaep-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c023e58c205dc70c6052d7b4f2e26545", "sha256": "464fee812edab92f62d1d74abc0acb258c50a592ce6eb3a1f46f0799191721f6" }, "downloads": -1, "filename": "yaep-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c023e58c205dc70c6052d7b4f2e26545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3615, "upload_time": "2016-04-14T20:40:26", "url": "https://files.pythonhosted.org/packages/f9/df/4665213209b4f7b2c8eea6aeef4b1805fbfd55e456ea54ab54dc4f4e1663/yaep-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "10e73635cda181997a1e8605104a6ad3", "sha256": "f6cc8d1d790ce096fb93711cdb289d98b60d17cc77495b8eef54068839fa3156" }, "downloads": -1, "filename": "yaep-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "10e73635cda181997a1e8605104a6ad3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6397, "upload_time": "2016-04-14T20:57:14", "url": "https://files.pythonhosted.org/packages/6f/e5/72732ec5b0b51607220ae9f6e27a96244b706f3a5c98631fe1770452dd14/yaep-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d49db590ddc95d74d466c6bd7ae0ad0c", "sha256": "5d3ac79e3283b9371a5b9adad6e54542d7a7626edc5c9e87a8b912eb473ad3a1" }, "downloads": -1, "filename": "yaep-0.0.5.tar.gz", "has_sig": false, "md5_digest": "d49db590ddc95d74d466c6bd7ae0ad0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5742, "upload_time": "2016-04-14T20:57:20", "url": "https://files.pythonhosted.org/packages/c6/96/92d4626fdd8a159449427e1d48820cd09b3a406eed80a11ec62fa78dbfbb/yaep-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "ef7387d284fbb9e2d1f6d48ca9dd42c8", "sha256": "850a912bad519ed97e0fefe26d9607dcbf160c33b2084a8ec8a8f99b68a3a716" }, "downloads": -1, "filename": "yaep-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "ef7387d284fbb9e2d1f6d48ca9dd42c8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6461, "upload_time": "2016-04-14T21:02:43", "url": "https://files.pythonhosted.org/packages/65/59/446e64f61ae8709838e20f60463678378b62ccc6c93eee9343184690d2c7/yaep-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "426ab9600752e48cac411e6d27efb618", "sha256": "a0f26feb095c979a16c03b6d2d140f76cdcd479022546cbaa10583e5338ec73f" }, "downloads": -1, "filename": "yaep-0.0.6.tar.gz", "has_sig": false, "md5_digest": "426ab9600752e48cac411e6d27efb618", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5760, "upload_time": "2016-04-14T21:02:49", "url": "https://files.pythonhosted.org/packages/1d/17/733ea6805142d30b40b670193ffd74c690c5a6026cdca539385096218742/yaep-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef7387d284fbb9e2d1f6d48ca9dd42c8", "sha256": "850a912bad519ed97e0fefe26d9607dcbf160c33b2084a8ec8a8f99b68a3a716" }, "downloads": -1, "filename": "yaep-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "ef7387d284fbb9e2d1f6d48ca9dd42c8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6461, "upload_time": "2016-04-14T21:02:43", "url": "https://files.pythonhosted.org/packages/65/59/446e64f61ae8709838e20f60463678378b62ccc6c93eee9343184690d2c7/yaep-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "426ab9600752e48cac411e6d27efb618", "sha256": "a0f26feb095c979a16c03b6d2d140f76cdcd479022546cbaa10583e5338ec73f" }, "downloads": -1, "filename": "yaep-0.0.6.tar.gz", "has_sig": false, "md5_digest": "426ab9600752e48cac411e6d27efb618", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5760, "upload_time": "2016-04-14T21:02:49", "url": "https://files.pythonhosted.org/packages/1d/17/733ea6805142d30b40b670193ffd74c690c5a6026cdca539385096218742/yaep-0.0.6.tar.gz" } ] }