A modern async server framework for HTTP/3 and WebTransport over QUIC.
Project description
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
🚀 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 examples/wt_chat_stream.py and examples/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 |
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
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.
Project details
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 http3x-0.1.1.tar.gz.
File metadata
- Download URL: http3x-0.1.1.tar.gz
- Upload date:
- Size: 73.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d1d109995a69c084262785cbe4ff154fc8fc1e3e7098aa270bb2b2fa6f3400
|
|
| MD5 |
136411ca604c2917ad2dbcaf0ec492f8
|
|
| BLAKE2b-256 |
9659cf2d01b3d6ddb538a5fdd6c9c0cba6c8c4330c5e327adf6a5ef87ace227e
|
File details
Details for the file http3x-0.1.1-py3-none-any.whl.
File metadata
- Download URL: http3x-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a03681a606e22e679626808e60502a23132779806ff1da0e0387cd4a5b6d6afa
|
|
| MD5 |
a739b6c083ec55a567a438ce79df55a4
|
|
| BLAKE2b-256 |
ad78ebd34080ecbf15f27635e49d4479ac3754dd2acde29707f15748c05e0b41
|