here-transit


Namehere-transit JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttp://github.com/eifinger/here_transit
SummaryAsynchronous Python client for the HERE Transit V8 API
upload_time2022-12-12 14:36:03
maintainer
docs_urlNone
authorKevin Stillhammer
requires_python>=3.8,<4.0
licenseMIT
keywords aiohttp asyncio here here-api routing transit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # here_transit

Asynchronous Python client for the HERE Transit V8 API

[![GitHub Actions](https://github.com/eifinger/here_transit/workflows/CI/badge.svg)](https://github.com/eifinger/here_transit/actions?workflow=CI)
[![PyPi](https://img.shields.io/pypi/v/here_transit.svg)](https://pypi.python.org/pypi/here_transit)
[![PyPi](https://img.shields.io/pypi/l/here_transit.svg)](https://github.com/eifinger/here_transit/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/eifinger/here_transit/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/here_transit)
[![Downloads](https://pepy.tech/badge/here_transit)](https://pepy.tech/project/here_transit)

## Installation

```bash
pip install here_transit
```

## Usage

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


            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/eifinger/here_transit",
    "name": "here-transit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "aiohttp,asyncio,here,here-api,routing,transit",
    "author": "Kevin Stillhammer",
    "author_email": "kevin.stillhammer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/51/67/c15ab7f12129311c69ff352b2575699667de3724bc82e00889ee8adefb77/here_transit-1.2.0.tar.gz",
    "platform": null,
    "description": "# here_transit\n\nAsynchronous Python client for the HERE Transit V8 API\n\n[![GitHub Actions](https://github.com/eifinger/here_transit/workflows/CI/badge.svg)](https://github.com/eifinger/here_transit/actions?workflow=CI)\n[![PyPi](https://img.shields.io/pypi/v/here_transit.svg)](https://pypi.python.org/pypi/here_transit)\n[![PyPi](https://img.shields.io/pypi/l/here_transit.svg)](https://github.com/eifinger/here_transit/blob/master/LICENSE)\n[![codecov](https://codecov.io/gh/eifinger/here_transit/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/here_transit)\n[![Downloads](https://pepy.tech/badge/here_transit)](https://pepy.tech/project/here_transit)\n\n## Installation\n\n```bash\npip install here_transit\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom here_transit import HERETransitApi, Place, Return\n\nAPI_KEY = \"<YOUR_API_KEY>\"\n\n\nasync def main() -> None:\n    \"\"\"Show example how to get location of your tracker.\"\"\"\n    async with HERETransitApi(api_key=API_KEY) as here_transit:\n        response = await here_transit.route(\n            origin=Place(latitude=50.12778680095556, longitude=8.582081794738771),\n            destination=Place(latitude=50.060940891421765, longitude=8.336477279663088),\n            return_values=[Return.TRAVEL_SUMMARY],\n        )\n        print(\n            f\"Duration is: {response['routes'][0]['sections'][0]['travelSummary']['duration']}\"\n        )\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Asynchronous Python client for the HERE Transit V8 API",
    "version": "1.2.0",
    "split_keywords": [
        "aiohttp",
        "asyncio",
        "here",
        "here-api",
        "routing",
        "transit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b897fcf23ede96b92574eec46afafe20",
                "sha256": "f498d86851dddcf8352c25e22717b982a7fda6752ecf19713122e64da5cfb971"
            },
            "downloads": -1,
            "filename": "here_transit-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b897fcf23ede96b92574eec46afafe20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 6971,
            "upload_time": "2022-12-12T14:36:02",
            "upload_time_iso_8601": "2022-12-12T14:36:02.349555Z",
            "url": "https://files.pythonhosted.org/packages/92/87/c89234a1ee6c558f6ccb202fdd3db6391bf8f2c349f591398dda9399f778/here_transit-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "0e3ed6921eb71d19f68cbfd6a427f7d2",
                "sha256": "a8bb9c709d12770720ebb71d8ac9c28c2ab1172da4bc86dcdf50e193da42f805"
            },
            "downloads": -1,
            "filename": "here_transit-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e3ed6921eb71d19f68cbfd6a427f7d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 6634,
            "upload_time": "2022-12-12T14:36:03",
            "upload_time_iso_8601": "2022-12-12T14:36:03.884406Z",
            "url": "https://files.pythonhosted.org/packages/51/67/c15ab7f12129311c69ff352b2575699667de3724bc82e00889ee8adefb77/here_transit-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-12 14:36:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "eifinger",
    "github_project": "here_transit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "here-transit"
}
        
Elapsed time: 0.03317s