here.platform.api.data_volatile_blob_api module#

This module contains a DataVolatileBlobApi class to perform API operations.

The HERE API reference documentation used in this module can be found here: Volatile Blob API Reference # noqa E501

class here.platform.api.data_volatile_blob_api.DataVolatileBlobApi(base_url: str, platform_config: PlatformConfig, application_config: ApplicationConfig, auth: Auth | None, proxies: dict | None = None)[source]#

Bases: BaseApi

This class provides access to HERE platform Data Volatile Blob APIs.

The volatile-blob service supports the upload and retrieval of volatile data from the storage of a catalog. Each discrete chunk of data is stored as a blob (Binary Large Object). Each blob has its own unique ID (data handle), which is stored as partition metadata. To get a partition’s data, you first use metadata service to retrieve the partition’s metadata (data handle) with the addresses of the relevant blobs. You then use those addresses to pull the data using the volatile-blob service. Unlike the blob service, data handles can be overwritten. Hence the volatile aspect.

check_handle_exists(layer_id: str, data_handle: str, billing_tag: str | None = None) bool[source]#

Check if a volatile blob exists for the requested data handle.

Parameters:
  • layer_id – The ID of the layer that the volatile blob belongs to.

  • data_handle – The data handle identifies a specific volatile blob so that you can get that blob’s contents.

  • billing_tag – A string which is used for grouping billing records.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

delete_volatile_blob(layer_id: str, data_handle: str, billing_tag: str | None = None, strict: bool = False) bool[source]#

Delete a volatile data blob from the underlying storage mechanism (volume).

Parameters:
  • layer_id – The ID of the layer that the volatile data blob belongs to.

  • data_handle – The data handle (ID) represents an identifier for the volatile data blob which contents will be deleted.

  • strict – If the blob doesn’t exist, strict=True will raise a PlatformException while strict=False will not.

  • billing_tag – A string which is used for grouping billing records.

Returns:

True if the blob exists and was deleted, False if it doesn’t exist.

Raises:

PlatformException – If platform responds with an HTTP error.

get_volatile_blob(layer_id: str, data_handle: str, billing_tag: str | None = None, stream: bool = False, chunk_size: int = 102400) bytes | Iterator[bytes][source]#

Retrieve a volatile data blob from storage.

Parameters:
  • layer_id – The ID of the parent layer for this volatile data blob.

  • data_handle – The data handle identifies a specific volatile data blob so that you can get that blob’s contents.

  • billing_tag – A string which is used for grouping billing records.

  • stream – whether to stream data.

  • chunk_size – the size to request each iteration when streaming data.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

put_volatile_blob(layer_id: str, data_handle: str, body: bytes, billing_tag: str | None = None)[source]#

Persist the volatile data blob in the underlying storage mechanism (volume).

Parameters:
  • layer_id – The ID of the layer that the volatile blob belongs to.

  • data_handle – The data handle (ID) represents an identifier for the volatile data blob.

  • body – The data to upload as part of the blob. Size limit: 2 MB

  • billing_tag – A string which is used for grouping billing records.

Raises:

PlatformException – If platform responds with an HTTP error.