WebSocket library for Trio
Low maintenance activity. Last release 21 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
Consider insteadwebsocketsPythie’s Index: 86553.4M downloads/moCompare →
pip install trio-websocketTrio WebSocket
This library implements both server and client aspects of the the WebSocket protocol, striving for safety, correctness, and ergonomics. It is based on the wsproto project, which is a Sans-IO state machine that implements the majority of the WebSocket protocol, including framing, codecs, and events. This library handles I/O using the Trio framework. This library passes the Autobahn Test Suite.
This README contains a brief introduction to the project. Full documentation is available here.
Status
This project is on life-support maintenance. If you're interested in helping to maintain and contribute, please reach out on Gitter or contribute in issues and pull requests.
Alternatives
If you happen to only need a server, using Quart via the quart-trio extension may suffice. While trio-websocket is more flexible, Quart covers both HTTP and WebSocket within a single framework, and serving both from the same port is straightforward. There has yet to be a performance comparison.
Installation
This library requires Python 3.8 or greater. To install from PyPI:
pip install trio-websocket