Skip to main content

without-http

A sans-IO-backed ASGI server and HTTP client for without. Where without-asgi is the app side of the ASGI boundary (it turns a server's receive/send into typed streams), without-http is the server side: it owns the socket and the HTTP wire protocol, and drives any ASGI app via app(scope, receive, send).

The wire-protocol state machines are themselves sans-IO libraries: h11 for HTTP/1.1, h2 for HTTP/2, and wsproto for WebSockets. without-http reads and writes socket bytes with asyncio, feeds them through those state machines, and uses without-asgi's server-direction codecs to translate between typed events and the ASGI dicts an app expects.

from without_async import sleep_forever
from without_asgi import make_asgi_app
from without_http import ConnectionPool, request, serving

app = make_asgi_app(lifespan, http=router.dispatch, websocket=sockets.dispatch)

async with serving(app, host="127.0.0.1", port=8000):
    await sleep_forever()  # run until cancelled

async with ConnectionPool() as pool:
    async with request(pool, "GET", "http://127.0.0.1:8000/items") as (head, body):
        assert head.status == 200
        data = await body.read()

Because without-http speaks plain ASGI to the app, any ASGI app runs over it, interchangeably with uvicorn. The server handles TLS, HTTP/2 (by ALPN or prior knowledge), keep-alive, WebSockets over the HTTP/1.1 upgrade, per-handler isolation, and flow control. A client is a function from a request to a response, and a ConnectionPool is the one that answers over the network: a (head, body) response split, buffered and streaming bodies in both directions, opt-in trailers, HTTP/2 multiplexing, per-host connection bounds, per-phase request timeouts, consumer-driven duplex (with bidirectional streaming over HTTP/2), and stack-composed middleware.

without_http.testing carries the same interface into a test: a mock client that answers from a function, an ASGI client that drives an app in memory, and a loopback client that runs the real wire protocols over no socket at all, plus the raw in-memory endpoints those are built from, for a test that writes frames rather than requests.

See the without-http guide (with the API reference) for the full surface, and Alternatives for where the client and server stand against httpx, aiohttp, niquests, and the ASGI servers, including which absences are gaps and which are positions.

Release files for without-http 0.0.9

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-http 0.0.9
File Size Uploaded
without_http-0.0.9.tar.gz 70.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for without-http 0.0.9
File Interpreter ABI Platform
without_http-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 148.1 kB

Release files / without_http-0.0.9.tar.gz

Download URL without_http-0.0.9.tar.gz
Size 70.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6cc50a5c9b0ddf6dceb17b8f9f2fb875e3ad052cf42608957e2a0f4addea872c
BLAKE2b-256 checksum
How to use checksums
3257f9d49716f4becf212e8d23790307deb6001fd8c245f9c03ed987af7815a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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_http-0.0.9-py3-none-any.whl

Download URL without_http-0.0.9-py3-none-any.whl
Size 77.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42e7152e80b9e139aeb5e974f4bd798332338bc23e334e8afdd5a4ee6479b1d4
BLAKE2b-256 checksum
How to use checksums
985a7bf37a43809695b68c0049a0e3f6081e97ffb7b1b1a5b43c4627cd48c503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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

This release

0.0.9 This release

2 release files

0.0.8

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