HTTP3X
A WebSocket replacement built on HTTP/3 and QUIC.
Async Python server framework for HTTP/3 + WebTransport (QUIC).
What WebSocket would look like if it was designed today.
🚀 Quick Example
from http3x import App
from http3x.wt import Session
app = App()
class Echo(Session):
async def on_stream(self, stream):
async for data in stream:
await stream.send(data)
app.wt.add("/echo", Echo)
app.run(host='::', port=4433, certfile="cert.pem", keyfile="key.pem")
Installation
pip install http3x
🚀 WebTransport Live Example
Streaming AI-style responses over HTTP/3 (WebTransport):
You: hello
AI:
h
he
hel
hell
hello 👋
This is NOT WebSocket.
This is native HTTP/3 streaming over QUIC.
See tests/wt_chat_stream.py and tests/wt_chat_stream.html for the complete example.
⚡ Why not WebSocket?
| Feature | WebSocket | http3x |
|---|---|---|
| Protocol | TCP | QUIC (HTTP/3) |
| Streams | Single stream | Multiplexed streams |
| Datagram | No support | Built-in datagram |
| Head-of-line blocking | Yes | No |
🚀 HTTP/3 Live Example
Simple HTTP/3 server with GET and POST endpoints:
from http3x import App
from http3x.h3 import Handler
app = App()
class ApiHandler(Handler):
async def get(self):
return {'status': 'ok'}
async def post(self):
return {'status': 'ok'}
app.h3.add('/h3', ApiHandler)
app.run(host='0.0.0.0', port=443, certfile="cert.pem", keyfile="key.pem")
Using curl with HTTP/3 support:
curl --http3-only -k https://localhost:443/h3
curl --http3-only -k -X POST -d "Hello, HTTP/3!" https://localhost:443/h3
See tests/h3_mini.py for the complete example.
Features
- HTTP/3 server (QUIC-based)
- WebTransport (stream + datagram)
- Multiplexed streams (no head-of-line blocking)
- Async/await API
- Built on aioquic
Documentation
- WebTransport Guide - Complete documentation for WebTransport functionality
- HTTP/3 Guide - Complete documentation for HTTP/3 functionality
More docs coming soon.
Project Links
- Source Code: GitHub Repository
- Documentation: Http3x Documentation
- PyPI: http3x
- Contributors: GitHub Contributors
Contributing
Contributions are welcome! Please visit the GitHub repository to contribute code, report issues, or suggest features.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Metadata
Release files for http3x 0.2.1
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 |
|---|---|---|---|---|
| http3x-0.2.1.tar.gz | 79.8 kB | Without provenance | Details for http3x-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| http3x-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for http3x-0.2.1-py3-none-any.whl |
Total release size: 95.9 kB
Release files / http3x-0.2.1.tar.gz
| Download URL | http3x-0.2.1.tar.gz |
|---|---|
| Size | 79.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a67a5f5ae42081c9a3b3820654909b8cfd75c6bc513af9d46e5becd28e927694
|
|
BLAKE2b-256 checksum How to use checksums |
ad29c60a1f25c440834b9019d2edef40cff3af88165bd5c62cc6fdbb5ee22ba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.33.1
|
Release files / http3x-0.2.1-py3-none-any.whl
| Download URL | http3x-0.2.1-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1dabba4a1b544beca14cdd95e396e09af068734357d8da6fd9e667dcb482d399
|
|
BLAKE2b-256 checksum How to use checksums |
915d59fe918f5b03c594ce1706a1548fa7996a98ea23222f017cec7917e9c5d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.33.1
|
Security for http3x 0.2.1
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.