azure-eventhub
Microsoft Azure Event Hubs Client Library for Python
What it is and what it does
Azure Event Hubs is a client library for interacting with Azure's managed pub-sub event streaming service. It provides EventHubProducerClient and EventHubConsumerClient classes to emit telemetry, publish application state changes, and consume event streams from Azure Event Hubs. The library handles authentication via connection strings or Azure Active Directory credentials, manages partitioned event delivery, and supports both synchronous and asynchronous APIs.
The package is designed for scenarios where you need to ingest high-volume event data from connected devices or applications, transform it, and stream it to multiple independent consumers or analytics platforms. It abstracts the AMQP protocol and Azure service details, allowing you to focus on event publishing and consumption logic. Thread safety and coroutine safety are not guaranteed, so applications must manage concurrency explicitly.
Use it for:
- Emit application telemetry and diagnostic logs to a centralized Event Hub for business intelligence and monitoring.
- Publish state-change events that loosely coupled systems can observe and react to without direct coupling.
- Consume events from an Event Hub, transform them, and republish to a new stream for downstream consumers.
- Build real-time analytics pipelines by consuming Event Hub streams with analytics providers.
- Collect sensor data from connected devices and route it to storage or processing systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Publishes and consumes events from Azure Event Hubs, a scalable pub-sub service for ingesting and streaming millions of events per second to multiple consumers.
Yes. The package is production-stable, actively maintained, has low install friction, and is the official Azure SDK for Event Hubs. It carries no known vulnerabilities and supports Python 3.9 or later. Install it if you need to publish or consume events from Azure Event Hubs; the only caveat is that thread and coroutine safety are not guaranteed, so your application must manage concurrency carefully.
Install
azure-eventhub on PyPI
pip
pip install azure-eventhubuv
uv add azure-eventhubpoetry
poetry add azure-eventhubInstalling azure-eventhub
Before you install
Low install friction with only two runtime dependencies (azure-core and typing-extensions). Active maintenance with recent commits; production-stable status as part of the official Azure SDK.
Quickstart
pip install azure-eventhub
from azure.eventhub import EventHubProducerClient
client = EventHubProducerClient.from_connection_string(connection_str, eventhub_name=hub_name)
with client:
event_data_batch = client.create_batch()
event_data_batch.add(EventData(body=b"test"))
client.send_batch(event_data_batch)
Requires Python 3.9 or later; requires an Azure subscription and Event Hubs namespace with an Event Hub already created; async API requires aiohttp; AAD authentication requires azure-identity.
Verify before relying
- Whether aiohttp and azure-identity are truly optional or required for specific use patterns.
- Specific throughput or latency characteristics under typical workloads.
- Thread-safety guarantees or recommended patterns for concurrent access.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — azure-core, typing-extensions |
| Maintenance | actively maintained — 288 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,938,646/month — #1,257 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_eventhub-5.15.1-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
azure-eventhub-checkpointstoreblobProvides a checkpoint store implementation for…
permissive · top 15,000 on PyPI
azure-messaging-webpubsubserviceManages WebSocket connections and real-time…
permissive · top 15,000 on PyPI
azure-eventhub-checkpointstoreblob-aioStores checkpoints and partition ownership for…
permissive · top 15,000 on PyPI
azure-eventgridPublishes and consumes events through Azure…
permissive · top 5,000 on PyPI
azure-mgmt-eventhubManages Azure Event Hub resources—namespaces,…
permissive · top 5,000 on PyPI
azure-servicebusAzure Service Bus client library for Python…
unclear · top 1,000 on PyPI
azure-mgmt-notificationhubsManages Azure Notification Hubs…
permissive · top 5,000 on PyPI
azure-storage-queueClient library for interacting with Azure Queue…
permissive · top 1,000 on PyPI
azure-schemaregistryRegisters, retrieves, and manages schemas in…
permissive · top 5,000 on PyPI
acryl-datahub-actionsAcryl-datahub-actions is an event-driven…
permissive · top 15,000 on PyPI