{ "info": { "author": "Motoki Naruse", "author_email": "motoki@naru.se", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries" ], "description": "owattr\n######\n\n.. image:: https://travis-ci.org/narusemotoki/owattr.svg?branch=master\n :target: https://travis-ci.org/narusemotoki/owattr\n\nowattr overwrites attributes.\n\nExample\n=======\n\nconfig.py:\n----------\n\n.. code-block:: python\n\n import sys\n\n import owattr\n\n\n REDIS_URL = \"redis://localhost:6379/0\"\n IS_DEV_ENV = True\n\n\n owattr.from_dict(sys.modules[__name__], dict(os.environ))\n\n\nThe :code:`config` module has :code:`REDIS_URL` as attribute. You might want to change the value for your production environment. In this example, if you have defined :code:`REDIS_URL` in environment variables, when you load :code:`config` module, it is overwritten. If you don't define :code:`REDIS_URL`, you can use the original value.\nWhen owattr read the dict, it casts dict value to type of the original value. So in environment variable, everything is str type. In this example, if you have defined :code:`IS_DEV_ENV=False` in environment variable, :code:`IS_DEV_ENV` of :code:`config` has :code:`False` as bool type.\nBooleans are cast as follows:\n\n- :code:`'false'`, :code:`'False'` and :code:`''` are cast to False\n- :code:`'true'` and :code:`'True'` are cast to True\n- anything else raises a :code:`'ValueError'`\n\nIf your object has :code:`__all__`, owattr overwrites only variables which written in :code:`__all__`.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/narusemotoki/owattr", "keywords": "attrs", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "owattr", "package_url": "https://pypi.org/project/owattr/", "platform": "", "project_url": "https://pypi.org/project/owattr/", "project_urls": { "Homepage": "https://github.com/narusemotoki/owattr" }, "release_url": "https://pypi.org/project/owattr/0.10.0/", "requires_dist": null, "requires_python": "", "summary": "owattr overwrites attributes.", "version": "0.10.0" }, "last_serial": 5337213, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "951f746f7ea089a514cfb08b3f4139be", "sha256": "410cc7a30013c3afa5334e96a15400e42ebeaefc5e465907a2ed906fcc9345dd" }, "downloads": -1, "filename": "owattr-0.10.0.tar.gz", "has_sig": false, "md5_digest": "951f746f7ea089a514cfb08b3f4139be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2545, "upload_time": "2019-05-30T13:08:10", "url": "https://files.pythonhosted.org/packages/42/fe/d6cbac5d96e67277d8bc285e1ec36ab251b961ecaea0fa2ce7eee303f728/owattr-0.10.0.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "7527f9e3c70dcd28e8dd4925f9a291f3", "sha256": "adf198c87de481125a8871811b5ef9ca9d9cb6025b71f4381f9e19f98062cd04" }, "downloads": -1, "filename": "owattr-0.9.tar.gz", "has_sig": false, "md5_digest": "7527f9e3c70dcd28e8dd4925f9a291f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2281, "upload_time": "2017-07-17T11:58:08", "url": "https://files.pythonhosted.org/packages/f3/cb/d32b005e1b8da5a75bbf08dd3ef6eed1a01db162be699090d90a4c6d8942/owattr-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "951f746f7ea089a514cfb08b3f4139be", "sha256": "410cc7a30013c3afa5334e96a15400e42ebeaefc5e465907a2ed906fcc9345dd" }, "downloads": -1, "filename": "owattr-0.10.0.tar.gz", "has_sig": false, "md5_digest": "951f746f7ea089a514cfb08b3f4139be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2545, "upload_time": "2019-05-30T13:08:10", "url": "https://files.pythonhosted.org/packages/42/fe/d6cbac5d96e67277d8bc285e1ec36ab251b961ecaea0fa2ce7eee303f728/owattr-0.10.0.tar.gz" } ] }