wslink
Python/JavaScript library for communicating over WebSocket
What it is and what it does
wslink is a websocket library that bridges Python servers and web clients (JavaScript or C++) with a focus on structured, bi-directional communication. It implements two primary patterns: remote procedure calls (RPC), where clients invoke server methods and wait for responses, and publish/subscribe, where clients subscribe to server topics and receive updates without further action. The library handles binary attachments natively as websocket frames, avoiding the serialization overhead of encoding them as text.
The package is built on aiohttp and msgpack for async HTTP handling and efficient message serialization. It targets developers building interactive web applications, scientific visualization tools, or real-time collaborative systems where tight client-server coupling and low latency matter. The main documented user is trame, a framework for building web-based visualization and data applications.
Use it for:
- Build interactive scientific visualization dashboards where a Python backend drives real-time updates to a web frontend.
- Implement remote procedure calls from a JavaScript UI to a Python computation engine with structured request/response handling.
- Stream binary data (images, arrays, sensor readings) from a Python server to web clients without text encoding overhead.
- Create publish/subscribe systems where multiple web clients subscribe to server-generated topics and receive filtered updates.
- Integrate Python data processing pipelines with C++ or JavaScript frontends over a single persistent websocket connection.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
wslink provides bi-directional websocket communication between a Python server and JavaScript or C++ clients, supporting remote procedure calls and publish/subscribe messaging with optional binary attachments.
Yes. wslink is actively maintained, has low install friction, carries a permissive license, and solves a specific problem (structured bi-directional websocket communication with binary support) that is difficult to replicate with standard HTTP or generic websocket libraries. It is suitable for production use in scientific, visualization, and real-time collaboration contexts.
Install
wslink on PyPI
pip
pip install wslinkuv
uv add wslinkpoetry
poetry add wslinkInstalling wslink
Before you install
Low install friction with only two runtime dependencies (aiohttp and msgpack). Actively maintained with a recent release.
License in practice
BSD 3 License (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install wslink
from wslink import server
import aiohttp
Requires Python 3.10 or later.
Verify before relying
- Specific server configuration and port setup examples beyond basic import patterns.
- Performance characteristics under high message volume or large binary attachment sizes.
- Compatibility matrix between specific Python versions and client library versions (JavaScript/C++).
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, msgpack |
| Maintenance | actively maintained — 91 days since the last release |
| First released | |
| Downloads | 883,879/month — #4,816 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wslink-2.5.7-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
ws4pyws4py implements the WebSocket protocol (RFC…
permissive · top 15,000 on PyPI
python-socketioPython implementation of Socket.IO realtime…
permissive · top 1,000 on PyPI
autobahnAutobahn provides WebSocket and WAMP (Web…
permissive · top 5,000 on PyPI
websocketProvides WebSocket protocol support for…
permissive · top 15,000 on PyPI
simple-websocketProvides a straightforward WebSocket server and…
permissive · top 1,000 on PyPI
gevent-websocketProvides WebSocket support for gevent-based…
unclear · top 5,000 on PyPI
pysignalclirestapiPython client library for the Signal Cli REST…
permissive · top 15,000 on PyPI
zwave-js-server-pythonPython client library for communicating with…
permissive · top 15,000 on PyPI
PysherPysher is a Python client library for consuming…
permissive · top 5,000 on PyPI
signalwireSignalWire is a Python client library for…
permissive · top 15,000 on PyPI