{ "info": { "author": "0livd", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6" ], "description": "Python-todict\n#############\n\nPython-todict allows you to easily turn any python object into a dictionary.\nIt can then be easily serialized, to json for example.\nThe class of the object you want to convert needs to inherit from two mixin classes and hold an attribute listing the attributes to export.\nList, dict, tuple and set attributes are supported and any attribute object that implements the mixins are recursively converted.\n\nUsage\n=====\n\n >>> from todict.mixins import ToDictMixin, FromDictMixin\n >>> class MyClass(ToDictMixin, FromDictMixin):\n ... TO_SERIALIZE = [\"my_attr\"]\n ... def __init__(self):\n ... self.my_attr = \"data\"\n ...\n >>> MyClass().to_dict()\n {'my_attr': 'data'}\n >>> restored_obj = MyClass.from_dict({'my_attr': 'test'})\n >>> getattr(restored_obj, \"my_attr\")\n 'test'\n\nInstallation\n============\n\nPython-todict can be installed with pip:\n\n $ pip install todict\n\nLaunch tests\n============\n\n >>> pip install -r requirements-dev.txt\n >>> tox\n\n* **Python**: 2.7, 3.6.\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/0livd/python-todict", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "todict", "package_url": "https://pypi.org/project/todict/", "platform": "", "project_url": "https://pypi.org/project/todict/", "project_urls": { "Homepage": "https://github.com/0livd/python-todict" }, "release_url": "https://pypi.org/project/todict/0.2.4/", "requires_dist": null, "requires_python": "", "summary": "Export python objects as dictionnaries so they can then be easily serializable.", "version": "0.2.4" }, "last_serial": 4347046, "releases": { "0.2.4": [ { "comment_text": "", "digests": { "md5": "708c74f6d2ba65d94030dc5f84e64fd5", "sha256": "eba76958dde393d9cc3caccb613564cd9e81f8db79c3f67f8b43d168d4ad6603" }, "downloads": -1, "filename": "todict-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "708c74f6d2ba65d94030dc5f84e64fd5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3451, "upload_time": "2018-10-06T12:38:11", "url": "https://files.pythonhosted.org/packages/97/6f/f7616c2569a71551fa01bbdf2de791be1b6370b49d7ddf7131069e79d6c9/todict-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb61a8889ed3ff4feb412bd09e7752c0", "sha256": "82976c9f91f0884319107f27f5749116302f6e6e8a4a5f9edf9d9ff1b838535f" }, "downloads": -1, "filename": "todict-0.2.4.tar.gz", "has_sig": false, "md5_digest": "eb61a8889ed3ff4feb412bd09e7752c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2303, "upload_time": "2018-10-06T12:38:12", "url": "https://files.pythonhosted.org/packages/40/54/fa1b2bb35b70746dc69cde99fcf645169a046e7f9d4ef0f4a9b53b923b73/todict-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "708c74f6d2ba65d94030dc5f84e64fd5", "sha256": "eba76958dde393d9cc3caccb613564cd9e81f8db79c3f67f8b43d168d4ad6603" }, "downloads": -1, "filename": "todict-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "708c74f6d2ba65d94030dc5f84e64fd5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3451, "upload_time": "2018-10-06T12:38:11", "url": "https://files.pythonhosted.org/packages/97/6f/f7616c2569a71551fa01bbdf2de791be1b6370b49d7ddf7131069e79d6c9/todict-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb61a8889ed3ff4feb412bd09e7752c0", "sha256": "82976c9f91f0884319107f27f5749116302f6e6e8a4a5f9edf9d9ff1b838535f" }, "downloads": -1, "filename": "todict-0.2.4.tar.gz", "has_sig": false, "md5_digest": "eb61a8889ed3ff4feb412bd09e7752c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2303, "upload_time": "2018-10-06T12:38:12", "url": "https://files.pythonhosted.org/packages/40/54/fa1b2bb35b70746dc69cde99fcf645169a046e7f9d4ef0f4a9b53b923b73/todict-0.2.4.tar.gz" } ] }