--- id: jupyter-ui-poll version: "1.1.0" license: unclear license_treatment: permissive maintenance: aging --- # jupyter-ui-poll — Block jupyter cell execution while interacting with widgets License: permissive · Maintenance: aging · Downloads: 240.2K/mo ## 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 above — 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 pip install jupyter-ui-poll uv add jupyter-ui-poll 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_current - Install friction: low - Maintenance: aging - Downloads: 240.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags jupyter widget blocking, jupyter cell execution pause, notebook interactive polling, jupyter ui event loop, blocking gui jupyter, widget callback polling, jupyter input waiting, jupyter-interactive, widget-polling [View on SkillFed](https://skillfed.io/packages/jupyter-ui-poll) · [View on PyPI](https://pypi.org/project/jupyter-ui-poll/)