here.platform.api.factory.apifactory module#

This module manages single instance of APIs and Registries.

class here.platform.api.factory.apifactory.API(value)[source]#

Bases: Enum

Enum of APIs carrying information required during API instance creation.

AAA_AUTH = ('aaa_auth_api', 'here.platform.api.aaa_authorization_api', 'AAAAuthorizationApi', None)#
ARTIFACT = ('artifact_api', 'here.platform.api.artifact_api', 'ArtifactApi', None)#
BASE = ('base_api', 'here.platform.api.base_api', 'BaseApi', None)#
DATA_BLOB = ('blob_api', 'here.platform.api.data_blob_api', 'DataBlobApi', 'blob-v1')#
DATA_CONFIG = ('data_config_api', 'here.platform.api.data_config_api', 'DataConfigApi', None)#
DATA_INDEX = ('data_index_api', 'here.platform.api.data_index_api', 'DataIndexApi', 'index-v1')#
DATA_INGEST = ('data_ingest_api', 'here.platform.api.data_ingest_api', 'DataIngestApi', 'ingest-v1')#
DATA_INTERACTIVE = ('data_interactive_api', 'here.platform.api.data_interactive_api', 'DataInteractiveApi', 'interactive-v1')#
DATA_METADATA = ('datametadeta_api', 'here.platform.api.data_metadata_api', 'DataMetadataApi', 'metadata-v1')#
DATA_OBJECT_BLOB = ('data_object_blob_api', 'here.platform.api.data_object_blob_api', 'DataObjectBlobApi', 'blob-v2')#
DATA_PUBLISH = ('data_publish_api', 'here.platform.api.data_publish_api', 'DataPublishApi', 'publish-v2')#
DATA_QUERY = ('data_query_api', 'here.platform.api.data_query_api', 'DataQueryApi', 'query-v1')#
DATA_STATISTICS = ('data_statistics_api', 'here.platform.api.data_statistics_api', 'DataStatisticsApi', 'statistics-v1')#
DATA_STREAM = ('data_stream_api', 'here.platform.api.data_stream_api', 'DataStreamApi', 'stream-v2')#
DATA_VOLATILE_BLOB = ('data_volatile_blob_api', 'here.platform.api.data_volatile_blob_api', 'DataVolatileBlobApi', 'volatile-blob-v1')#
LOOKUP = ('lookup_api', 'here.platform.api.lookup_api', 'LookupApi', None)#
MAP_MATCHING = ('map_matching_api', 'here.platform.api.map_matching_api', 'MapMatchingApi', None)#
SERVICE = ('service_api', 'here.platform.api.service_api', 'ServiceApi', None)#
SERVICE_REGISTRY = ('service_registry_api', 'here.platform.api.service_registry_api', 'ServiceRegistryApi', None)#
class here.platform.api.factory.apifactory.APIFactory(platform_config: ~here.platform.config.platform_config.PlatformConfig, application_config: ~here.platform.config.application_config.ApplicationConfig, auth: ~here.platform.auth.Auth, proxies: ~typing.Dict, local_environment: bool | None = False, lookup_api_registry: ~here.platform.api.registry.lookup_api_registry.LookupApiRegistry | None = <here.platform.api.registry.lookup_api_registry.LookupApiRegistry object>)[source]#

Bases: object

Factory that is exposed to accept request for API creation.

get_api(api: API, catalog_hrn: str | None = None, service_base_url: str | None = None, map_matching_base_url: str | None = None) Any[source]#

Gets API against :param:`api`.

Parameters:
  • api – Name of the API to be fetched.

  • catalog_hrn – (Optional) HRN of the catalog for which API need to be fetched.

  • service_base_url – (Optional) Base URL of the service for whichAPI need to be fetched.

  • map_matching_base_url – Map matching base url

Returns:

API instance against the given :param:`api`.

Raises:

ValueError – If an invalid API value passed.

remove_catalog_apis(catalog_hrn: str) None[source]#

Removes Factory of APIs against :param:`catalog_hrn`.

Parameters:

catalog_hrn – HRN of the catalog.

class here.platform.api.factory.apifactory.ApiData(name, module_name, class_name, api_version_name)#

Bases: tuple

api_version_name#

Alias for field number 3

class_name#

Alias for field number 2

module_name#

Alias for field number 1

name#

Alias for field number 0