azure.eventgrid package

Subpackages

Submodules

azure.eventgrid.event_grid_client module

class azure.eventgrid.event_grid_client.EventGridClient(credentials)[source]

EventGrid Client

Variables

config (EventGridClientConfiguration) – Configuration for client.

Parameters

credentials (None) – Subscription credentials which uniquely identify client subscription.

close()

Close the client if keep_alive is True.

publish_events(topic_hostname, events, custom_headers=None, raw=False, **operation_config)[source]

Publishes a batch of events to an Azure Event Grid topic.

Parameters
  • topic_hostname (str) – The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net

  • events (list[EventGridEvent]) – An array of events to be published to Event Grid.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

HttpOperationError

class azure.eventgrid.event_grid_client.EventGridClientConfiguration(credentials)[source]

Configuration for EventGridClient Note that all parameters used to create this instance are saved as instance attributes.

Parameters

credentials (None) – Subscription credentials which uniquely identify client subscription.

add_user_agent(value)

Add value to current user agent with a space.

Parameters

value (str) – value to add to user agent.

load(filepath)

Load configuration from existing file.

Parameters

filepath (str) – Path to existing config file.

Raises

ValueError if supplied config file is invalid.

save(filepath)

Save current configuration to file.

Parameters

filepath (str) – Path to file where settings will be saved.

Raises

ValueError if supplied filepath cannot be written to.

property enable_http_logger
property user_agent

The current user agent value.

azure.eventgrid.version module

Module contents

class azure.eventgrid.EventGridClient(credentials)[source]

EventGrid Client

Variables

config (EventGridClientConfiguration) – Configuration for client.

Parameters

credentials (None) – Subscription credentials which uniquely identify client subscription.

close()

Close the client if keep_alive is True.

publish_events(topic_hostname, events, custom_headers=None, raw=False, **operation_config)[source]

Publishes a batch of events to an Azure Event Grid topic.

Parameters
  • topic_hostname (str) – The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net

  • events (list[EventGridEvent]) – An array of events to be published to Event Grid.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

HttpOperationError