No project description provided
Project description
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
Project details
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 jupyter_ws_tunnel-0.1.2.tar.gz.
File metadata
- Download URL: jupyter_ws_tunnel-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec3144b969ca00e63db89dcb6bc905329993a242aa945c0d3f5cacc77837bdf
|
|
| MD5 |
fa98792e7eb8130974c74d88b780883b
|
|
| BLAKE2b-256 |
60bf83859e7d9cbfc5f50894705dd91cd30728e27c4d8a454a0141687f4b7e2f
|
Provenance
The following attestation bundles were made for jupyter_ws_tunnel-0.1.2.tar.gz:
Publisher:
publish-pypi.yml on hexane360/jupyter-ws-tunnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_ws_tunnel-0.1.2.tar.gz -
Subject digest:
eec3144b969ca00e63db89dcb6bc905329993a242aa945c0d3f5cacc77837bdf - Sigstore transparency entry: 2188191432
- Sigstore integration time:
-
Permalink:
hexane360/jupyter-ws-tunnel@ff0edf0f79d95cb7b012b0357cda3eb9d978b0fa -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hexane360
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff0edf0f79d95cb7b012b0357cda3eb9d978b0fa -
Trigger Event:
release
-
Statement type:
File details
Details for the file jupyter_ws_tunnel-0.1.2-py3-none-any.whl.
File metadata
- Download URL: jupyter_ws_tunnel-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74e3594ceb90ee9e90f7cff5a98459226ee26fe74c929f9f5248c057bb155271
|
|
| MD5 |
8319cfbcdde9dbab450db24a1e61f2db
|
|
| BLAKE2b-256 |
cf3e980d2fcc1a690d7f6f02bdf5a81e6b882c8ede2fe8cf3cc731c85c493a74
|
Provenance
The following attestation bundles were made for jupyter_ws_tunnel-0.1.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on hexane360/jupyter-ws-tunnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_ws_tunnel-0.1.2-py3-none-any.whl -
Subject digest:
74e3594ceb90ee9e90f7cff5a98459226ee26fe74c929f9f5248c057bb155271 - Sigstore transparency entry: 2188191443
- Sigstore integration time:
-
Permalink:
hexane360/jupyter-ws-tunnel@ff0edf0f79d95cb7b012b0357cda3eb9d978b0fa -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hexane360
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff0edf0f79d95cb7b012b0357cda3eb9d978b0fa -
Trigger Event:
release
-
Statement type: