1.16.10

flytekit.extras.webhook.connector

Directory

Classes

Class Description
WebhookConnector WebhookConnector is responsible for handling webhook tasks.

Variables

Property Type Description
DATA_KEY str
HEADERS_KEY str
METHOD_KEY str
SHOW_DATA_KEY str
SHOW_URL_KEY str
TASK_TYPE str
TIMEOUT_SEC str
URL_KEY str

flytekit.extras.webhook.connector.WebhookConnector

WebhookConnector is responsible for handling webhook tasks.

This connector sends HTTP requests based on the task template and inputs provided, and processes the responses to determine the success or failure of the task.

class WebhookConnector(
    client: typing.Optional[httpx.AsyncClient],
)
Parameter Type Description
client typing.Optional[httpx.AsyncClient]

Methods

Method Description
do() This method processes the webhook task and sends an HTTP request.

do()

def do(
    task_template: flytekit.models.task.TaskTemplate,
    output_prefix: str,
    inputs: typing.Optional[flytekit.models.literals.LiteralMap],
    kwargs,
) -> flytekit.extend.backend.base_connector.Resource

This method processes the webhook task and sends an HTTP request.

It uses asyncio to send the request and process the response using the httpx library.

Parameter Type Description
task_template flytekit.models.task.TaskTemplate
output_prefix str
inputs typing.Optional[flytekit.models.literals.LiteralMap]
kwargs **kwargs

Properties

Property Type Description
task_category
task category that the connector supports