--- id: jupyter-nbmodel-client version: "1.5.1" 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) license_treatment: permissive maintenance: active --- # jupyter-nbmodel-client License: permissive · Maintenance: active · Downloads: 92.6K/mo ## 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 above — 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 pip install jupyter-nbmodel-client uv add jupyter-nbmodel-client 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_current - Install friction: low - Maintenance: active - Downloads: 92.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags jupyter notebook automation, programmatic notebook control, jupyter websocket client, notebook cell execution, jupyter notebook scripting, jupyter-automation, notebook-scripting [View on SkillFed](https://skillfed.io/packages/jupyter-nbmodel-client) · [View on PyPI](https://pypi.org/project/jupyter-nbmodel-client/)