Skip to main content

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 and handlers are left to the application, and so is middleware apart from the few pieces that need nothing but this vocabulary and therefore work under any router and any server (concurrency and body-size limits, and negotiated response compression). 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, with without_asgi.compression holding the negotiated response compression built on them.

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.

Metadata

Release files for without-asgi 0.0.8

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

Source distribution (sdist)

Source distribution for without-asgi 0.0.8
File Size Uploaded
without_asgi-0.0.8.tar.gz 69.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for without-asgi 0.0.8
File Interpreter ABI Platform
without_asgi-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 149.0 kB

Release files / without_asgi-0.0.8.tar.gz

Download URL without_asgi-0.0.8.tar.gz
Size 69.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0fb1ac0ee06d90f6ac6d3c3b42407cd735eff3e200067a380eebf175abade2a5
BLAKE2b-256 checksum
How to use checksums
c02697080aaceed6cdfe4260ad0c13b0b6231630610f2e521c249315c23198a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

Release files / without_asgi-0.0.8-py3-none-any.whl

Download URL without_asgi-0.0.8-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9aa86d2f2a1821365150b4fb19845d5f0b6a3a6de7a4596dcc026d4c54764131
BLAKE2b-256 checksum
How to use checksums
819f43e9bfe8700245d11c25f14a9059dcb6fba6d22e95e8174d960e4e34caf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

Release history Release notifications | RSS feed

0.0.9

2 release files

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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