skillfed

jupyter-nbmodel-client

jupyter-nbmodel-client v1.5.1 92.6K downloads/30d#13,444 on PyPI16
Permissive 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) Active released

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-client

uv

uv add jupyter-nbmodel-client

poetry

poetry add jupyter-nbmodel-client

Installing 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

Framework :: JupyterLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3

Tags

jupyter notebook automationprogrammatic notebook controljupyter websocket clientnotebook cell executionjupyter notebook scripting
jupyter-automationnotebook-scripting

More Software Development packages