{ "info": { "author": "Prakhar Shrivastava", "author_email": "prakhars1996@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![codecov](https://codecov.io/gh/dev-prakhar/pydapt/branch/master/graph/badge.svg)](https://codecov.io/gh/dev-prakhar/pydapt)\n[![Build Status](https://travis-ci.com/dev-prakhar/pydapt.svg?branch=master)](https://travis-ci.com/dev-prakhar/pydapt)\n[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)\n\n# PyDapt\n\nPyDapt coverts a dictionary into an object.\nIt is similar to the [OpenStruct](https://ruby-doc.org/stdlib-2.5.1/libdoc/ostruct/rdoc/OpenStruct.html) of ruby.\n\n# Installation\n\n```\nPython Version Required >= 3\n```\n```\npip install pydapt\n```\n\n# Usage\n\n### Converting a dictionary to Object\n\n```python\nfrom pydapt.models import PyFlex\n\ndictionary = {\"test\": 1, \"test1\": {\"test2\": 2}}\npyflex = PyFlex(dictionary)\n\nprint(pyflex.test) # 1\nprint(pyflex.test1.test2) # 2\n```\n\n### Converting a dictionary to Object with kwargs\n\n```python\nfrom pydapt.models import PyFlex\n\ndictionary = {\"test\": 1, \"test1\": {\"test2\": 2}}\npyflex = PyFlex(dictionary, test3=3, test4=4)\n\nprint(pyflex.test) # 1\nprint(pyflex.test1.test2) # 2\nprint(pyflex.test3) # 3\nprint(pyflex.test4) # 4\n```\n\n### Deleting an attribute\n\n```python\nfrom pydapt.models import PyFlex\n\ndictionary = {\"test\": 1, \"test1\": {\"test2\": 2}}\npyflex = PyFlex(dictionary)\n\nprint(pyflex.test) # 1\nprint(pyflex.test1.test2) # 2\n\npyflex.drop('test3') # None\npyflex.drop('test') # 1\n\nprint(pyflex.test) # AttributeError: 'PyFlex' object has no attribute 'test'\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dev-prakhar/pydapt", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pydapt", "package_url": "https://pypi.org/project/pydapt/", "platform": "", "project_url": "https://pypi.org/project/pydapt/", "project_urls": { "Homepage": "https://github.com/dev-prakhar/pydapt" }, "release_url": "https://pypi.org/project/pydapt/0.3/", "requires_dist": null, "requires_python": "", "summary": "Ruby's OpenStruct for python", "version": "0.3" }, "last_serial": 5495189, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9d60d0f0afb33647608094f27ecd0485", "sha256": "a595203b1c353a44402eb24c422826ad82f51f7268195a51af173afe938d87f9" }, "downloads": -1, "filename": "pydapt-0.1.tar.gz", "has_sig": false, "md5_digest": "9d60d0f0afb33647608094f27ecd0485", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3468, "upload_time": "2019-07-06T16:55:34", "url": "https://files.pythonhosted.org/packages/e4/b0/fa04435c0cae278383957e1cfbbe4ac8151becd2cf97a75749b1be24fe06/pydapt-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "711c29afa95205f80ca48c0432f8fce4", "sha256": "8ee374f9bc76cc92d4257e074e8e8ea483a90386ca5da478cb1e8a2250bf7db1" }, "downloads": -1, "filename": "pydapt-0.2.tar.gz", "has_sig": false, "md5_digest": "711c29afa95205f80ca48c0432f8fce4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3466, "upload_time": "2019-07-06T16:59:09", "url": "https://files.pythonhosted.org/packages/60/62/e52c8fefb02bbe7a966e8e2d936abef86083c9ff96d307cef8c7230100ca/pydapt-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "4f5acd12def378a56aa8330548314009", "sha256": "29c7b02e9e769001a9361a20a1dba1979da03785b60f18b8edabb1390f8d8f1a" }, "downloads": -1, "filename": "pydapt-0.3.tar.gz", "has_sig": false, "md5_digest": "4f5acd12def378a56aa8330548314009", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3463, "upload_time": "2019-07-06T17:01:42", "url": "https://files.pythonhosted.org/packages/1e/8e/04c69030ee20ade747ee4a819896092070b8338dc9ded2d6a5e53d6fbaec/pydapt-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4f5acd12def378a56aa8330548314009", "sha256": "29c7b02e9e769001a9361a20a1dba1979da03785b60f18b8edabb1390f8d8f1a" }, "downloads": -1, "filename": "pydapt-0.3.tar.gz", "has_sig": false, "md5_digest": "4f5acd12def378a56aa8330548314009", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3463, "upload_time": "2019-07-06T17:01:42", "url": "https://files.pythonhosted.org/packages/1e/8e/04c69030ee20ade747ee4a819896092070b8338dc9ded2d6a5e53d6fbaec/pydapt-0.3.tar.gz" } ] }