jupyter-ui-poll
Block jupyter cell execution while interacting with widgets
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-polluv
uv add jupyter-ui-pollpoetry
poetry add jupyter-ui-pollInstalling 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
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
ipywidgetsipywidgets provides interactive HTML widgets…
permissive · top 1,000 on PyPI
ipyflow-coreA reactive Python kernel for Jupyter that…
permissive · top 15,000 on PyPI
ipyfilechooserA Jupyter/IPython widget that lets users browse…
permissive · top 15,000 on PyPI
ipyeventsipyevents provides a Jupyter widget that…
permissive · top 15,000 on PyPI
ipytreeipytree provides a tree-structure widget for…
permissive · top 15,000 on PyPI
juriggedJurigged lets you edit and hot-patch Python…
permissive · top 15,000 on PyPI
widgetsnbextensionProvides the JavaScript frontend and…
permissive · top 1,000 on PyPI
jupyter-nbmodel-clientProgrammatically interact with live Jupyter…
permissive · top 15,000 on PyPI
reactonReacton provides a React-like component model…
permissive · top 15,000 on PyPI
pyiotoolsProvides unified I/O handling for command-line,…
permissive · top 15,000 on PyPI