skillfed

jupyter-ui-poll

Block jupyter cell execution while interacting with widgets

jupyter-ui-poll v1.1.0 240.2K downloads/30d#8,908 on PyPI40
Permissive license AGING released

What it is and what it does

jupyter-ui-poll solves a specific problem in Jupyter notebooks: making widget interactions feel synchronous when they are fundamentally asynchronous. When you display widgets and want to wait for user input before running downstream cells, a naive polling loop does not work because the Jupyter kernel only processes one event at a time—widget callbacks never fire while your cell code is running. This library hooks into IPython's kernel event handling to selectively process widget events in a loop while deferring execution of subsequent cells until your poll loop exits.

The package provides a context manager (`ui_events()`) that temporarily intercepts the kernel's cell-execution handler, allowing you to call `poll()` repeatedly to process widget events. When you exit the context, any queued cell-execution requests are replayed in order. This makes it possible to write notebooks that run end-to-end with `Cells → Run All` while still collecting user input at the top.

Use it for:

  • Parameterize a notebook's analysis by collecting user input before running computation cells.
  • Build a multi-step data-entry workflow where each step validates input before allowing the user to proceed.
  • Create an interactive notebook where user actions trigger updates to visualizations in cells below.
  • Implement a notebook that can be run unattended via `Run All` after initial setup, with all user input collected upfront.
  • Develop a Jupyter-based tool that guides users through a workflow using a GUI instead of requiring code cell edits.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Blocks Jupyter cell execution while waiting for user interaction with widgets, enabling synchronous-style polling of widget events within a notebook.

Yes, if you are building an interactive Jupyter notebook that needs to collect user input before running downstream analysis, and you want the notebook to work with `Run All`. The package is stable (Production/Stable status), has no known vulnerabilities, and solves a real problem that is otherwise difficult to implement. Maintenance is aging but the repo is active and the library is narrow in scope, reducing the risk of bit-rot.

Install

jupyter-ui-poll on PyPI

pip

pip install jupyter-ui-poll

uv

uv add jupyter-ui-poll

poetry

poetry add jupyter-ui-poll

Installing jupyter-ui-poll

Before you install

Low friction: pure Python wheel with a single runtime dependency on ipython. Last release was 287 days ago; repo is not archived and remains active, though maintenance pace is aging.

License in practice

Permissive license means you can use, modify, and distribute this package with minimal restrictions in commercial or private projects.

Quickstart

pip install jupyter-ui-poll

from jupyter_ui_poll import ui_events
import time

ui_done = False
def on_click(btn):
    global ui_done
    ui_done = True

with ui_events() as poll:
    while not ui_done:
        poll(10)
        time.sleep(0.1)

Requires Python 3.8 or later and a Jupyter environment with ipython installed.

Verify before relying

  • Whether the package works correctly with all Jupyter frontends or has known limitations.
  • Performance characteristics when polling at high frequency or with many concurrent widgets.
  • Compatibility with recent ipython versions beyond what classifiers indicate.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — ipython
Maintenance aging — 287 days since the last release
Last repo commit
First released
Downloads 240,190/month — #8,908 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jupyter_ui_poll-1.1.0-py3-none-any.whl

Keywords: jupyter, ipywidgets

Development Status :: 5 - Production/StableFramework :: JupyterIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

jupyter widget blockingjupyter cell execution pausenotebook interactive pollingjupyter ui event loopblocking gui jupyterwidget callback pollingjupyter input waiting
jupyter-interactivewidget-polling

More Application Frameworks packages