Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

here-transit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

here-transit

Asynchronous Python client for the HERE Transit V8 API

  • 1.2.1
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc