address_lookup.clients package
This package contains documentation of all available clients, for different online services.
Submodules
HERE API client
- class address_lookup.clients.here_client.AddressLookupHereClient(here_api_key: str)
Bases:
address_lookup.clients.client.AddressLookupClientClient for the HERE Address Lookup API
- lookup_address(search_query: str, error_on_multiple: bool = False) address_lookup.result.AddressLookupResult
Lookup the address using the HERE API.
- Parameters
search_query (str) – The address to lookup
error_on_multiple (bool, optional) – Whether to raise an exception if multiple results are found. Defaults to False.
- Raises
AddressLookupException – The error that occurred during the lookup.
- Returns
The result of the address lookup.
- Return type
- parse_response(response: dict) address_lookup.result.AddressLookupResult
Parse response returned by the HERE API into a result object.
- Parameters
response (dict) – Response from the HERE API
- Raises
AddressLookupException – The error that occurred during the lookup.
- Returns
The result of the address lookup.
- Return type
Base class for all clients
- class address_lookup.clients.client.AddressLookupClient(api_key: Optional[str] = None)
Bases:
objectBase class for clients for the Address Lookup. If you’re developing your own client, use this as the base class.
- lookup_address(search_query: str) address_lookup.result.AddressLookupResult
Lookup the address using the online service.
- Parameters
search_query (str) – The address to lookup.
- Raises
AddressLookupException – The error that occurred during the lookup.
- Returns
The result of the address lookup.
- Return type
- parse_response(response: dict) address_lookup.result.AddressLookupResult
Parse response returned by the online service into a result object.
- Parameters
response (dict) – Response from the online service.
- Raises
AddressLookupException – The error that occurred during the lookup.
- Returns
The result of the address lookup.
- Return type