jupyter-nbmodel-client
What it is and what it does
Jupyter NbModel Client is a Python library that connects to a live Jupyter notebook server via WebSocket and allows you to programmatically manipulate notebooks—adding cells, executing code, and retrieving outputs—without directly managing a kernel process yourself. It acts as a remote control for notebooks running on a JupyterLab server, useful for automation, testing, or building tools that need to interact with notebooks as live objects.
The library depends on jupyter-ydoc, nbformat, pycrdt, requests, and websockets to handle notebook synchronization, serialization, HTTP setup, and WebSocket communication. It supports both standalone JupyterLab instances and Datalayer collaborative notebook rooms. Execution requires an active JupyterLab server, a valid authentication token, and an async-capable Python environment.
Use it for:
- Automate notebook cell creation and execution in a running JupyterLab instance for testing or batch processing.
- Build CI/CD pipelines that execute notebook cells and validate outputs without spawning separate kernel processes.
- Create tools or agents that programmatically generate and run Jupyter notebooks on a remote server.
- Integrate notebook execution into larger Python applications that need to interact with live Jupyter environments.
- Test notebook code and visualizations by adding cells, executing them, and capturing results programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Programmatically interact with live Jupyter notebooks over WebSocket, adding and executing cells, and reading their outputs without running a kernel directly.
Yes, if you need to automate or control Jupyter notebooks from Python code. The package is actively maintained, has low install friction, carries a permissive BSD license, and requires only standard dependencies. It is most useful for automation, testing, and integration scenarios where you control or have access to a JupyterLab server. Not suitable if you need to run notebooks in isolation without a live server.
Install
jupyter-nbmodel-client on PyPI
pip
pip install jupyter-nbmodel-clientuv
uv add jupyter-nbmodel-clientpoetry
poetry add jupyter-nbmodel-clientInstalling jupyter-nbmodel-client
Before you install
Low friction install with a pure-Python wheel. Active maintenance as of 2026-08-14 with recent releases. Five runtime dependencies (jupyter-ydoc, nbformat, pycrdt, requests, websockets) are all established packages.
License in practice
BSD 3-Clause License permits commercial and private use with attribution and liability disclaimer; no restrictions on modification or redistribution.
Quickstart
from jupyter_nbmodel_client import NbModelClient, get_jupyter_notebook_websocket_url
ws_url = get_jupyter_notebook_websocket_url(
server_url="http://localhost:8888",
token="MY_TOKEN",
path="test.ipynb"
)
async with NbModelClient(ws_url) as nbmodel:
nbmodel.add_code_cell("print('hello world')")
Requires a running JupyterLab server with a known token and notebook path; async context manager requires an async-capable Python environment (e.g., IPython or Jupyter console).
Verify before relying
- Whether the package works with JupyterLab versions other than those shown in examples
- Performance characteristics when managing many concurrent cells or large notebooks
- Compatibility with Jupyter Server versions and authentication schemes beyond token-based auth
Package facts
| License | BSD 3-Clause License Copyright (c) 2024, Datalayer All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — jupyter-ydoc, nbformat, pycrdt, requests, websockets |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 92,552/month — #13,444 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jupyter_nbmodel_client-1.5.1-py3-none-any.whl
Keywords: Jupyter
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI 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
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
jupyter-kernel-clientConnects to live Jupyter Kernels over HTTP and…
permissive · top 15,000 on PyPI
bash_kernelEnables running and interacting with bash…
permissive · top 15,000 on PyPI
execnbExecutes Jupyter notebook code and captures…
permissive · top 15,000 on PyPI
nbvalA pytest plugin that treats Jupyter notebooks…
permissive · top 15,000 on PyPI
jupyterlite-pyodide-kernelProvides a Python kernel for JupyterLite that…
permissive · top 15,000 on PyPI
ipyflow-coreA reactive Python kernel for Jupyter that…
permissive · top 15,000 on PyPI
jupyter-mcp-serverAn MCP server that exposes Jupyter notebooks…
permissive · top 15,000 on PyPI
nbmakeA pytest plugin that executes Jupyter notebooks…
permissive · top 15,000 on PyPI
jupyter-ui-pollBlocks Jupyter cell execution while waiting for…
permissive · top 15,000 on PyPI
jupyter-mcp-toolsExposes JupyterLab commands as MCP (Model…
permissive · top 15,000 on PyPI