Development Status
- 5 - Production/Stable
Environment
- Web Environment
Intended Audience
- Developers
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.15
Topic
- Internet :: WWW/HTTP
What is aioquic?
aioquic is a library for the QUIC network protocol in Python. It features a minimal TLS 1.3 implementation, a QUIC stack and an HTTP/3 stack, for both clients and servers.
aioquic is used by Python opensource projects such as dnspython, hypercorn, mitmproxy and the Web Platform Tests cross-browser test suite. It has also been used extensively in research papers about QUIC.
To learn more about aioquic please read the documentation.
Why should I use aioquic?
aioquic has been designed to be embedded into Python client and server libraries wishing to support QUIC and / or HTTP/3. The goal is to provide a common codebase for Python libraries in the hope of avoiding duplicated effort.
Both the QUIC and the HTTP/3 APIs follow the “bring your own I/O” pattern, leaving actual I/O operations to the API user. This approach has a number of advantages including making the code testable and allowing integration with different concurrency models. For applications which use asyncio, a convenience API built on top of it is also provided.
A lot of effort has gone into writing an extensive test suite for the aioquic code to ensure best-in-class code quality, and it is regularly tested for interoperability against other QUIC implementations.
aioquic treats its peer as untrusted. Malformed input closes the connection with an error code or drops the packet. The memory and CPU spent on the peer’s data are bounded, from TLS handshake messages to stream reassembly and HTTP/3 field sections. Vulnerabilities are reported privately as described in the security policy, and their fixes are announced in security advisories.
Features
- minimal TLS 1.3 implementation conforming with RFC 9846
post-quantum key exchange with X25519MLKEM768
session resumption and 0-RTT data
- QUIC stack conforming with RFC 9000 (QUIC v1) and RFC 9369 (QUIC v2)
TLS integration conforming with RFC 9001
loss detection and congestion control conforming with RFC 9002
Reno and CUBIC (RFC 9438) congestion control
IPv4 and IPv6 support
connection migration, NAT rebinding and server preferred addresses
datagram frames conforming with RFC 9221
logging TLS traffic secrets
logging QUIC events in QLOG format
version negotiation conforming with RFC 9368
reliable stream resets (experimental)
Installing
The easiest way to install aioquic is to run:
pip install aioquic
Building from source
If there are no wheels for your system or if you wish to build aioquic from source you will need a C compiler and the Python development headers.
On Debian/Ubuntu run:
sudo apt install python3-dev
Running the examples
aioquic comes with example clients and servers for HTTP/3 and QUIC, which illustrate how to use the library.
You can browse these examples here: https://github.com/aiortc/aioquic/tree/main/examples
License
aioquic is released under the BSD license.