Skip to main content

here_transit

Asynchronous Python client for the HERE Transit V8 API

GitHub Actions PyPi PyPi codecov Downloads

Installation

pip install here_transit

Usage

import asyncio

from here_transit import HERETransitApi, Place, Return

API_KEY = "<YOUR_API_KEY>"


async def main() -> None:
    """Show example how to get location of your tracker."""
    async with HERETransitApi(api_key=API_KEY) as here_transit:
        response = await here_transit.route(
            origin=Place(latitude=50.12778680095556, longitude=8.582081794738771),
            destination=Place(latitude=50.060940891421765, longitude=8.336477279663088),
            return_values=[Return.TRAVEL_SUMMARY],
        )
        print(
            f"Duration is: {response['routes'][0]['sections'][0]['travelSummary']['duration']}"
        )


if __name__ == "__main__":
    asyncio.run(main())

Download files

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

Source Distribution

here_transit-1.2.1.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

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

here_transit-1.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file here_transit-1.2.1.tar.gz.

File metadata

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

File hashes

Hashes for here_transit-1.2.1.tar.gz
Algorithm Hash digest
SHA256 8f72a6c34fc2fc8cc7a505dd16adf11d622800cf4f49b8b673da77ef825289b1
MD5 56b8a401d53f601f2464e50872429c1f
BLAKE2b-256 197ecceaf595dceff218be284323cfd8378ddb62725c27fd227aec7e10c62a4d

See more details on using hashes here.

File details

Details for the file here_transit-1.2.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for here_transit-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97c2ef25064e9e5c25a18f825562a3804bd1be93854ddd67b7566fc899aa178f
MD5 94dee047ec0ddd4aaeff94750f683d46
BLAKE2b-256 9ca9ed0ee56e9543baee9aac28d559b945023e4e31be511226d87bfb6aeb427e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

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