Web-standards-first Python web framework: Fetch API semantics, zero dependencies, runtime-agnostic core
Project description
hayate
A web-standards-first Python web framework, inspired by Hono.
hayate (疾風, "swift wind") brings the Fetch API model to Python. Everything you touch maps 1:1 to WHATWG / IETF web standards; Python-local protocols such as WSGI and ASGI are demoted to adapter-level implementation details.
- Standards-first —
Request/Response/Headers/URLfollow WHATWG Fetch and URL semantics. Routing syntax is the WHATWG URLPattern standard (/books/:id), not a custom DSL. - Zero dependencies — standard library only. Runs anywhere CPython (or Pyodide) runs.
- Runtime-agnostic — the app core is a pure
fetch(Request) -> Responsefunction. ASGI servers, Cloudflare Python Workers, and AWS Lambda are thin adapters. - Async-first, typed — Python 3.12+.
Install
uv add hayate # or: pip install hayate
Quickstart
from hayate import Hayate, HTTPException
app = Hayate()
@app.get("/books/:id")
async def show_book(c):
book = BOOKS.get(c.req.param("id"))
if book is None:
raise HTTPException(404, title="Book not found")
return c.json(book)
Run with any ASGI server:
uvicorn main:app
Testing without a server
The app core performs no I/O, so tests call it directly — no test client, no sockets:
async def test_show_book():
res = await app.request("/books/1")
assert res.status == 200
assert (await res.json())["id"] == "1"
Conformance and performance, measured
- Standards conformance runs against vendored web-platform-tests
vectors on every
pytestrun, with ratcheted pass counts — see docs/conformance.md. - Framework overhead is benchmarked against Starlette (1.2x on simple routes, 1.9x at 64 routes; optional Rust accelerator included) — see docs/benchmarks.md.
Status
Alpha (0.3.x): the surface tracks DESIGN.md (Japanese) and may still move before 1.0. Changes are recorded in CHANGELOG.md; platform research lives in docs/research/.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hayate-0.5.0.tar.gz.
File metadata
- Download URL: hayate-0.5.0.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250c7ea2350a11f011329a51d512513cdb32696e4a2b912a96199effb24465b4
|
|
| MD5 |
d1cb1071833b8640205d9af19724d565
|
|
| BLAKE2b-256 |
16359445c7ae0343f3be3536648de4f909802e36f0d857738283d000d8c942b7
|
Provenance
The following attestation bundles were made for hayate-0.5.0.tar.gz:
Publisher:
release.yml on hayatepy/hayate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hayate-0.5.0.tar.gz -
Subject digest:
250c7ea2350a11f011329a51d512513cdb32696e4a2b912a96199effb24465b4 - Sigstore transparency entry: 2217282998
- Sigstore integration time:
-
Permalink:
hayatepy/hayate@6f737690c7689f9a40a6c06692afd9ddbde0e80f -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/hayatepy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f737690c7689f9a40a6c06692afd9ddbde0e80f -
Trigger Event:
push
-
Statement type:
File details
Details for the file hayate-0.5.0-py3-none-any.whl.
File metadata
- Download URL: hayate-0.5.0-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00383592437b86f8ea5d4fab835fe713085b11c063a98bc1816ca29d5c449719
|
|
| MD5 |
66c4b4bd061f37b8989acca563998f91
|
|
| BLAKE2b-256 |
580ae41cc5c8b08e81c9163b6a5940236cf69f699db19d9b83a1c6f4620a4e3d
|
Provenance
The following attestation bundles were made for hayate-0.5.0-py3-none-any.whl:
Publisher:
release.yml on hayatepy/hayate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hayate-0.5.0-py3-none-any.whl -
Subject digest:
00383592437b86f8ea5d4fab835fe713085b11c063a98bc1816ca29d5c449719 - Sigstore transparency entry: 2217283982
- Sigstore integration time:
-
Permalink:
hayatepy/hayate@6f737690c7689f9a40a6c06692afd9ddbde0e80f -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/hayatepy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f737690c7689f9a40a6c06692afd9ddbde0e80f -
Trigger Event:
push
-
Statement type: