# here_routing
Asynchronous Python client for the HERE Routing V8 API
[![GitHub Actions](https://github.com/eifinger/here_routing/workflows/CI/badge.svg)](https://github.com/eifinger/here_routing/actions?workflow=CI)
[![PyPi](https://img.shields.io/pypi/v/here_routing.svg)](https://pypi.python.org/pypi/here_routing)
[![PyPi](https://img.shields.io/pypi/l/here_routing.svg)](https://github.com/eifinger/here_routing/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/eifinger/here_routing/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/here_routing)
[![Downloads](https://pepy.tech/badge/here_routing)](https://pepy.tech/project/here_routing)
## Installation
```bash
pip install here_routing
```
## Usage
```python
import asyncio
from here_routing import HERERoutingApi, Place, Return, TransportMode
API_KEY = "<YOUR_API_KEY>"
async def main() -> None:
"""Show example how to get duration of your route."""
async with HERERoutingApi(api_key=API_KEY) as here_routing:
response = await here_routing.route(
transport_mode=TransportMode.CAR,
origin=Place(latitude=50.12778680095556, longitude=8.582081794738771),
destination=Place(latitude=50.060940891421765, longitude=8.336477279663088),
return_values=[Return.SUMMARY],
)
print(
f"Duration is: {response['routes'][0]['sections'][0]['summary']['duration']}"
)
if __name__ == "__main__":
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "http://github.com/eifinger/here_routing",
"name": "here-routing",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "aiohttp,asyncio,here,here-api,routing",
"author": "Kevin Stillhammer",
"author_email": "kevin.stillhammer@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b7/b9/1ab6a5065c29fa396394dfe6e034b23781c8692c5d23412b86ee25b9a425/here_routing-0.2.0.tar.gz",
"platform": null,
"description": "# here_routing\n\nAsynchronous Python client for the HERE Routing V8 API\n\n[![GitHub Actions](https://github.com/eifinger/here_routing/workflows/CI/badge.svg)](https://github.com/eifinger/here_routing/actions?workflow=CI)\n[![PyPi](https://img.shields.io/pypi/v/here_routing.svg)](https://pypi.python.org/pypi/here_routing)\n[![PyPi](https://img.shields.io/pypi/l/here_routing.svg)](https://github.com/eifinger/here_routing/blob/master/LICENSE)\n[![codecov](https://codecov.io/gh/eifinger/here_routing/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/here_routing)\n[![Downloads](https://pepy.tech/badge/here_routing)](https://pepy.tech/project/here_routing)\n\n## Installation\n\n```bash\npip install here_routing\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom here_routing import HERERoutingApi, Place, Return, TransportMode\n\nAPI_KEY = \"<YOUR_API_KEY>\"\n\n\nasync def main() -> None:\n \"\"\"Show example how to get duration of your route.\"\"\"\n async with HERERoutingApi(api_key=API_KEY) as here_routing:\n response = await here_routing.route(\n transport_mode=TransportMode.CAR,\n origin=Place(latitude=50.12778680095556, longitude=8.582081794738771),\n destination=Place(latitude=50.060940891421765, longitude=8.336477279663088),\n return_values=[Return.SUMMARY],\n )\n print(\n f\"Duration is: {response['routes'][0]['sections'][0]['summary']['duration']}\"\n )\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Asynchronous Python client for the HERE Routing V8 API",
"version": "0.2.0",
"split_keywords": [
"aiohttp",
"asyncio",
"here",
"here-api",
"routing"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "13afe2300a77ee3cb9c26facb8a6dcff",
"sha256": "c9b15fd6a3453486853f6dbad4c5d04f9d4f6b53de684705251f546be83f848e"
},
"downloads": -1,
"filename": "here_routing-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "13afe2300a77ee3cb9c26facb8a6dcff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 6871,
"upload_time": "2022-12-12T18:35:16",
"upload_time_iso_8601": "2022-12-12T18:35:16.429431Z",
"url": "https://files.pythonhosted.org/packages/57/04/72d5e637dfebc3758cfaf1b88f529d24abefb1ca9e404da7d83f2d2e7919/here_routing-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "1106720cbea4a652966303aaecc209be",
"sha256": "3764b837857f71a4892ca99f7da92eb8ee04d36ac5571099195a2fe3bd56c39d"
},
"downloads": -1,
"filename": "here_routing-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1106720cbea4a652966303aaecc209be",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 6659,
"upload_time": "2022-12-12T18:35:17",
"upload_time_iso_8601": "2022-12-12T18:35:17.965554Z",
"url": "https://files.pythonhosted.org/packages/b7/b9/1ab6a5065c29fa396394dfe6e034b23781c8692c5d23412b86ee25b9a425/here_routing-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-12 18:35:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "eifinger",
"github_project": "here_routing",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "here-routing"
}