azure-eventgrid-py

Featured

Azure Event Grid SDK for Python. Use for publishing events, handling CloudEvents, and event-driven architectures.

AI & Automation 40,440 stars 6528 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/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
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category