Skip to main content

Jupyter WebSocket Provider

A Jupyter Server extension that sends the initial file contents to the browser and relays Yjs messages between clients over WebSocket. The browser creates the shared document.

Install from source

You need to have python and npm installed, then enter in a virtual environment:

python -m pip install 'jupyter-builder>=1.2' build
npm install --no-package-lock
npm run build
python -m build

Installation enables the server extension and installs a prebuilt JupyterLab extension. The JupyterLab extension uses jupyter-docprovider to open shared documents through /api/collaboration/session/<path> and /api/collaboration/room/<room-id>. Run this extension in place of jupyter-server-ydoc, which serves the same routes.

JupyterLab's session endpoint issues an opaque UUID as the file ID for each room lifetime. Clients opening the same path, type, and format share that ID while the room is active.

  • The first connection to an empty room receives a JSON text frame with type: "initialize", path, fileType, format, and content. The content is notebook JSON, text, or a base64 string, matching the Jupyter Contents API. Hold the content and send the text frame initialized. The server confirms with an empty Yjs sync step 2 and admits waiting clients. Apply the content before processing that sync frame. If the socket closes before confirmation, discard the pending content so another client can initialize.
  • While the room has clients, the server forwards Yjs messages to every other connection in the same room. A joining client sends its Yjs sync step 1, and connected clients answer with their current state. Clients also handle awareness messages.
  • JupyterLab sends the current contents and path to /api/collaboration/save/<room-id>. The server writes a full snapshot through the Contents Manager and returns HTTP 409 if the room has expired or the requested path no longer matches. If several clients save concurrently, the last write determines the disk contents.
  • Deleting a file through Jupyter Server retires its room and shows an external-change notice in connected tabs. Use Save to original file to restore it, Save As… to choose a destination, or Close tab to close the deleted document. Saves from the retired session are rejected. With a local file Contents Manager, deletions made from the terminal trigger the same notice.
  • With a local file Contents Manager, the server also compares disk content hashes on filesystem changes and before collaborative saves. An external edit retires the room if the hash differs. Use Load from disk to open a fresh room, Save to original file to replace the disk contents with your edits, or Save As… to keep your edits separately.
  • When the last client leaves an initialized JupyterLab room, its file ID expires. The next open gets a new ID and starts from disk. A JupyterLab tab reconnecting with the expired ID gets a session-expired dialog and must reopen the document.

The relay also provides the global awareness room for collaboration presence. To rebuild the prebuilt frontend after editing its source, install the Python jupyter-builder package, run npm install && npm run build, then reinstall the Python package.

Metadata

Release files for jupyter-websocket-provider 0.1.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 jupyter-websocket-provider 0.1.0
File Size Uploaded Provenance Actions
jupyter_websocket_provider-0.1.0.tar.gz 17.9 kB With provenance Details for jupyter_websocket_provider-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-websocket-provider 0.1.0
File Interpreter ABI Platform Actions
jupyter_websocket_provider-0.1.0-py3-none-any.whl Python 3 none any Details for jupyter_websocket_provider-0.1.0-py3-none-any.whl

Total release size: 37.3 kB

Release files / jupyter_websocket_provider-0.1.0.tar.gz

Download URL jupyter_websocket_provider-0.1.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2b1d20c85c50e8032c79a16c52b481a0066ba7d11dc80f8aa3eeb1c052c96491
BLAKE2b-256 checksum
How to use checksums
630fb12ebcf0751eee3c9c2bd5622c3b80b8656aa22e2362772c75312b6f385b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / jupyter_websocket_provider-0.1.0-py3-none-any.whl

Download URL jupyter_websocket_provider-0.1.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e369b3cfabdabc0c37e4070acd8ec12508f437a768735547b1c9b5316269a9b0
BLAKE2b-256 checksum
How to use checksums
ac45c32693107d5017cc1ecda117170e682a05659502650e1fed2b39babfa2ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for jupyter-websocket-provider 0.1.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jupyter_websocket_provider-0.1.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 Nov 27, 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

0.1.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