Skip to content

Base HERE API

HEREApi

Base class from which all wrappers inherit.

__init__(self, api_key=None, timeout=None) special

Returns a Api instance.

Parameters:

Name Type Description Default
api_key str

API key taken from HERE Developer Portal.

None
timeout int

Timeout limit for requests.

None
Source code in herepy/here_api.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
def __init__(self, api_key: str = None, timeout: int = None):
    """Returns a Api instance.
    Args:
      api_key (str):
        API key taken from HERE Developer Portal.
      timeout (int):
        Timeout limit for requests.
    """

    self.__set_credentials(api_key)
    if timeout:
        self._timeout = timeout
    else:
        self._timeout = 20