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()

Notebook save and open hooks

Run your own code when a notebook is saved or opened, for example to stamp metadata into every saved notebook:

def stamp(path: str, notebook: dict) -> dict:
    notebook["metadata"]["my_app"] = {"version": "1.2"}
    return notebook

jupyter.notebook_hooks.add_save_hook(stamp)
jupyter.notebook_hooks.add_open_hook(lambda path, notebook: print("opened", path))

Hooks run in the server thread, so keep them quick and marshal any Qt work to the main thread. A hook that raises is logged and skipped; the save still happens.

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.

Metadata

Release files for jupyqt 0.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyqt 0.6.6
File Size Uploaded
jupyqt-0.6.6.tar.gz 83.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyqt 0.6.6
File Interpreter ABI Platform
jupyqt-0.6.6-py3-none-any.whl Python 3 none any Details

Total release size: 117.7 kB

Release files / jupyqt-0.6.6.tar.gz

Download URL jupyqt-0.6.6.tar.gz
Size 83.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b2eb4362ea475cd836f37beadfca96acf3bd4bf4670290c51e25973920d471ac
BLAKE2b-256 checksum
How to use checksums
9cacae266d5af88b6893d5522bfa2de1f532901b99ac867c49b04bfa68f98e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 6, 2026.

Transparency log

Release files / jupyqt-0.6.6-py3-none-any.whl

Download URL jupyqt-0.6.6-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f8b44d0cbe5ff0e045d73db5cc1e423f7a16ed4e8681fa7228e297655825158
BLAKE2b-256 checksum
How to use checksums
33315714335db44ed41200ec0f71e34dfbe60cb9e14551132026170fd26b8f7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.6 This release

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release 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