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.httpbinding (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_topiciscosmos:change, the document is the body. - Timer — one tick, one invocation;
default_topicistimer: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 fromeventType/type. - Outbound —
ServiceBusMessageSender,QueueStorageMessageSender(embeds topic + headers as a Benzene envelope), andEventGridMessageSender(native schema or CloudEvents 1.0, topic ineventType/type) all implementbenzene.core.MessageSenderover 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecf4ce2cfe1909a58e12a35aae9a25daf2d7f3e6b7a8e95138fcf80a2ff075d5
|
|
| MD5 |
3d58b8d161fb7f67ed502488a378b0ea
|
|
| BLAKE2b-256 |
181f8853d4eb32025a01a96777cde1eab0054f23b661d3330eb7a9a5e3174f90
|
Provenance
The following attestation bundles were made for benzene_azure-0.1.0b1.tar.gz:
Publisher:
release.yml on daniellepelley/benzene-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
benzene_azure-0.1.0b1.tar.gz -
Subject digest:
ecf4ce2cfe1909a58e12a35aae9a25daf2d7f3e6b7a8e95138fcf80a2ff075d5 - Sigstore transparency entry: 2467247384
- Sigstore integration time:
-
Permalink:
daniellepelley/benzene-python@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniellepelley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84be2e64422b9afd67da653f31172ff7807bcdac0c41348bf10f06dbc873be30
|
|
| MD5 |
f3cc183f5b8a863436e5b1ea3326b3ca
|
|
| BLAKE2b-256 |
597cbcc165f262328989c3f9df8710f0b0a4e7c42d538af723e625dce16e5476
|
Provenance
The following attestation bundles were made for benzene_azure-0.1.0b1-py3-none-any.whl:
Publisher:
release.yml on daniellepelley/benzene-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
benzene_azure-0.1.0b1-py3-none-any.whl -
Subject digest:
84be2e64422b9afd67da653f31172ff7807bcdac0c41348bf10f06dbc873be30 - Sigstore transparency entry: 2467172887
- Sigstore integration time:
-
Permalink:
daniellepelley/benzene-python@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniellepelley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Trigger Event:
workflow_dispatch
-
Statement type: