Skip to main content

jupyqt

ci documentation pypi version

Embed JupyterLab in PySide6 applications — no ipykernel, no ZMQ, no qasync.

Features

  • Background-thread kernel — cell execution never blocks the Qt event loop
  • Top-level await — async/await works in notebook cells out of the box
  • Qt proxy — safely manipulate Qt widgets from notebook code
  • jupyverse server — full JupyterLab UI via QWebEngineView or external browser

Installation

pip install jupyqt

With uv:

uv add jupyqt

Quick start

from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
from jupyqt import EmbeddedJupyter

app = QApplication([])
window = QMainWindow()

jupyter = EmbeddedJupyter()
jupyter.shell.push({"greeting": "Hello from jupyqt!"})
jupyter.start()

central = QWidget()
QVBoxLayout(central).addWidget(jupyter.widget())
window.setCentralWidget(central)
window.show()

app.exec()
jupyter.shutdown()

Exposing Qt objects to the notebook

Wrap Qt objects with wrap_qt() so notebook cells can safely call methods on the main thread:

jupyter.push({
    "window": jupyter.wrap_qt(main_window),
    "label": jupyter.wrap_qt(some_label),
    "do_stuff": my_function,
})

Then in a notebook cell:

window.setWindowTitle("Controlled from Jupyter!")
label.setText("Updated from a cell")

import asyncio
for i in range(5):
    await asyncio.sleep(0.5)
    do_stuff()

Examples

# Minimal smoke test
uv run python examples/minimal_app.py

# Full demo with exposed UI, counter widget, and demo notebook
uv run python examples/demo_app.py

Architecture

┌─────────────────────────────────────┐
│  JupyterLabWidget (QWebEngineView)  │  ← Qt main thread
└───────────────┬─────────────────────┘
                │ HTTP / WebSocket
┌───────────────┴─────────────────────┐
│  jupyverse (fps + anyio)            │  ← server thread
└───────────────┬─────────────────────┘
                │ anyio MemoryObjectStreams
┌───────────────┴─────────────────────┐
│  Wire Protocol + InteractiveShell   │  ← kernel thread (asyncio)
└───────────────┬─────────────────────┘
                │ QtProxy (blocking invoke)
┌───────────────┴─────────────────────┐
│  Host Qt Application                │  ← Qt main thread
└─────────────────────────────────────┘

Three threads, no shared event loop, no reentrancy.

Known limitations

  • Concurrent uploads to the same path aren't safe. The file-browser upload handler assembles chunked uploads by path, not by upload session — re-dragging the same file while an upload is still in flight, or retried/out-of-order chunks, can silently produce a corrupted file. Uploading distinct files concurrently is unaffected.
  • PDF / WebPDF notebook export need extra tooling nbconvert doesn't bundle. "Export Notebook As → PDF" requires a LaTeX toolchain (e.g. TeX Live with xelatex) on the host machine; "WebPDF" requires Playwright. Neither is installed by jupyqt — install them separately if you need those export formats. HTML, Markdown, and script export work out of the box.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyqt-0.6.4.tar.gz (80.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyqt-0.6.4-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file jupyqt-0.6.4.tar.gz.

File metadata

  • Download URL: jupyqt-0.6.4.tar.gz
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jupyqt-0.6.4.tar.gz
Algorithm Hash digest
SHA256 24efedf3a5249817c9a033877e44755ca962497caf175656bd756ecc0a5df3ba
MD5 b59828a579d5c43a2ef4b35284cc8bda
BLAKE2b-256 abb626fcade38567cc15e2bf0143020c67ec9bde3568bf11b69a2d8ab64a9aa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyqt-0.6.4.tar.gz:

Publisher: release.yml on SciQLop/jupyqt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jupyqt-0.6.4-py3-none-any.whl.

File metadata

  • Download URL: jupyqt-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jupyqt-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 096bc45c59323f072136cdff8a750f0ba8acdd90050978669435745acb6a8a61
MD5 04525611c3c5ed1b2c67a33d375705f0
BLAKE2b-256 5792b27e8b0486206d8ee7a69d33d8dc81b66d6958681355fc884b04846751b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyqt-0.6.4-py3-none-any.whl:

Publisher: release.yml on SciQLop/jupyqt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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