azure.eventgrid.aio package

class azure.eventgrid.aio.EventGridPublisherClient(topic_hostname: str, credential: Union[AzureKeyCredential, EventGridSharedAccessSignatureCredential], **kwargs: Any)[source]

Asynchronous EventGrid Python Publisher Client.

Parameters
async send()[source]

Sends event data to topic hostname specified during client initialization.

Parameters

events (SendType) – A list or an instance of CloudEvent/EventGridEvent/CustomEvent to be sent.

Keyword Arguments

content_type (str) – The type of content to be used to send the events. Has default value “application/json; charset=utf-8” for EventGridEvents, with “cloudevents-batch+json” for CloudEvents

Return type

None

Raises

ValueError, when events do not follow specified SendType.