--- id: ws4py version: "0.6.0" license: BSD license_treatment: permissive maintenance: active --- # ws4py — WebSocket client and server library for Python 2 and 3 as well as PyPy License: permissive · Maintenance: active · Downloads: 434.5K/mo ## What it is and what it does ws4py is a Python library that implements the WebSocket protocol as defined in RFC 6455, allowing applications to establish persistent, bidirectional communication channels between clients and servers. It supports both client and server implementations and works across Python 2.7 and modern Python 3 versions as well as PyPy. The library is designed for scenarios where you need real-time, low-latency communication—such as live notifications, collaborative editing, or streaming data—without the overhead of repeated HTTP requests. It can be used as WSGI middleware or as a standalone server component. Use it for: - Building real-time chat or messaging applications where messages must flow instantly between connected clients - Streaming live data to multiple clients simultaneously without polling - Implementing collaborative tools that require bidirectional updates between browser and server - Creating WebSocket-based APIs for mobile or desktop clients that need persistent connections - Adding live notifications or alerts to web applications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ws4py implements the WebSocket protocol (RFC 6455) for Python, enabling bidirectional communication between clients and servers over a single TCP connection. Yes, if you need WebSocket support in Python. The package is stable (Production/Stable status), has no known vulnerabilities, installs with zero dependencies, and is actively maintained. Suitable for production use. ## Install pip install ws4py uv add ws4py poetry add ws4py ## Installing ws4py Before you install: Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release (2024-12-19) and an active repository. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install ws4py from ws4py.client.threadedclient import WebSocketClient client = WebSocketClient('ws://example.com/echo') client.connect() Verify before relying: - Whether the package actively supports Python 3.12 and PyPy despite the 603-day gap since last commit - Current state of CherryPy integration (listed in classifiers but integration details not in excerpt) ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 434.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags websocket protocol implementation, websocket client server library, RFC 6455 websocket, bidirectional socket communication, real-time web communication, websocket python library, persistent connection protocol, websocket, real-time-communication, protocol-implementation [View on SkillFed](https://skillfed.io/packages/ws4py) · [View on PyPI](https://pypi.org/project/ws4py/)