http_push

This submodule contains methods related to the HTTP Push type Data Connector.

Methods

dtintegrations.data_connector.HttpPush.from_provider(request, provider, secret)

Decodes the incoming event using a specified provider, first validating the the source- and origin using a signature secretand and the provider-specific request.

Parameters:
  • request (Any) – Unmodified incoming request format of the spcified provider.

  • provider ({"flask", "gcloud", "lambda", "azure"}, str) – Name of the provider used to receive the request.

  • secret (str) – The secret to sign the request at source.

Returns:

payload – An object representing received HTTP Push Data Connector payload.

Return type:

HttpPush

Raises:

ConfigurationError – If any of the input parameters are of invalid type, or the signature secret is expired.

Class

class dtintegrations.data_connector.http_push.HttpPush(headers, body, secret)

Represents the HTTP Push Data Connector at the receiver side.

Variables:
  • event (Event) – An object representing the received event.

  • labels (dict) – Labels from the source device forwarded by the Data Connector.

dtintegrations.data_connector.http_push.HttpPush.get_device_metadata(self)

Fetch source device metadata if it exists.

Returns:

metadata – An object representing the source device metadata. If the event forwarded by the Data Connector does not originate a device, DeviceMetadata returns None.

Return type:

DeviceMetadata, optional