An async-native WebTransport stack for Python
Overview¶
PyWebTransport implements the WebTransport protocol over QUIC and HTTP/3. It provides a deterministic state machine for streams and datagrams, alongside a high-level application framework designed for standards compliance and strict concurrency safety.
Features¶
- Sans-I/O Architecture: Powered by an ownership-driven Rust state machine decoupled from an autonomous threaded reactor via a lock-free IPC boundary.
- Transport Primitives: Full implementation of bidirectional streams, unidirectional streams, and unreliable datagrams.
- Structured Concurrency: Deterministic lifecycle management for connections and streams via asynchronous context managers.
- Zero-Copy I/O: End-to-end support for buffer protocols and
memoryviewto minimize data copying overhead. - Application Framework: Declarative
ServerAppfeaturing path-based routing and composable stateful middleware.
Interoperability¶
Infrastructure
- Public Instance:
https://interop.wtransport.org, Native Dual-Stack - Container Image:
ghcr.io/wtransport/interop-server:latest, UDP Port 4433
Endpoints
- /echo: Bidirectional stream and datagram reflection.
- /stats: Current session statistics and negotiated parameters.
- /status: Global server health and aggregate metrics.
- /webtransport/devious-baton: Devious Baton protocol state transition validation.
API Reference¶
- Full Reference: Comprehensive documentation organized into the Application Framework, Transport Layer, and Shared Primitives.
Community¶
License¶
Distributed under the terms of the Apache License 2.0. See LICENSE for details.