Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

benzene-azure

Host Benzene Python handlers on Azure Functions — HTTP, Service Bus, Event Hub, Queue Storage, Blob Storage, Cosmos DB change feed, Timer, and Event Grid triggers — plus Service Bus, Queue Storage, and Event Grid outbound clients. The same handlers, no rewrite. Depends on benzene-core and benzene-http.

pip install benzene-azure          # add [servicebus,storage,eventgrid] for the real outbound clients
from benzene.azure import AzureFunctionsApp

app = AzureFunctionsApp(http_router=router, registry=registry)
# main.py adapts azure.functions request/response types to app.handle_http(...),
# app.handle_service_bus(msg), app.handle_event_hub(events), app.handle_queue_storage(msg),
# app.handle_blob(blob), app.handle_cosmos(docs), app.handle_timer(t), app.handle_event_grid(ev).
  • HTTP — via the benzene.http binding (route → topic, status mapping).
  • Service Bus — one scope per message; topic from application_properties; failure raises so the message is retried / dead-lettered.
  • Event Hub — a batch of events; one scope per event, in order; failure raises.
  • Queue Storage — one scope per message; a Storage Queue has no attribute channel, so the topic is lifted from a Benzene envelope embedded in the payload, or falls back to a configurable default_topic (the "one queue → one topic" convention). Base64 payloads are auto-detected.
  • Blob Storage — a blob-created notification; default_topic (blob:created) + the blob descriptor (name / uri / metadata) as the body.
  • Cosmos DB change feed — a batch of changed documents; one scope per document, in order (Event Hub semantics); default_topic is cosmos:change, the document is the body.
  • Timer — one tick, one invocation; default_topic is timer:tick, the schedule info is the body.
  • Event Grid — a single event or a batch; one scope per event; native schema and CloudEvents 1.0 are both accepted (told apart by specversion), topic from eventType / type.
  • OutboundServiceBusMessageSender, QueueStorageMessageSender (embeds topic + headers as a Benzene envelope), and EventGridMessageSender (native schema or CloudEvents 1.0, topic in eventType / type) all implement benzene.core.MessageSender over the optional Azure SDKs.

Test every trigger in memory with benzene.azure.testing (no Azure SDK) — see the runnable examples/azure_orders. Mirrors .NET's Benzene.Azure.Function.* and Benzene.Clients.Azure.*, and contributes the benzene.azure subpackage to the shared benzene namespace.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benzene_azure-0.1.0b1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benzene_azure-0.1.0b1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file benzene_azure-0.1.0b1.tar.gz.

File metadata

  • Download URL: benzene_azure-0.1.0b1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for benzene_azure-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 ecf4ce2cfe1909a58e12a35aae9a25daf2d7f3e6b7a8e95138fcf80a2ff075d5
MD5 3d58b8d161fb7f67ed502488a378b0ea
BLAKE2b-256 181f8853d4eb32025a01a96777cde1eab0054f23b661d3330eb7a9a5e3174f90

See more details on using hashes here.

Provenance

The following attestation bundles were made for benzene_azure-0.1.0b1.tar.gz:

Publisher: release.yml on daniellepelley/benzene-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file benzene_azure-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: benzene_azure-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for benzene_azure-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 84be2e64422b9afd67da653f31172ff7807bcdac0c41348bf10f06dbc873be30
MD5 f3cc183f5b8a863436e5b1ea3326b3ca
BLAKE2b-256 597cbcc165f262328989c3f9df8710f0b0a4e7c42d538af723e625dce16e5476

See more details on using hashes here.

Provenance

The following attestation bundles were made for benzene_azure-0.1.0b1-py3-none-any.whl:

Publisher: release.yml on daniellepelley/benzene-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0b1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page