skillfed

wsproto

Pure-Python WebSocket protocol implementation

wsproto Permissive license MIT Active 303 v1.3.2 released

Install

wsproto on PyPI

pip

pip install wsproto

uv

uv add wsproto

poetry

poetry add wsproto

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — h11
Maintenance actively maintained — 266 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: wsproto-1.3.2-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

About wsproto

from the package's own PyPI description — quoted content, verbatim

======================================================== Pure Python, pure state-machine WebSocket implementation ========================================================

.. image:: https://github.com/python-hyper/wsproto/workflows/CI/badge.svg :target: https://github.com/python-hyper/wsproto/actions :alt: Build Status .. image:: https://codecov.io/gh/python-hyper/wsproto/branch/main/graph/badge.svg :target: https://codecov.io/gh/python-hyper/wsproto :alt: Code Coverage .. image:: https://readthedocs.org/projects/wsproto/badge/?version=latest :target: https://wsproto.readthedocs.io/en/latest/ :alt: Documentation Status .. image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg :target: https://gitter.im/python-hyper/community :alt: Chat community

This repository contains a pure-Python implementation of a WebSocket protocol stack. It's written from the ground up to be embeddable in whatever program you choose to use, ensuring that you can communicate via WebSockets, as defined in RFC6455 <https://tools.ietf.org/html/rfc6455>_, regardless of your programming paradigm.

This repository does not provide a parsing layer, a network...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

wsproto is a pure-Python, state-machine-based WebSocket protocol implementation that handles RFC 6455 WebSocket framing and RFC 7692 compression extensions without requiring network or concurrency layers.

Minimal friction: single pure-Python wheel dependency on h11, active maintenance with recent release (266 days ago), and solid community backing (303 GitHub stars).

MIT license permits unrestricted commercial and private use with only attribution required—no restrictions on modification or distribution.

Usage

from wsproto import WSConnection, ConnectionType
from wsproto.events import Request

ws = WSConnection(ConnectionType.CLIENT)
ws.send(Request(host='example.com', target='/'))
data_to_send = ws.bytes_to_send()

Requires Python 3.10 or higher; you must provide your own network socket and concurrency handling.

Verdict: wsproto is a well-maintained, production-ready WebSocket protocol stack for Python 3.10+ with minimal dependencies, no known vulnerabilities, and permissive licensing. It's ideal for embedding WebSocket support into custom applications where you control the network and concurrency layers.

Needs verification

  • Whether the state-machine design performs adequately for high-throughput or high-concurrency scenarios compared to alternatives
  • Real-world adoption patterns and whether the top-1000 tier reflects active production use or historical popularity
websocket protocol implementationpure python websocketrfc 6455 websocketwebsocket state machinewebsocket frame handlingembeddable websocket librarywebsocket compression support

Similar packages