--- id: websockets version: "17.0.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # websockets — An implementation of the WebSocket Protocol (RFC 6455 & 7692) License: permissive · Maintenance: active · Popularity: top 100 on PyPI ## Install pip install websockets uv add websockets poetry add websockets ## Description .. image:: logo/horizontal.svg :width: 480px :alt: websockets |licence| |version| |pyversions| .. |licence| image:: https://img.shields.io/pypi/l/websockets.svg :target: https://pypi.python.org/pypi/websockets .. |version| image:: https://img.shields.io/pypi/v/websockets.svg :target: https://pypi.python.org/pypi/websockets .. |pyversions| image:: https://img.shields.io/pypi/pyversions/websockets.svg :target: https://pypi.python.org/pypi/websockets What is ``websockets``? ----------------------- websockets is a library for building WebSocket_ servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. .. _WebSocket: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API Built on top of ``asyncio``, Python's standard asynchronous I/O framework, the default implementation provides an elegant coroutine-based API. Implementations on top of ``threading`` and ``trio`` are also provided, as well as a Sans-I/O layer for integration in third-party projects. `Documentation is available on Read the Docs. `_ .. copy-pasted because GitHub doesn't support the include... ## AI interpretation — verify before relying websockets is a library for building WebSocket servers and clients in Python with asyncio, threading, and trio support, emphasizing correctness, simplicity, robustness, and performance. Verdict: websockets is a production-ready, actively maintained WebSocket implementation with zero dependencies, permissive licensing, and strong RFC 6455 compliance. It ranks in the top 100 PyPI packages with no known vulnerabilities and supports Python 3.11–3.15, making it a low-friction choice for WebSocket applications. [View on SkillFed](https://skillfed.io/packages/websockets) · [View on PyPI](https://pypi.org/project/websockets/)