Skip to main content

Asynchronous Python client for the HERE Routing V8 API

Project description

here_routing

Asynchronous Python client for the HERE Routing V8 API

GitHub Actions PyPi License codecov Downloads

Installation

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

here_routing-1.0.1.tar.gz (76.6 kB view details)

Uploaded Source

Built Distribution

here_routing-1.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file here_routing-1.0.1.tar.gz.

File metadata

  • Download URL: here_routing-1.0.1.tar.gz
  • Upload date:
  • Size: 76.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for here_routing-1.0.1.tar.gz
Algorithm Hash digest
SHA256 49cca91416aa33bf4e4d8ba1d66dc0fdef248ac8b22968fe53edcc2377ccb6d3
MD5 7ae50e383833b64321bfc264a61eb050
BLAKE2b-256 45191c0d5af187a5a4424aa7d215023815f88b0d4e42ef5933565a657b3ffc34

See more details on using hashes here.

File details

Details for the file here_routing-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: here_routing-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for here_routing-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03d144cfd004e938aa2ae70da9e850f17516bd15ce36e7d3544e9da537d7b708
MD5 4ac5e1a0b38013d9f02563702cf2880e
BLAKE2b-256 3950ebe4b61b7ceeb39809e0692ce022627b224f1332ec3edd8851028dcfe0df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page