skillfed

wslink

Python/JavaScript library for communicating over WebSocket

wslink v2.5.7 883.9K downloads/30d#4,816 on PyPI
Permissive license Active released

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 wslink

uv

uv add wslink

poetry

poetry add wslink

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering

Tags

websocket server client communicationpython javascript rpcpublish subscribe messagingbi-directional websocketremote procedure call librarywebsocket binary attachmentspython web client protocol
websocketrpcreal-time-communication

More Scientific/Engineering packages