Python/JavaScript library for communicating over WebSocket
Project description
wslink: websocket library between a Python server and Web client 
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wslink-2.5.5.tar.gz.
File metadata
- Download URL: wslink-2.5.5.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a378dd518827cc8faee93d120e5d7ee89261570452dd67250cb454888c2447
|
|
| MD5 |
bade61926861db1aaa052183b258513e
|
|
| BLAKE2b-256 |
8c1c287a2de342af09e50656b2863c822a6ff5a528e6986035d05c57f67a7f8a
|
Provenance
The following attestation bundles were made for wslink-2.5.5.tar.gz:
Publisher:
test_and_release.yml on Kitware/wslink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wslink-2.5.5.tar.gz -
Subject digest:
34a378dd518827cc8faee93d120e5d7ee89261570452dd67250cb454888c2447 - Sigstore transparency entry: 1033999860
- Sigstore integration time:
-
Permalink:
Kitware/wslink@452a0b16b75e188e59e2cd2058387f6bd3076f38 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Kitware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_release.yml@452a0b16b75e188e59e2cd2058387f6bd3076f38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wslink-2.5.5-py3-none-any.whl.
File metadata
- Download URL: wslink-2.5.5-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02a783c1a0c0799b89bd5cbb486722474e1c71c80655a5fe0523c2c76cc84e34
|
|
| MD5 |
ad8e76ecd35ba8d69c2b0260af0f0dc3
|
|
| BLAKE2b-256 |
9403a36a6ea6994c6f7a9c05c5351361fb848204988c814cddd1c471400eb21e
|
Provenance
The following attestation bundles were made for wslink-2.5.5-py3-none-any.whl:
Publisher:
test_and_release.yml on Kitware/wslink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wslink-2.5.5-py3-none-any.whl -
Subject digest:
02a783c1a0c0799b89bd5cbb486722474e1c71c80655a5fe0523c2c76cc84e34 - Sigstore transparency entry: 1033999894
- Sigstore integration time:
-
Permalink:
Kitware/wslink@452a0b16b75e188e59e2cd2058387f6bd3076f38 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Kitware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_release.yml@452a0b16b75e188e59e2cd2058387f6bd3076f38 -
Trigger Event:
push
-
Statement type: