{ "info": { "author": "Jacob Wasserman", "author_email": "jwasserman@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "directions.py\n=============\n\nProvide a common Python API to major routing providers.\nPlease consult the terms of service of each provider before using them.\n- Google - https://developers.google.com/maps/terms\n- Mapquest - Contact for licensed data agreement\n- Mapquest Open - http://developer.mapquest.com/web/info/terms-of-use\n- Mapbox - (Directions API still in preview and subject to change) https://www.mapbox.com/tos/\n- Mapzen - https://github.com/mapzen/routing/wiki/OSRM-Service-Details-and-Terms-of-Use\n\nUsage\n-----\nCreate one of the available routers and call the `route()` method.\n```\n>>> import directions\n>>> mq = directions.Mapquest(key) # You must request a developer key from Mapquest\n>>> routes = mq.route('1 magazine st. cambridge, ma', 'south station boston, ma')\n```\n\nSee the help for `route()` for full documentation:\n```\nroute(locations): points can be\n - a sequence of locations\n - a Shapely LineString\nroute(origin, destination, waypoints=None)\n - origin and destination are a single destination\n - waypoints are the points to be inserted between the\n origin and destination\n\n If waypoints is specified, destination must also be specified\n\nEach location can be:\n - string (will be geocoded by the routing provider. Not all\n providers accept this as input)\n - (longitude, latitude) sequence (tuple, list, numpy array, etc.)\n - Shapely Point with x as longitude, y as latitude\n\nAdditional parameters\n---------------------\nraw : bool, default False\n Return the raw json dict response from the service\n\nReturns\n-------\n list of Route objects\n If raw is True, returns the json dict instead of converting to Route\n objects\n```\n\nExamples\n--------\n```\nmq = directions.Mapquest(key)\nroutes = mq.route('1 magazine st. cambridge, ma',\n 'south station boston, ma')\n\nroutes = mq.route('1 magazine st. cambridge, ma',\n 'south station boston, ma',\n waypoints=['700 commonwealth ave. boston, ma'])\n```\n\nUse the points in a `LineString` as the complete set of waypoints.\n```\nline = LineString(...)\nroutes = mq.route(line)\n```\n\nThe different types of location inputs can be mixed.\n```\nroutes = mq.route(line.coords[0], 'south station boston, ma',\n waypoints=[(-71.103972, 42.349324)])\n```\n\nOther Tools\n-----------\n[geojsonio.py](http://github.com/jwass/geojsonio.py) can be used to quickly display the route on a map. Note that it is against Google's ToS to do this with any of their routes.\n```\nroutes = mq.route(...)\ngeojsonio.display(routes)\n```", "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/jwass/directions.py", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "directions", "package_url": "https://pypi.org/project/directions/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/directions/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jwass/directions.py" }, "release_url": "https://pypi.org/project/directions/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Consistent Python interface to popular directions APIs", "version": "0.0.1" }, "last_serial": 1366117, "releases": { "0.0.1": [] }, "urls": [] }