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.4.tar.gz (23.5 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.4-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: without_asgi-0.0.4.tar.gz
  • Upload date:
  • Size: 23.5 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.4.tar.gz
Algorithm Hash digest
SHA256 0f22aca9f49b7a8e63d321bce092ffb2bb8aece92b2e31ede3c6700128912076
MD5 1ec52cb3d85c32f78279c9dd413df8c2
BLAKE2b-256 942d7da898af6db80a437713f1f1557462af09c43f26dc5e4ef097f948cc24e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: without_asgi-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 29.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec443c184efea4a35cbfa8f39d7481859c8f41fa0bbe15dd3e166963c3fc9e27
MD5 1b9e4e6a2f5744af48c79a5ece664828
BLAKE2b-256 30c24d392da0238a7141eea358830dae764fef2c5dd8a23b5a5d3a8f258ef33e

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