# websockets

> Library for building WebSocket servers and clients in Python

Source: https://talira.ai/catalog/websockets-m5pe98dt
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / websockets / servers](https://talira.ai/categories/libraries/websockets/servers), [libraries / websockets / clients](https://talira.ai/categories/libraries/websockets/clients), [languages / python](https://talira.ai/categories/languages/python)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Aymeric Augustin](https://talira.ai/orgs/aymeric-augustin.md)

websockets is a Python library for building WebSocket servers and clients, focused on correctness, simplicity, robustness and performance. Its default implementation is a coroutine API on asyncio, with implementations on threading and trio too and a Sans-I/O layer for other projects to build on. It is tested for compliance with RFC 6455 (WebSocket) and RFC 7692 (compression), with 100% branch coverage, handles backpressure, and has a C extension that speeds up expensive operations, shipped as pre-built wheels. HTTP and WebSocket servers such as [Uvicorn](https://talira.ai/catalog/uvicorn-gjvahj1g.md) build on it for their WebSocket support.

## Links

- Website: https://websockets.readthedocs.io/
- GitHub: https://github.com/python-websockets/websockets

## Problems it solves

- run a WebSocket server in Python
- connect to a WebSocket server from a Python script
- add WebSockets to an asyncio app

## Features

- WebSocket servers and clients for Python
- coroutine API on asyncio, plus threading and trio implementations
- Sans-I/O layer for integration in other projects
- compliance with RFC 6455 and RFC 7692 compression, with 100% branch coverage
- handles backpressure
- C extension, pre-built for Linux, macOS and Windows

## Limitations

- It has no callback-based API: pick another library if you prefer callbacks over coroutines.[^1]
- Its HTTP support is minimal, just enough for a health check; for HTTP and WebSocket in one server, use a server built on it such as Uvicorn.[^1]

## Trust

Overall: 0.67 out of 1.
Signals: maintenance 1.00, adoption 0.75, momentum 0.47, community 0.79, backing 0.30, extensibility 0.00.

- last commit 15 days ago
- 60 commits in the last 90 days
- latest release 17.4 30 days ago
- 5.7k GitHub stars
- 93 contributors
- accepts sponsorship (Github, Open Collective, Tidelift)
- backed by Aymeric Augustin

## Sources

[^1]: https://github.com/python-websockets/websockets/blob/main/README.rst (checked 28 Nov 2026)
[^2]: https://github.com/python-websockets/websockets/blob/main/LICENSE (checked 28 Nov 2026)
