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 PyPi 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-0.1.0.tar.gz (6.6 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-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: here_routing-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for here_routing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6bab3ef9ab29248c23b4c8bbb30450d363bbff419b7d81c5e7a34c7c04e47aeb
MD5 157b9e303fde1165e482197f595fbff8
BLAKE2b-256 44d6e94ed0f71a5e38e68be695650a4c80d944b8d8d7bd06aaf6c29c8e636022

See more details on using hashes here.

File details

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

File metadata

  • Download URL: here_routing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for here_routing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39c44eb28cee708883ceb25da2bd733c871a50325309a604d63bc29ecd4c3ef1
MD5 005b2d7c6a4020e4e8530de3ebf90379
BLAKE2b-256 2f2fdcf9b8a34af79699b23659e5527729f5dbd2d9c4dd87e80adcf76e2ea881

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