Skip to main content
Pre-release

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

benzene-http

The inbound HTTP (ASGI) transport binding for the Benzene Python port. Host the same handlers you wrote against benzene-core behind a real HTTP server — a standard ASGI app you can run with uvicorn/hypercorn.

Depends on benzene-core (which pulls in benzene-results).

pip install benzene-http
from benzene.core import message
from benzene.results import Result
from benzene.http import BenzeneHttpApp, HttpRouter, http_endpoint

@http_endpoint("GET", "/greet/{name}")   # where it arrives
@message("say:hello")                    # which handler it resolves to
async def hello(request: dict) -> Result:
    return Result.ok({"greeting": f"Hello {request['name']}"})

app = BenzeneHttpApp(HttpRouter().add(hello))   # run: uvicorn module:app

The topic is resolved from route/method conventions; the Benzene status maps to an HTTP code (wire-contracts §4.1): ok → 200, created → 201, not-found → 404, and so on. Path params ({name}), the query string, and the JSON body merge into the handler's request (path wins, then query, then body). Unmatched route → 404, invalid JSON body → 400, uncaught handler error → 503 — the host is never crashed by request content.

Mirrors .NET's Benzene.Http, and contributes the benzene.http subpackage to the shared benzene namespace.

Metadata

Release files for benzene-http 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benzene-http 0.1.0b2
File Size Uploaded Provenance Actions
benzene_http-0.1.0b2.tar.gz 17.2 kB With provenance Details for benzene_http-0.1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for benzene-http 0.1.0b2
File Interpreter ABI Platform Actions
benzene_http-0.1.0b2-py3-none-any.whl Python 3 none any Details for benzene_http-0.1.0b2-py3-none-any.whl

Total release size: 38.8 kB

Release files / benzene_http-0.1.0b2.tar.gz

Download URL benzene_http-0.1.0b2.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9a33b61f2dd8b6055e812003877b1d5b7bcdf8175735f74a0c68a3f84afce837
BLAKE2b-256 checksum
How to use checksums
018cc0b05d49d679ed45779021a292fd7b9caa480e804d4eaaef3d7faabbd7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / benzene_http-0.1.0b2-py3-none-any.whl

Download URL benzene_http-0.1.0b2-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d4fab1d9f697bf8d16a651a82857f4129ee58bc5bee33eac608654ee90f7bef
BLAKE2b-256 checksum
How to use checksums
147026f82c5a0640ea2dc67608186a143abf229e0de0beaedbcc33221ff016ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for benzene-http 0.1.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for benzene_http-0.1.0b2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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