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, 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

without_asgi-0.0.3.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

without_asgi-0.0.3-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file without_asgi-0.0.3.tar.gz.

File metadata

  • Download URL: without_asgi-0.0.3.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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

Hashes for without_asgi-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6b1a99ed1ac3a4b548a64a4fee0b85afd21f2d842856ba1f8331796b630318cd
MD5 d9bb72f91d85c942143aae550da49e5e
BLAKE2b-256 99f15ef6e390dacdd2c352b36814355407322522c258db319a03dfeeb1d92b26

See more details on using hashes here.

File details

Details for the file without_asgi-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: without_asgi-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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

Hashes for without_asgi-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4387ffffd22efe209825d5ed7abfab6e71220f35ef78f543cdfd97e3959abfc7
MD5 e4cbe572f3ad23a4b71be647aab80405
BLAKE2b-256 0648dd45715cff46d9fef7cdaf2fe83f0297d16c5ae4d12a821ba352b065c558

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page