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

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

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.2.0.tar.gz (202.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

here_routing-1.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: here_routing-1.2.0.tar.gz
  • Upload date:
  • Size: 202.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.13

File hashes

Hashes for here_routing-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e2f53456df4204b1ae8613693eb2c71eade8e062767b4b2f4a434658abbecd09
MD5 033b99d464d302796a7ec16fa1c82d5e
BLAKE2b-256 375e5f64732b3639504aa9ad41e19eca1154929349d5cf2241775fa915f73d9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for here_routing-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9aeb20169f74c6a4d96cdcf5399f77b4d9c6650df1fffa95ec411f817c1d6934
MD5 7d85369723532c9aa539f7ef813d0fea
BLAKE2b-256 612b0572ee9cdf7a5c96a1a2627169bc8dfc197cb5bd9665e28a026a4478707a

See more details on using hashes here.

Supported by

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