Skip to main content

wslink: websocket library between a Python server and Web client pypi_download

Wslink allows easy, bi-directional communication between a python server and a javascript or C++ client over a [websocket]. The client can make remote procedure calls (RPC) to the server, and the server can publish messages to topics that the client can subscribe to. The server can include binary attachments in these messages, which are communicated as a binary websocket message, avoiding the overhead of encoding and decoding.

Installing

wslink can be installed with pip wslink or npm install @kitware/wslink:

Usage for RPC and publish/subscribe

The main user of wslink is trame.

  • RPC - a remote procedure call that can be fired by the client and return sometime later with a response from the server, possibly an error.

  • Publish/subscribe - client can subscribe to a topic provided by the server, possibly with a filter on the parts of interest. When the topic has updated results, the server publishes them to the client, without further action on the client's part.

License

wslink is made available under the BSD 3 License. For more details, see LICENSE <https://github.com/Kitware/wslink/blob/master/LICENSE>_

Community

Trame <https://kitware.github.io/trame/>_ | Discussions <https://github.com/Kitware/trame/discussions>_ | Issues <https://github.com/Kitware/trame/issues>_ | Contact Us <https://www.kitware.com/contact-us/>_

Examples

Some examples are provided in the ./examples/* directory to cover the basic of the library.

Development

We recommend using uv for setting up and managing a virtual environment for your development.

# Create venv and install all dependencies
uv sync --all-extras --dev

# Activate environment
source .venv/bin/activate

# Install commit analysis
pre-commit install
pre-commit install --hook-type commit-msg

# Allow live code edit
uv pip install -e .

Build client side code base

cd js-lib
npm install
npm run build
cd -

Commit message convention

Semantic release rely on conventional commits to generate new releases and changelog.

Metadata

Release files for wslink 2.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wslink 2.6.0
File Size Uploaded Provenance
wslink-2.6.0.tar.gz 30.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wslink 2.6.0
File Interpreter ABI Platform
wslink-2.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.9 kB

Security for wslink 2.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wslink-2.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page