trio-websocket
WebSocket library for Trio
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you're already committed to Trio and need WebSocket support; the library is stable and passes protocol compliance tests. However, be aware the project is on life-support maintenance with infrequent releases (535 days since last release). If you need only a WebSocket server and prefer a more actively maintained framework, consider quart-trio instead. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or greater and the Trio async framework.
- Low friction install with 4 runtime dependencies.
- Project is on life-support maintenance; last release was 535 days ago.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), allowing commercial and private use with minimal restrictions.
last release 2025-02-25 (535 days) · last repo commit 2025-10-21 · 80 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 41,051,413 downloads/mo, #676 on PyPI
Alternatives
Verify before relying
pip install trio-websocket
import trio
from trio_websocket import open_websocket_url
async def main():
async with open_websocket_url('wss://echo.websocket.org') as ws:
await ws.send_message('hello')
msg = await ws.get_message()
print(msg)
trio.run(main)- Performance characteristics compared to alternatives like quart-trio mentioned in the README.
- Current maintenance commitment and roadmap given life-support status.
- Compatibility guarantees with newer Trio releases.
What it is and what it does
Trio WebSocket is a WebSocket protocol library that layers RFC 6455 compliance on top of the Trio async framework. It delegates protocol state machine logic to wsproto (a Sans-IO implementation) and handles I/O through Trio's async primitives, passing the Autobahn Test Suite for correctness. The library provides both client and server APIs: clients connect via context managers like `open_websocket_url()`, while servers accept connections through a handler coroutine pattern.
The package is currently on life-support maintenance, meaning development has slowed but the repository remains active. It supports Python 3.8 through 3.13 and works with both CPython and PyPy. The project acknowledges alternatives like quart-trio for users needing only server-side WebSocket support within a broader HTTP framework, though trio-websocket offers more flexibility for standalone bidirectional communication.
Use it for
- Build real-time chat or notification systems using Trio's async concurrency model.
- Implement WebSocket servers that handle multiple concurrent client connections.
- Create WebSocket clients that connect to remote servers and exchange messages asynchronously.
- Integrate WebSocket communication into Trio-based applications requiring bidirectional I/O.
- Test WebSocket protocol compliance using the Autobahn Test Suite validation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you're already committed to Trio and need WebSocket support; the library is stable and passes protocol compliance tests. However, be aware the project is on life-support maintenance with infrequent releases (535 days since last release). If you need only a WebSocket server and prefer a more actively maintained framework, consider quart-trio instead. No known security vulnerabilities.
Install
trio-websocket on PyPI
Before you install
Low friction install with 4 runtime dependencies. Project is on life-support maintenance; last release was 535 days ago. Repository is active (last commit 2025-10-21) but marked as aging. Consider this when evaluating long-term support expectations.
Requires Python 3.8 or greater and the Trio async framework.
License in practice
Licensed under MIT (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install trio-websocket
import trio
from trio_websocket import open_websocket_url
async def main():
async with open_websocket_url('wss://echo.websocket.org') as ws:
await ws.send_message('hello')
msg = await ws.get_message()
print(msg)
trio.run(main)
Verify before relying
- Performance characteristics compared to alternatives like quart-trio mentioned in the README.
- Current maintenance commitment and roadmap given life-support status.
- Compatibility guarantees with newer Trio releases.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesoutcometriowsprotoexceptiongroup |
| Maintenance | Aging 535 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 41,051,413 / month, #676 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTyping :: Typed |
Evidence: trio_websocket-0.12.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “websocket client server trio”
- trio-websocketImplements WebSocket protocol (RFC 6455) for both client and server…
- websocketswebsockets is a library for building WebSocket servers and clients in…
- HypercornHypercorn is an ASGI and WSGI web server supporting HTTP/1, HTTP/2,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also websockets · ws4py · wsproto · autobahn · trio · sniffio · websocket-client · simple-websocket · Hypercorn · centrifuge-python