{ "info": { "author": "Jeff Ostendorf", "author_email": "jostendorf@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3" ], "description": "# RESTler\n\nStatus: [![Travis Status](https://travis-ci.org/jdost/restler.svg?branch=master)](https://travis-ci.org/jdost/restler)\n\nRESTler is a python library I dreamed up that maps Object+method calls to RESTful\nURL requests. The idea is that you create a base RESTler object for the root of the\nRESTful web application and then use method calls to get sub URLs and then use some\nkeyword attributes to make various requests to the created route, with built in\nresponse handling. This should make it easy to wrap a nice RESTful API into a \nsimple python library.\n\n## Example\n\n``` python\n>> flickr = Restler('http://flickr.com/api')\n>> photos = flickr.photos\n>> photos.__url__\n'http://flickr.com/api/photos/'\n```\n\n## Getting Started\n\nIf you have a RESTful API you want to wrap, just use the `Restler` constructor to\ncreate the base entry point of the application. Then use the resulting object to\naccess the sub-routes of the application. Every attribute maps to a level of the\nURL, so `application.users.asdf` would request from `(application base)/users/asdf/`\n\n## Route Object\n\nThe `Route` object returned from each attribute of the route has a series of\nmethods to help in accessing the current route or child routes. The object itself\nis calleable which maps to a `GET` request on the object. Any other attributes will \nmap to sub URLs of the current URL the `Route` maps to.\n\n## Response Object\n\nAny request made via a `Route` will return a `Response` object. This object will\nencapsulate the basic request with some helpers built in. The main helper is that\nthe object's representation will map to the clearest form of the response data. If\nthis is a JSON string, it will be parsed, if it is an XML document, it will be a\npointer to the XML document, if it is a plaintext string, it will just be a plain\nstring. The headers for the response will be accessible as well via a reserved\nproperty of the response.\n\n### Example\n\n``` python\nworkhammer = Restler('http://workhammer.herokuapp.com')\nlogin = workhammer.login(\"post\", username='admin', password='password')\nif login.code > 300:\n throw \"Login failed\"\n\nplayers = workhammer.player()\nplayer = workhammer.player[players[0].id]()\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://jdost.us/restler/", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "librestler", "package_url": "https://pypi.org/project/librestler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/librestler/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://jdost.us/restler/" }, "release_url": "https://pypi.org/project/librestler/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Object Oriented rest client", "version": "0.2.2" }, "last_serial": 1217846, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "8619ba525f845b2dea975cf8584a5a3a", "sha256": "6ba450bbe7d5ff99e700087c10e3cf14215dafc04c46e4481cb1e1157c9c5e48" }, "downloads": -1, "filename": "librestler-0.2.tar.gz", "has_sig": true, "md5_digest": "8619ba525f845b2dea975cf8584a5a3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6561, "upload_time": "2014-09-09T03:35:14", "url": "https://files.pythonhosted.org/packages/9e/9e/f490955c81ca09b1308aa7dfec557c414147eac6b4d8138f7f6674137197/librestler-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e3e365a74a6ee49a26c680c30491d8b7", "sha256": "af256faa49b9a600addfa0c2f48730051529e06d1f1b9146da1dc6ae8f44eba6" }, "downloads": -1, "filename": "librestler-0.2.1-py2-none-any.whl", "has_sig": true, "md5_digest": "e3e365a74a6ee49a26c680c30491d8b7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10255, "upload_time": "2014-09-09T04:24:00", "url": "https://files.pythonhosted.org/packages/55/82/5602cd2fb80b08c10ebeab792517a0f0eb3c59f26bcbab279307b38e5f75/librestler-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "147e32a7b5229688d9b682f12022c4e6", "sha256": "2d3d6410476d29850ae67ae1ac6801051c1b3e21610a96e74d0e9a7006b888cc" }, "downloads": -1, "filename": "librestler-0.2.1.tar.gz", "has_sig": true, "md5_digest": "147e32a7b5229688d9b682f12022c4e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6632, "upload_time": "2014-09-09T04:23:57", "url": "https://files.pythonhosted.org/packages/1d/69/73fc59b06599dff9cb51f729bf26c886a54aff06fe8e38cd02aab959a601/librestler-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "10604151d9123881650dd92f30ed7e35", "sha256": "ffc2f56080db2ca82e59c1de22b1bea34bbc77364c9fdaee0f0fabbf9eaf4a8b" }, "downloads": -1, "filename": "librestler-0.2.2-py2-none-any.whl", "has_sig": true, "md5_digest": "10604151d9123881650dd92f30ed7e35", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12557, "upload_time": "2014-09-09T04:29:17", "url": "https://files.pythonhosted.org/packages/db/bf/550dd1702d064a0be70f09784a97ffe6b6d9556537c5baf52d72aeb0e6a2/librestler-0.2.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2383d5657d349f88add7b200f1e8ba06", "sha256": "a70ea93100e4ee87538b2a3b28d299b526c04079be90c80689cb68227873d6e4" }, "downloads": -1, "filename": "librestler-0.2.2.tar.gz", "has_sig": true, "md5_digest": "2383d5657d349f88add7b200f1e8ba06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8607, "upload_time": "2014-09-09T04:29:14", "url": "https://files.pythonhosted.org/packages/82/83/2d7a4e963e9dfa4b23e8841cc75c4c7615b668f8b2645544b80d1fb53ec2/librestler-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "10604151d9123881650dd92f30ed7e35", "sha256": "ffc2f56080db2ca82e59c1de22b1bea34bbc77364c9fdaee0f0fabbf9eaf4a8b" }, "downloads": -1, "filename": "librestler-0.2.2-py2-none-any.whl", "has_sig": true, "md5_digest": "10604151d9123881650dd92f30ed7e35", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12557, "upload_time": "2014-09-09T04:29:17", "url": "https://files.pythonhosted.org/packages/db/bf/550dd1702d064a0be70f09784a97ffe6b6d9556537c5baf52d72aeb0e6a2/librestler-0.2.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2383d5657d349f88add7b200f1e8ba06", "sha256": "a70ea93100e4ee87538b2a3b28d299b526c04079be90c80689cb68227873d6e4" }, "downloads": -1, "filename": "librestler-0.2.2.tar.gz", "has_sig": true, "md5_digest": "2383d5657d349f88add7b200f1e8ba06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8607, "upload_time": "2014-09-09T04:29:14", "url": "https://files.pythonhosted.org/packages/82/83/2d7a4e963e9dfa4b23e8841cc75c4c7615b668f8b2645544b80d1fb53ec2/librestler-0.2.2.tar.gz" } ] }