{ "info": { "author": "Vivan Kumar", "author_email": "vivangkumar@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# uberpy\n\nA python based wrapper for [Uber's public API] (https://developer.uber.com/).\n\nIt provides flexibility to retrieve JSON responses from the API as well as translating them to objects.\n\n## Version History\n\n### 1.0\n\n- Initial release with most API calls except a few mentioned in the To-do section.\n\n## Getting Started\n\n### Dependencies\n\nThis package requires Python 2.5+\n\nEssential requirements-\n\n- [httplib2] (https://github.com/jcgregorio/httplib2)\n- Uber Server Token, Client ID, Secret\n\n### Installation\nTo install by downloading the source:\n\n sudo python setup.py install\n\nAlternatively, using pip:\n\n sudo pip install uberpy\n\n### Authorisation\n\n#### User credentials\n\nCredentials can be obtained from [Uber's API website] (https://developer.uber.com/)\nThis includes a client_id, secret, and server_token.\n\nFor the initial version, only the server_token is required as OAuth 2.0 is currently not implemented.\nFuture versions will, however support OAuth 2.0.\n\n## Documentation\n\nCheck out the latest official [API documentation] (https://developer.uber.com/v1/endpoints/) for a detailed reference.\n\nFirst, import uberipy:\n```python\nfrom uberpy import Uber\n```\n\nCreate a new Uber instance as follows:\n```python\nuber = Uber(client_id, server_token, secret)\n```\n\nThis will give access to the underlying API methods.\n\n### JSON Methods\n\n#### GET /v1/products - get_products(latitude, longitude)\n\nThis method returns a list of all the products that are available in the area based on location coordinates.\n\n**Parameters**\n\n- latitude (float) Represents the latitude component of location.\n- longitude (float) Represents the longitude component of location.\n\n**Usage**\n\n```python\nlatitude = 51.5286416\nlongitude = -0.1015987\n\nuber_products = uber.get_products(latitude, longitude)\n# Do something with it\n```\n\n#### GET /v1/estimates/price - get_price_estimate(start_latitude, start_longitude, end_latitude, end_longitude)\n\nThis method returns an estimate of the fare for a trip between two locations.\n\n**Parameters**\n\n- start_latitude (float) Latitude component of start location.\n- start_longitude (float) Longitude component of start location.\n- end_latitude (float) Latitude component of end location.\n- end_longitude (float) Longitude component of end location.\n\n**Usage**\n\n```python\nstart_latitude = 51.5252162\nstart_longitude = -0.1036919\nend_latitude = 51.5049949\nend_longitude = -0.0103968\n\nfare_estimate = uber.get_fare_estimate(start_latitude, start_longitude, end_latitude, end_longitude)\n# Do something with it\n```\n\n#### GET /v1/estimates/time - get_time_estimate(start_latitude, start_longitude, customer_uuid, product_id)\n\nGet the estimated time of arrival of a Uber product.\n\n**Parameters**\n\n- start_latitude (float) Latitude component.\n- start_longitude (float) Longitude component.\n- customer_uuid (string) *Optional* Unique customer identifier to be used for experience customization.\n- product_id (string) *Optional* Unique identifier representing a specific product for a given latitude & longitude.\n\n**Usage**\n\n```python\nstart_latitude = 51.5252162\nstart_longitude = -0.1036919\n\ntime_estimate = uber.get_time_estimate(start_latitude, start_longitude, customer_uuid=None, product_id=None)\n\n# Do something with it\n```\n\n#### GET /v1/promotions - get_promotions(start_latitude, start_longitude, end_latitude, end_longitude)\n\nReturns the promotions that will be available to a new user based on their location.\n\n**Parameters**\n\n- start_latitude (float) Latitude component of start location.\n- start_longitude (float) Longitude component of start location.\n- end_latitude (float) Latitude component of end location.\n- end_longitude (float) Longitude component of end location.\n\n**Usage**\n\n```python\nstart_latitude = 51.5252162\nstart_longitude = -0.1036919\nend_latitude = 51.5049949\nend_longitude = -0.0103968\n\npromotions = uber.get_promotions(start_latitude, start_longitude, end_latitude, end_longitude)\n# Do something with it\n```\n\n### Tests\n\nTo run the tests, you will have to obtain\n- server_token\n- client_id\n- secret\n \nAdd them to the tests before you run them.\nYou can always comment out the tests you dont want.\n\n### Todo\n\nFunctions to create Uber objects to extend classes and provide flexibility.\n\nCurrently, the library does not include any of the OAuth requiring API calls.\n\nThese include\n- /v1.1/history : This returns data about a user's history\n- GET /v1/me : Returns information about the user who has authorized with the application.\n\n### Contributors\n\n[Vivan] (https://github.com/vivangkumar)\n\n## Licence\n\nThis code is licenced under the [MIT Licence](http://opensource.org/licenses/mit-license.php)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vivangkumar/uberpy", "keywords": "uber api wrapper library", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "uberpy", "package_url": "https://pypi.org/project/uberpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/uberpy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/vivangkumar/uberpy" }, "release_url": "https://pypi.org/project/uberpy/1.0/", "requires_dist": null, "requires_python": null, "summary": "A pure python wrapper for the Uber API.", "version": "1.0" }, "last_serial": 1313693, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "a94478ba4fadcda17f257550468194a7", "sha256": "b00340e44fd59cdc52f509ce4b40f8beca05432e070906ac1c518d28fac867e0" }, "downloads": -1, "filename": "uberpy-1.0.tar.gz", "has_sig": false, "md5_digest": "a94478ba4fadcda17f257550468194a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7583, "upload_time": "2014-11-19T21:54:23", "url": "https://files.pythonhosted.org/packages/c8/52/5002ce906cf79746b910d71181955ddab679f20f90a26332f49203080ed7/uberpy-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a94478ba4fadcda17f257550468194a7", "sha256": "b00340e44fd59cdc52f509ce4b40f8beca05432e070906ac1c518d28fac867e0" }, "downloads": -1, "filename": "uberpy-1.0.tar.gz", "has_sig": false, "md5_digest": "a94478ba4fadcda17f257550468194a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7583, "upload_time": "2014-11-19T21:54:23", "url": "https://files.pythonhosted.org/packages/c8/52/5002ce906cf79746b910d71181955ddab679f20f90a26332f49203080ed7/uberpy-1.0.tar.gz" } ] }