semvec/pypi-packages huggingface dataset:
here-routing-api 0.1.1
A client library for accessing here.com's Routing API v8
License: MIT
Requires Python: >=3.6,<4.0
Keywords: OpenAPI,Client,here.com

# here-routing-api Client
A client library for accessing [here.com Routing API v8 ](https://developer.here.com/documentation/routing-api/api-reference-swagger.html). Generated with https://github.com/openapi-generators/openapi-python-client

## Installation
via pip:
```bash
pip install here-routing-api
```
## Usage
After getting an API Key, you're good to go.

Use `AuthenticatedClient`, as all APIs need authentication:

```python
from here_routing_api import AuthenticatedClient

client = AuthenticatedClient(base_url="https://router.hereapi.com/v8", token="SuperSecretToken")
```

Now call your endpoint and use your models:

```python
from here_routing_api.models import MyDataModel
from here_routing_api.api.my_tag import get_my_data_model
from here_routing_api.types import Response

my_data: MyDataModel = get_my_data_model.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
```

Or do the same thing with an async version:

```python
from here_routing_api.models import MyDataModel
from here_routing_api.api.my_tag import get_my_data_model
from here_routing_api.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
```

Things to know:
1. Every path/method combo becomes a Python module with four functions:
    1. `sync`: Blocking request that returns parsed data (if successful) or `None`
    1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
    1. `asyncio`: Like `sync` but the async instead of blocking
    1. `asyncio_detailed`: Like `sync_detailed` by async instead of blocking
     
1. All path/query params, and bodies become method arguments.
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
1. Any endpoint which did not have a tag will be in `here_routing_api.api.default`