{ "info": { "author": "cyriac", "author_email": "me@cyriacthomas.com", "bugtrack_url": null, "classifiers": [], "description": ".. raw:: html\n\n \n\nTable of contents\n=================\n\n- `Dobject <#dobject>`__\n\n - `Install <#install>`__\n - `Usage <#usage>`__\n\n- `Access all the dictionary keys like object\n attributes <#access-all-the-dictionary-keys-like-object-attributes>`__\n\n.. raw:: html\n\n \n\nDobject\n=======\n\nEasily convert dicts to objects. Access key values as object attributes.\n\nInstall\n-------\n\n.. code:: shell\n\n pip install dobject\n\nUsage\n-----\n\n.. code:: python\n\n from dobject import DObject\n import datetime\n\n dict_data = {'data': [{'effective_date': datetime.datetime(2017, 3, 2, 0, 0),\n 'new_symbol': 'MOMENT',\n 'old_symbol': '2E'},\n {'effective_date': datetime.datetime(2017, 4, 27, 0, 0),\n 'new_symbol': 'AAAG',\n 'old_symbol': 'AAAGE'},\n {'effective_date': datetime.datetime(2016, 11, 30, 0, 0),\n 'new_symbol': 'PIOI',\n 'old_symbol': 'ACPW'}],\n 'ticker_changes': [{'new_symbol': 'MOMENT', 'old_symbol': '2E'},\n {'new_symbol': 'AAAG', 'old_symbol': 'AAAGE'},\n {'new_symbol': 'PIOI', 'old_symbol': 'ACPW'}]}\n\n obj = DObject(dict_data)\n\n # Access all the dictionary keys like object attributes\n print obj.ticker_changes[0].old_symbol\n\nYou could also access the values like you would with a dictionary.\n\n.. code:: python\n\n print obj['ticker_changes'][0]['old_symbol']\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/cyriac/dobject/archive/v0.1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cyriac/dobject", "keywords": "dobject,dictionary,object", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "dobject", "package_url": "https://pypi.org/project/dobject/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dobject/", "project_urls": { "Download": "https://github.com/cyriac/dobject/archive/v0.1.1.tar.gz", "Homepage": "https://github.com/cyriac/dobject" }, "release_url": "https://pypi.org/project/dobject/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Dictionary to object tools", "version": "0.1.1" }, "last_serial": 2909958, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f28c67c379bf049756e7046b51bc22fc", "sha256": "fca151e6cc156750db73b408fdc162417d6c9d7b080a8304169247f02139f728" }, "downloads": -1, "filename": "dobject-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f28c67c379bf049756e7046b51bc22fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2078, "upload_time": "2017-05-24T05:40:36", "url": "https://files.pythonhosted.org/packages/23/4b/0c7da20163bcb11f94771b0eddd9c7c4a09fdd79b2339534a4f5fb3ef049/dobject-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d5697b7c251746f4a17f3fd1d4f1950e", "sha256": "77c8e4dea0eef1c70257d1ef7f4dfd693028ccf349e4b98822b14a109eddaf92" }, "downloads": -1, "filename": "dobject-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d5697b7c251746f4a17f3fd1d4f1950e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2002, "upload_time": "2017-05-30T16:38:32", "url": "https://files.pythonhosted.org/packages/4c/45/473ed4698e0223d40b75229848b3e5d7d6e8ba42786382111b0c0941fd58/dobject-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5697b7c251746f4a17f3fd1d4f1950e", "sha256": "77c8e4dea0eef1c70257d1ef7f4dfd693028ccf349e4b98822b14a109eddaf92" }, "downloads": -1, "filename": "dobject-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d5697b7c251746f4a17f3fd1d4f1950e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2002, "upload_time": "2017-05-30T16:38:32", "url": "https://files.pythonhosted.org/packages/4c/45/473ed4698e0223d40b75229848b3e5d7d6e8ba42786382111b0c0941fd58/dobject-0.1.1.tar.gz" } ] }