๐Ÿ“ฆ eifinger / here_routing

Asynchronous Python client for the HERE Routing V8 API

โ˜… 2 stars โ‘‚ 0 forks ๐Ÿ‘ 2 watching โš–๏ธ MIT License
aiohttpasyncioherehere-maps-apiheremapspythonpython3routing
๐Ÿ“ฅ Clone https://github.com/eifinger/here_routing.git
HTTPS git clone https://github.com/eifinger/here_routing.git
SSH git clone git@github.com:eifinger/here_routing.git
CLI gh repo clone eifinger/here_routing
Kevin Stillhammer Kevin Stillhammer fix: install instructions (#87) 773748a 7 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ docs
๐Ÿ“ here_routing
๐Ÿ“ tests
๐Ÿ“„ .codespell
๐Ÿ“„ .gitignore
๐Ÿ“„ .yamllint
๐Ÿ“„ LICENSE
๐Ÿ“„ mypy.ini
๐Ÿ“„ pyproject.toml
๐Ÿ“„ README.md
๐Ÿ“„ uv.lock
๐Ÿ“„ README.md

here_routing

Asynchronous Python client for the HERE Routing V8 API

GitHub Actions PyPi License codecov Downloads

Installation

uv add here_routing

Usage

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())