Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Azure Event Hubs SDK for Python streaming. Use for high-throughput event ingestion, producers, consumers, and checkpointing.
.claude/skills/azure-eventhub-py/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✓→✓ | = Same ✓ | — | — |
Big data streaming platform for high-throughput event ingestion.
bashpip install azure-eventhub azure-identity # For checkpointing with blob storage pip install azure-eventhub-checkpointstoreblob-aio
bashEVENT_HUB_FULLY_QUALIFIED_NAMESPACE=<namespace>.servicebus.windows.net EVENT_HUB_NAME=my-eventhub STORAGE_ACCOUNT_URL=https://<account>.blob.core.windows.net CHECKPOINT_CONTAINER=checkpoints
pythonfrom azure.identity import DefaultAzureCredential from azure.eventhub import EventHubProducerClient, EventHubConsumerClient credential = DefaultAzureCredential() namespace = "<namespace>.servicebus.windows.net" eventhub_name = "my-eventhub" # Producer producer = EventHubProducerClient( fully_qualified_namespace=namespace, eventhub_name=eventhub_name, credential=credential ) # Consumer consumer = EventHubConsumerClient( fully_qualified_namespace=namespace, eventhub_name=eventhub_name, consumer_group="$Default", credential=credential )
| Client | Purpose | |--------|---------| | EventHubProducerClient | Send events to Event Hub | | EventHubConsumerClient | Receive events from Event Hub | | BlobCheckpointStore | Track consumer progress |
pythonfrom azure.eventhub import EventHubProducerClient, EventData from azure.identity import DefaultAzureCredential producer = EventHubProducerClient( fully_qualified_namespace="<namespace>.servicebus.windows.net", eventhub_name="my-eventhub", credential=DefaultAzureCredential() ) with producer: # Create batch (handles size limits) event_data_batch = producer.create_batch() for i in range(10): try: event_data_batch.add(EventData(f"Event {i}")) except ValueError: # Batch is full, send and create new one producer.send_batch(event_data_batch) event_data_batch = producer.create_batch() event_data_batch.add(EventData(f"Event {i}")) # Send remaining producer.send_batch(event_data_batch)
python# By partition ID event_data_batch = producer.create_batch(partition_id="0") # By partition key (consistent hashing) event_data_batch = producer.create_batch(partition_key="user-123")
pythonfrom azure.eventhub import EventHubConsumerClient def on_event(partition_context, event): print(f"Partition: {partition_context.partition_id}") print(f"Data: {event.body_as_str()}") partition_context.update_checkpoint(event) consumer = EventHubConsumerClient( fully_qualified_namespace="<namespace>.servicebus.windows.net", eventhub_name="my-eventhub", consumer_group="$Default", credential=DefaultAzureCredential() ) with consumer: consumer.receive( on_event=on_event, starting_position="-1", # Beginning of stream )
pythonfrom azure.eventhub import EventHubConsumerClient from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore from azure.identity import DefaultAzureCredential checkpoint_store = BlobCheckpointStore( blob_account_url="https://<account>.blob.core.windows.net", container_name="checkpoints", credential=DefaultAzureCredential() ) consumer = EventHubConsumerClient( fully_qualified_namespace="<namespace>.servicebus.windows.net", eventhub_name="my-eventhub", consumer_group="$Default", credential=DefaultAzureCredential(), checkpoint_store=checkpoint_store ) def on_event(partition_context, event): print(f"Received: {event.body_as_str()}") # Checkpoint after processing partition_context.update_checkpoint(event) with consumer: consumer.receive(on_event=on_event)
pythonfrom azure.eventhub.aio import EventHubProducerClient, EventHubConsumerClient from azure.identity.aio import DefaultAzureCredential import asyncio async def send_events(): credential = DefaultAzureCredential() async with EventHubProducerClient( fully_qualified_namespace="<namespace>.servicebus.windows.net", eventhub_name="my-eventhub", credential=credential ) as producer: batch = await producer.create_batch() batch.add(EventData("Async event")) await producer.send_batch(batch) async def receive_events(): async def on_event(partition_context, event): print(event.body_as_str()) await partition_context.update_checkpoint(event) async with EventHubConsumerClient( fully_qualified_namespace="<namespace>.servicebus.windows.net", eventhub_name="my-eventhub", consumer_group="$Default", credential=DefaultAzureCredential() ) as consumer: await consumer.receive(on_event=on_event) asyncio.run(send_events())
pythonevent = EventData("My event body") # Set properties event.properties = {"custom_property": "value"} event.content_type = "application/json" # Read properties (on receive) print(event.body_as_str()) print(event.sequence_number) print(event.offset) print(event.enqueued_time) print(event.partition_key)
pythonwith producer: info = producer.get_eventhub_properties() print(f"Name: {info['name']}") print(f"Partitions: {info['partition_ids']}") for partition_id in info['partition_ids']: partition_info = producer.get_partition_properties(partition_id) print(f"Partition {partition_id}: {partition_info['last_enqueued_sequence_number']}")
with/async with) for proper cleanup| File | Contents | |------|----------| | references/checkpointing.md | Checkpoint store patterns, blob checkpointing, checkpoint strategies | | references/partitions.md | Partition management, load balancing, starting positions | | scripts/setup_consumer.py | CLI for Event Hub info, consumer setup, and event sending/receiving |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.