without adapters that turn an ASGI app's receive/send into typed event streams and back.
Project description
without-asgi
without adapters that turn an ASGI application's
receive/send into typed event streams and back. This package is only the
boundary: it parses raw ASGI
event dicts into typed values, encodes typed values back into the dicts a server
expects, and exposes receive as a Stream and send as a Sink. Routing,
middleware, and handlers are left to the application. The one piece of protocol
the adapter does drive is lifespan, because that is boundary work, not app policy.
An ASGI app is async def app(scope, receive, send). The adapters let the body
of that callable read as plain without wiring:
from without_asgi import http_inbound, http_outbound, parse_http_scope
async def app(scope, receive, send):
head = parse_http_scope(scope)
handler = select(head) # your routing, your processor
outbound = handler(http_inbound(receive)) # Stream[Inbound] -> Stream[Outbound]
await http_outbound(send)(outbound) # drive ASGI send
make_asgi_app(lifespan, http=..., websocket=...) builds the ASGI app, driving
the lifespan protocol and wiring each connection's receive/send around the
Processor a router selects. The same typed vocabulary parses and encodes in
both directions, so a transport that owns the wire (like
without-http) can talk ASGI to any app in typed values; and
the optional without_asgi.routing submodule ships the unopinionated
Middleware / stack / wrap / buffered tools you assemble a router from.
For a full, opinionated router you don't have to hand-roll, the sibling
without-web package snaps onto this boundary through nothing
but the HttpRouter type.
See the
without-asgi guide
(with the API reference)
for the full surface, including the codec's server direction and the middleware
body shapes.
Project details
Release history Release notifications | RSS feed
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 without_asgi-0.0.1.tar.gz.
File metadata
- Download URL: without_asgi-0.0.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd9b987bb6a8885b69ccde1b1b167ac5b69231a11317219376bfaa5de31a13c
|
|
| MD5 |
ae7c3825ed9ec2cf6d0bc27338992d28
|
|
| BLAKE2b-256 |
07186e2a5cb0f6158c46e0bc342f608e39f1bd2e47ea7c3f212f7385862b1597
|
File details
Details for the file without_asgi-0.0.1-py3-none-any.whl.
File metadata
- Download URL: without_asgi-0.0.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fd527ed66bb71d2a10f256cbf77016d82655e83942f37b016d011891b7e013b
|
|
| MD5 |
b5f46cc2968840a059102d46add536a7
|
|
| BLAKE2b-256 |
ed79812c0b2b0c49a55e94ca034724c94180efd7f8c1ef9ca594d889ca5569f7
|