without-web
An opinionated HTTP and WebSocket router for
without-asgi. without-asgi deliberately ships no router,
only the unopinionated boundary and composition tools. without-web is the
opinionated layer on top: t-string patterns with typed parameters, typed request
extraction, 405-vs-404, mounting, scoped middleware, exception handlers, reverse
routing (url_for), and OpenAPI.
It snaps onto the boundary through nothing but the existing HttpRouter type:
Router.dispatch is an HttpRouter[T], so make_asgi_app(http=router.dispatch)
just works, and bring-your-own (or no router at all) stays first-class.
import json
from without_asgi import Response, make_asgi_app
from without_web import INT, Router, get, path_param
uid = path_param("id", INT) # one token: a pattern segment AND a typed read
@get(t"/users/{uid}", uid) # t-string pattern; `@get` returns a Route value
async def show_user(state, user_id: int): # user_id is an int, no `assert isinstance`
body = json.dumps({"id": user_id}).encode()
return Response(status=200, headers=((b"content-type", b"application/json"),), body=body)
router = Router(routes=(show_user,), fallback=not_found)
app = make_asgi_app(lifespan, http=router.dispatch)
Matching is a pure walk of an immutable trie, so precedence, 405-vs-404, and
mounting fall out of the structure. Converters and extractors parse, they don't
validate: a path param arrives already typed, and OpenAPI is a merge of the
self-descriptions each layer recovers from structure rather than a blob declared
by hand. Encoding stays the app's choice, so the router ships no
json_response-style helper.
See the
without-web guide
(with the API reference)
for the full surface: patterns, extractors, streaming input, mounting,
middleware, exception handlers, reverse routing, OpenAPI, and WebSocket routing.
Metadata
Release files for without-web 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| without_web-0.0.10.tar.gz | 31.4 kB | Without provenance | Details for without_web-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| without_web-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for without_web-0.0.10-py3-none-any.whl |
Total release size: 68.6 kB
Release files / without_web-0.0.10.tar.gz
| Download URL | without_web-0.0.10.tar.gz |
|---|---|
| Size | 31.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb0d5c707b9f4594f702d40ac9d1d563eda2f5cfa42d019f434e236fae3d6b85
|
|
BLAKE2b-256 checksum How to use checksums |
a5ec796daec5683dd797e7545247ce57e19f3f6e4272ab8c01715d5e9b1e4f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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_web-0.0.10-py3-none-any.whl
| Download URL | without_web-0.0.10-py3-none-any.whl |
|---|---|
| Size | 37.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b904bf30d7a4493aaca38d6afcb4967d43467677dbf038dfbaf34ad52b7c07de
|
|
BLAKE2b-256 checksum How to use checksums |
ea733acaa06f32130fd771611c23ca07230490dca95c31d9e425e8608bf1f893
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|
Security for without-web 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.