azure-eventgrid
Microsoft Azure Event Grid Client Library for Python
What it is and what it does
Azure Event Grid is a Python client library for Azure's managed event routing service. It provides two main client classes: EventGridPublisherClient for sending events to Event Grid topics, and EventGridConsumerClient for receiving, acknowledging, and managing events from Event Grid Namespaces. The library abstracts the HTTP communication and credential handling needed to interact with Azure Event Grid resources, supporting both key-based authentication (AzureKeyCredential) and token-based authentication via Azure AD. It handles two resource tiers: Event Grid Namespaces, which support both pull and push delivery models, and Event Grid Basic, which supports push-only delivery.
The package depends on azure-core for common Azure SDK patterns, isodate for date/time handling, and typing-extensions for runtime type hints. It requires Python 3.10 or later and is maintained as part of the official Azure SDK for Python. The library is production-ready (GA status) and actively maintained, with recent releases and an established repository.
Use it for:
- Send custom events to an Event Grid Basic topic using key-based authentication for simple push-only event distribution.
- Publish events to an Event Grid Namespace topic using Azure AD credentials for enterprise identity-based access control.
- Consume events from an Event Grid Namespace subscription with pull-based delivery for reliable message processing.
- Acknowledge, release, or reject received events to manage subscription state and retry logic in namespace consumers.
- Generate and use SAS credentials for temporary, scoped access to Event Grid resources without sharing account keys.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Publishes and consumes events through Azure Event Grid, a managed event routing service supporting both Event Grid Namespaces (pull and push delivery) and Event Grid Basic (push only).
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT License, and provides low-friction installation with minimal dependencies. It is the official client for Azure Event Grid and is suitable for any Python application that needs to publish or consume events via Azure's managed event routing service. Requires Python 3.10 or later and an Azure subscription with an Event Grid resource.
Install
azure-eventgrid on PyPI
pip
pip install azure-eventgriduv
uv add azure-eventgridpoetry
poetry add azure-eventgridInstalling azure-eventgrid
Before you install
Low install friction with three lightweight runtime dependencies. Active maintenance with a release 16 days ago; the repository is actively developed with recent commits.
License in practice
MIT License permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install azure-eventgrid
from azure.eventgrid import EventGridPublisherClient
from azure.core.credentials import AzureKeyCredential
import os
endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
topic_key = os.environ["EVENTGRID_TOPIC_KEY"]
credential = AzureKeyCredential(topic_key)
client = EventGridPublisherClient(endpoint, credential)
Python 3.10 or later required; an Azure subscription and an Event Grid Namespace or Event Grid Basic resource must exist before instantiating a client.
Verify before relying
- Whether the package supports async variants of publish and consume operations beyond what the description excerpt shows.
- Performance characteristics and throughput limits for high-volume event publishing or consumption scenarios.
- Date/time handling specifics provided by isodate dependency.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — isodate, azure-core, typing-extensions |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,969,310/month — #2,000 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_eventgrid-4.22.1-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
azure-servicebusAzure Service Bus client library for Python…
unclear · top 1,000 on PyPI
azure-eventhubPublishes and consumes events from Azure Event…
unclear · top 5,000 on PyPI
azure-mgmt-eventgridManages Azure Event Grid resources—topics,…
permissive · top 5,000 on PyPI
azure-storage-queueClient library for interacting with Azure Queue…
permissive · top 1,000 on PyPI
azure-storage-blobClient library for uploading, downloading, and…
permissive · top 1,000 on PyPI
azure-messaging-webpubsubserviceManages WebSocket connections and real-time…
permissive · top 15,000 on PyPI
azure-storage-file-shareInteract with Azure File Share storage—create,…
permissive · top 5,000 on PyPI
publish-event-snsPublishes Python dictionaries as JSON messages…
permissive · top 5,000 on PyPI
azure-monitor-events-extensionSends custom events to Azure Application…
permissive · top 15,000 on PyPI
winevtWinevt lets you query and subscribe to Windows…
permissive · top 15,000 on PyPI