azure-eventgrid-py

Solid

Azure Event Grid SDK for Python. Use for publishing events, handling CloudEvents, and event-driven architectures. Triggers: "event grid", "EventGridPublisherClient", "CloudEvent", "EventGridEvent", "publish events".

DevOps & Infrastructure 2,541 stars 295 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Azure Event Grid SDK for Python Event routing service for building event-driven applications with pub/sub semantics. ## Installation ```bash pip install azure-eventgrid azure-identity ``` ## Environment Variables ```bash EVENTGRID_TOPIC_ENDPOINT=https://<topic-name>.<region>.eventgrid.azure.net/api/events EVENTGRID_NAMESPACE_ENDPOINT=https://<namespace>.<region>.eventgrid.azure.net ``` ## Authentication ```python from azure.identity import DefaultAzureCredential from azure.eventgrid import EventGridPublisherClient credential = DefaultAzureCredential() endpoint = "https://<topic-name>.<region>.eventgrid.azure.net/api/events" client = EventGridPublisherClient(endpoint, credential) ``` ## Event Types | Format | Class | Use Case | |--------|-------|----------| | Cloud Events 1.0 | `CloudEvent` | Standard, interoperable (recommended) | | Event Grid Schema | `EventGridEvent` | Azure-native format | ## Publish CloudEvents ```python from azure.eventgrid import EventGridPublisherClient, CloudEvent from azure.identity import DefaultAzureCredential client = EventGridPublisherClient(endpoint, DefaultAzureCredential()) # Single event event = CloudEvent( type="MyApp.Events.OrderCreated", source="/myapp/orders", data={"order_id": "12345", "amount": 99.99} ) client.send(event) # Multiple events events = [ CloudEvent( type="MyApp.Events.OrderCreated", source="/myapp/orders", data={"order_id": f"order-{i}"} ) for i in range(10) ...

Details

Author
microsoft
Repository
microsoft/skills
Created
4 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category