jupyter-ws-tunnel
A WebSocket-shaped client and an ASGI server bridge that transparently falls back to a Jupyter widget comm when a real WebSocket can't be proxied (e.g. hosted Google Colab) — the same client code and the same ASGI app work in both deployments unchanged.
Install
pip install jupyter-ws-tunnel
npm install jupyter-ws-tunnel
Usage
JS — drop-in WebSocket replacement:
import { createSocket } from "jupyter-ws-tunnel";
// pass a widget model to tunnel over its comm; omit it for a real WebSocket
const socket = createSocket("/my-route", model);
socket.onmessage = (event) => console.log(event.data);
Python — attach an existing ASGI app's websocket route to a widget's comm:
from jupyter_ws_tunnel import attach_widget
attach_widget(widget, app) # app is any ASGI3 app already being served
See example/ for a full working demo (a Quart app served both
ways at once).
License
MIT
Release files for jupyter-ws-tunnel 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_ws_tunnel-0.2.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_ws_tunnel-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / jupyter_ws_tunnel-0.2.tar.gz
| Download URL | jupyter_ws_tunnel-0.2.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51b01fea5d0835bc34c5d531b7e6096b44264bcf21aac17793273358775d878e
|
|
BLAKE2b-256 checksum How to use checksums |
00147ff5c92673c4084a6607f8ad35eb08b1f528aa2a7a69cbb8c535b4db429e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
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 Jul 21, 2026.
Transparency logRelease files / jupyter_ws_tunnel-0.2-py3-none-any.whl
| Download URL | jupyter_ws_tunnel-0.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da265438d179b647df7fc9670c2347e91d7352189e7ab765dedb489e162b2e68
|
|
BLAKE2b-256 checksum How to use checksums |
4d2eaefbdb60b0c7a0045f0d869a04088dc2854ed360deec8a425375172748c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
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 Jul 21, 2026.
Transparency log