This release is a pre-release and may not be stable for production use.
benzene-core
The transport-neutral message-handling engine of the
Benzene Python port: the handler registry and
@message decorator, the middleware pipeline, a minimal per-invocation DI container, request/
response mapping, and the BenzeneMessageApplication envelope entry point.
Depends only on benzene-results. No transport code.
pip install benzene-core
from benzene.core import BenzeneMessageApplication, Registry, message
from benzene.results import Result
@message("say:hello")
async def hello(request: dict) -> Result:
return Result.ok({"greeting": f"Hello {request['name']}"})
app = BenzeneMessageApplication(Registry().add(hello))
# Drive it with a transport-neutral Benzene message envelope:
response = await app.handle(
{"topic": "say:hello", "headers": {}, "body": '{"name": "world"}'}
)
# -> {"statusCode": "ok", "headers": {"content-type": "application/json"},
# "body": '{"greeting": "Hello world"}'}
Install a transport binding on top (e.g. benzene-http)
to host these handlers over a real protocol. Mirrors .NET's Benzene.Core +
Benzene.Core.MessageHandlers + Benzene.Dependencies, and contributes the benzene.core
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_core-0.1.0b1.tar.gz.
File metadata
- Download URL: benzene_core-0.1.0b1.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
133f8c910be03463bd372fb56d80ad08f53fcb9f6ac5342456fc26f53b7284cd
|
|
| MD5 |
fb555852e2cfc310122fb5e31e8d5a85
|
|
| BLAKE2b-256 |
575cb73e33081e7d708461cb188a738eea5a2b01e13fc5fa5214a7f98a78bfb3
|
Provenance
The following attestation bundles were made for benzene_core-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_core-0.1.0b1.tar.gz -
Subject digest:
133f8c910be03463bd372fb56d80ad08f53fcb9f6ac5342456fc26f53b7284cd - Sigstore transparency entry: 2467247476
- 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_core-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: benzene_core-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 37.3 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 |
319c928c3e7261a1da29d7145c0bdc2cf5eeaae679d1a95a75a0833673435a50
|
|
| MD5 |
1f6c1a4d2e9b3baba2ef2e3093340e49
|
|
| BLAKE2b-256 |
e6b7f23981613e42d5c148858f3ab6526ffefea34609a603ab9ac556dd271e0e
|
Provenance
The following attestation bundles were made for benzene_core-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_core-0.1.0b1-py3-none-any.whl -
Subject digest:
319c928c3e7261a1da29d7145c0bdc2cf5eeaae679d1a95a75a0833673435a50 - Sigstore transparency entry: 2467201405
- 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: