{ "info": { "author": "Dan Loewenherz", "author_email": "dan@dlo.me", "bugtrack_url": null, "classifiers": [], "description": "Objectifier\n===========\n\n.. image:: https://secure.travis-ci.org/aurorasoftware/objectifier.png?branch=master\n :target: https://travis-ci.org/aurorasoftware/objectifier\n\nObjectifier is a tool that makes traversing dictionaries, lists, and other\nPython objects a lot easier.\n\nIf you have an bug to report or a feature request, add it to our `issue tracker\n`_.\n\n.. _installation:\n\nInstallation\n------------\n\nObjectifier is on `PyPi`_. You can install it through `pip`_ or easy_install,\nwhichever you prefer. ::\n\n $ pip install objectifier\n\n.. _pip: http://www.pip-installer.org/en/latest/\n.. _PyPi: http://pypi.python.org\n\n.. _configuration:\n\nUsage\n-----\n\nObjectifier takes any Python object--a string, dictionary, list, tuple,\netc--and turns it into an object with some pretty cool properties.\n\nThe best way to explain is through some examples. Let's say you are interacting\nwith the Twitter API and have `a JSON tweet`_ that you'd like to manipulate or\ntraverse.\n\n.. _a JSON tweet: javascript:toggleTweet();\n\n.. raw:: html\n\n \n
\n\n\nAfter parsing the response into a Python dictionary using the ``json``\nmodule, this is how we might display all the user mentions in a list. ::\n\n >>> tweet = json.loads(response.read())\n >>> \", \".join(user['screen_name'] for user in tweet['entities']['user_mentions'])\n\nThis isn't too different than what you'd do with Objectifier. The main\ndifference is that you can access attributes with dot notation. ::\n\n >>> tweet = Objectifier(response.read())\n >>> \", \".join(user.screen_name for user in tweet.entities.user_mentions)\n\nThe ``Objectifier`` class will wrap any Python string, unicode string,\ndictionary, list, or tuple. If the input is a JSON string, Objectifier will\nattempt to parse it before leaving it as text only. This allows you to do\nthings like the above, without having to use ``json.load`` for the response\ndata.\n\nYou can test that an attribute exists (as you could with a dictionary). ::\n\n >>> 'user' in tweet\n True\n\nAnd get the number of items in an object that defines ``__len__``. ::\n\n >>> len(tweet.entities.user_mentions)\n 3\n\nThe above things are nice, but not game changers. Objectifier's real strength\nshines in the Python console. ::\n\n >>> tweet\n \n\nEverything in the object is recursively wrapped with Objectifier, so attributes\nof the original object get all the benefits of pretty display. For example ::\n\n >>> tweet.user\n \n >>> tweet.user.profile_image_url\n u'http://a0.twimg.com/profile_images/1380912173/Screen_shot_2011-06-03_at_7.35.36_PM_normal.png'\n\nIf you're inspecting a list, Objectifier will tell you the number of elements. ::\n\n >>> tweet.entities.user_mentions\n \n\nAnd finally, if you use IPython, pressing tab will give you a nice rundown of\nall the attributes in the object. ::\n\n >>> tweet.\n ...contributors ...id ...in_reply_to_user_id_str ...source\n ...coordinates ...id_str ...objectify_if_needed ...text\n ...created_at ...in_reply_to_screen_name ...place ...truncated\n ...entities ...in_reply_to_status_id ...possibly_sensitive ...user\n ...favorited ...in_reply_to_status_id_str ...retweet_count\n ...geo ...in_reply_to_user_id ...retweeted\n\nThere are probably a lot of other things Objectifier could do too, so if you\nhave an idea, fork the `code `_.\n\nContributing, feedback, and questions\n-------------------------------------\n\n* Github: https://github.com/aurorasoftware/objectifier\n* Email: opensource@aurora.io\n* Twitter: `@aurora_software `_", "description_content_type": null, "docs_url": "https://pythonhosted.org/objectifier/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/elmcitylabs/objectifier", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "objectifier", "package_url": "https://pypi.org/project/objectifier/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/objectifier/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/elmcitylabs/objectifier" }, "release_url": "https://pypi.org/project/objectifier/1.4.0/", "requires_dist": null, "requires_python": null, "summary": "Objectifier makes it easy to inspect and traverse Python objects.", "version": "1.4.0" }, "last_serial": 795645, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0df06c8f06d2a35e05a009afc4624a03", "sha256": "d28a64a17fea02d19067863feadcbc7a6f7c388173dbc5e88ff32e05f427cef8" }, "downloads": -1, "filename": "objectifier-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0df06c8f06d2a35e05a009afc4624a03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1722, "upload_time": "2012-02-26T19:48:01", "url": "https://files.pythonhosted.org/packages/90/2c/cc82ccf7c0ad8f0875920eccc501f3b2d17cb5805379eb9be357327a9bf8/objectifier-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f11ed7e9cf1dd4b38afa306681ddb2af", "sha256": "ecbc29689726ac757d053ddccfdcebf507724f421ec9c115a126ec6f9ba219fe" }, "downloads": -1, "filename": "objectifier-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f11ed7e9cf1dd4b38afa306681ddb2af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1734, "upload_time": "2012-02-26T19:55:21", "url": "https://files.pythonhosted.org/packages/df/97/7dd9009f29ba1a542ec5a2a24adfc7addad7dce17437f4897157db0d15bd/objectifier-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "1c1565dc461a3a8a1df609bd67820bd2", "sha256": "cf5478fbeab80df3b63f842122928f83fa439e69a2b8eb123e34c988d982fec0" }, "downloads": -1, "filename": "objectifier-1.0.2.tar.gz", "has_sig": false, "md5_digest": "1c1565dc461a3a8a1df609bd67820bd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1707, "upload_time": "2012-02-28T07:48:36", "url": "https://files.pythonhosted.org/packages/59/e3/bde5e8293a43335666018d44907ddca084d4702a75770b4bf09f966e42d7/objectifier-1.0.2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "d705c57454c4c2e333676f00bd1da8c1", "sha256": "7efd2565d34340dd02799e01e041652d87b8e5f6641096a856337c72790c04ef" }, "downloads": -1, "filename": "objectifier-1.1.0.tar.gz", "has_sig": false, "md5_digest": "d705c57454c4c2e333676f00bd1da8c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1727, "upload_time": "2012-04-12T17:27:25", "url": "https://files.pythonhosted.org/packages/ee/b1/4809210e4fbd328755b664267337a335ca39afc37bb64926f47097bb28de/objectifier-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "312f3822a9c738a7107550add598e54f", "sha256": "ce7bb4abd9ea4a8536ef63709af1ce261e17a4ec7e1aa624464fef59c5f90493" }, "downloads": -1, "filename": "objectifier-1.1.1.tar.gz", "has_sig": false, "md5_digest": "312f3822a9c738a7107550add598e54f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1776, "upload_time": "2012-04-12T17:52:21", "url": "https://files.pythonhosted.org/packages/b2/ff/cc8d5e11ffa60263f93e4763d87c86496ee3cc82a3addb28d2573b116d04/objectifier-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "4d1bee3eb4b239c1b2774575093d91ad", "sha256": "a03b76326ee74edb0531da4c20769fee797d1aa82390f5012f4a5c452fd0baa9" }, "downloads": -1, "filename": "objectifier-1.1.2.tar.gz", "has_sig": false, "md5_digest": "4d1bee3eb4b239c1b2774575093d91ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1788, "upload_time": "2012-04-12T18:02:32", "url": "https://files.pythonhosted.org/packages/6c/be/6791a16a3a41a474182f1413206057434c6b861b0aabe66b3b7b4973e9d0/objectifier-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "cebe2c413a58d80bf6012e847b777ff6", "sha256": "1a6f19d32317eadc26bdc5327010f0f65473a01ff8ba00c13188e6922a9f6de6" }, "downloads": -1, "filename": "objectifier-1.1.3.tar.gz", "has_sig": true, "md5_digest": "cebe2c413a58d80bf6012e847b777ff6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1954, "upload_time": "2012-04-14T23:39:14", "url": "https://files.pythonhosted.org/packages/85/cd/ad46b16d0279d187af5ce3efe2b639edbbaf0c8783ba10c275b31fc1e3f8/objectifier-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "46b9a6c788901f1919d88f5238406339", "sha256": "3b45ed930de29354d89efdfa742bad87dcfbadb80dd5b70722f97740e4aa746d" }, "downloads": -1, "filename": "objectifier-1.1.4.tar.gz", "has_sig": true, "md5_digest": "46b9a6c788901f1919d88f5238406339", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4310, "upload_time": "2012-04-14T23:41:42", "url": "https://files.pythonhosted.org/packages/59/af/4b80b54ab8ff503a22a17519e13731f9f2896626e93e6e4ecdc57adde032/objectifier-1.1.4.tar.gz" } ], "1.1.5": [ { "comment_text": "", "digests": { "md5": "0c66b7257b0a296a44214d2e8e9c025b", "sha256": "da8b804c1d9b28932dd328e71475139e807ea19b108058aa23c5d4ddb84650ad" }, "downloads": -1, "filename": "objectifier-1.1.5.tar.gz", "has_sig": true, "md5_digest": "0c66b7257b0a296a44214d2e8e9c025b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4286, "upload_time": "2012-04-15T00:25:18", "url": "https://files.pythonhosted.org/packages/7d/b5/4800960ba37687cb8f82ab3c4dac1080bd231d0f61bb2ae56ac8f71a4911/objectifier-1.1.5.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "829be3923149ec1d338bb1d74992b15a", "sha256": "9c387b2807e3ce2d92dc5ddbbfc78dd796cfe0896f2e2223f4019736fc5d0b87" }, "downloads": -1, "filename": "objectifier-1.2.0.tar.gz", "has_sig": true, "md5_digest": "829be3923149ec1d338bb1d74992b15a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4127, "upload_time": "2012-04-15T08:59:19", "url": "https://files.pythonhosted.org/packages/27/54/34e90378fed73074f6209698fcfe8143ff5c587936de9937d7505d8cee7a/objectifier-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "ed507599fa1d32e1b418e7d3e8760a08", "sha256": "44223aa1136a3625a78c24a50004faf26a1e43dcfb5c3b3ceb29318406e3bf61" }, "downloads": -1, "filename": "objectifier-1.2.1.tar.gz", "has_sig": true, "md5_digest": "ed507599fa1d32e1b418e7d3e8760a08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4106, "upload_time": "2012-04-15T09:06:48", "url": "https://files.pythonhosted.org/packages/b2/4a/942a589fa21b2a923efec6c9affa453498ac3f8ce45c5c484ad0d5459b7f/objectifier-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "9f593dbd356443c08cd7e25f614e41ee", "sha256": "13eae86037b6d1ba9292703ab518a24d68d317c966cdb69f4a71c54e446bb577" }, "downloads": -1, "filename": "objectifier-1.2.2.tar.gz", "has_sig": true, "md5_digest": "9f593dbd356443c08cd7e25f614e41ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4895, "upload_time": "2012-04-15T09:12:49", "url": "https://files.pythonhosted.org/packages/cb/8d/14c7d23287321cbe1ce5cdf8a0d04e00e87ffcb3ce691725a154c965a1f2/objectifier-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "68ab275d71df5c3c1335d0f2daaaccda", "sha256": "4e9799fbb608da25d6678ff2f85a7ee4235b84383bd38dac172c0c1232e1f96d" }, "downloads": -1, "filename": "objectifier-1.2.3.tar.gz", "has_sig": true, "md5_digest": "68ab275d71df5c3c1335d0f2daaaccda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4854, "upload_time": "2012-07-26T00:41:52", "url": "https://files.pythonhosted.org/packages/cf/4f/1006bf34cf6e45b035a96d36656ecc303e3831200d061319e638cae20139/objectifier-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "65f0bd213a754accc774f8d79b061ebe", "sha256": "43839f2893f139fe6bf2cf5c8a3d51b269da0cbc51b25c0a60f623c17ebb8303" }, "downloads": -1, "filename": "objectifier-1.2.4.tar.gz", "has_sig": true, "md5_digest": "65f0bd213a754accc774f8d79b061ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4898, "upload_time": "2012-07-26T22:24:49", "url": "https://files.pythonhosted.org/packages/b5/b5/3dabedea94408146a87f0d2227a1f974ba2342fd09650ac3385893285a86/objectifier-1.2.4.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "03ccb45884c6eecb1e9bf0f57a5eb8ab", "sha256": "5b334b19071bac244949989862ab68f8a8ea89b9a81bf0ac9f2bfd848acd4269" }, "downloads": -1, "filename": "objectifier-1.3.0.tar.gz", "has_sig": true, "md5_digest": "03ccb45884c6eecb1e9bf0f57a5eb8ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6270, "upload_time": "2012-09-22T19:09:07", "url": "https://files.pythonhosted.org/packages/73/03/b69152888dc946d92a21d68a66050839cd3d3c8add486356808940730766/objectifier-1.3.0.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "350ed3fc12f384ffa365c54400008f82", "sha256": "350ba18d6523ca60ad06a0abb80a05ce247c5963838bf3dcc9108f4299d2c2c6" }, "downloads": -1, "filename": "objectifier-1.4.0.tar.gz", "has_sig": true, "md5_digest": "350ed3fc12f384ffa365c54400008f82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6386, "upload_time": "2012-11-10T06:54:10", "url": "https://files.pythonhosted.org/packages/3d/1d/78ab16de245d38d905e63f08f35d5006fb8dd9730815d9db320fb6f23fac/objectifier-1.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "350ed3fc12f384ffa365c54400008f82", "sha256": "350ba18d6523ca60ad06a0abb80a05ce247c5963838bf3dcc9108f4299d2c2c6" }, "downloads": -1, "filename": "objectifier-1.4.0.tar.gz", "has_sig": true, "md5_digest": "350ed3fc12f384ffa365c54400008f82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6386, "upload_time": "2012-11-10T06:54:10", "url": "https://files.pythonhosted.org/packages/3d/1d/78ab16de245d38d905e63f08f35d5006fb8dd9730815d9db320fb6f23fac/objectifier-1.4.0.tar.gz" } ] }