nbclient
A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor.
Decision gist · record as of 2026-08-14
Yes. nbclient is actively maintained, has low install friction, carries no known vulnerabilities, and solves a specific problem—programmatic notebook execution—that has no obvious alternative in the standard Jupyter ecosystem. It's appropriate for anyone building automation or tooling around notebooks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and a working Jupyter kernel (typically IPython) installed in the environment.
- Low friction install with four stable runtime dependencies (jupyter-client, jupyter-core, nbformat, traitlets).
- Active maintenance with a recent release 70 days ago and ongoing repository activity.
License · maintenance · safety
permissive license (permissive) — BSD 3-Clause License permits use, modification, and distribution with minimal restrictions; suitable for both open-source and proprietary projects provided copyright and license text are retained.
last release 2026-06-05 (70 days) · last repo commit 2026-06-05 · 186 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 66,296,495 downloads/mo, #485 on PyPI
Alternatives
Verify before relying
pip install nbclient
from nbclient import NotebookClient
from nbformat import read
with open('notebook.ipynb') as f:
nb = read(f, as_version=4)
client = NotebookClient(nb)
client.execute()- Whether nbclient can execute notebooks with specific kernel types or only standard Python kernels
- Performance characteristics when executing large or long-running notebooks
- Error handling and recovery behavior when notebook cells fail during execution
What it is and what it does
nbclient is a Python library that runs Jupyter notebooks programmatically outside the Jupyter interface. It was extracted from nbconvert's ExecutePreprocessor to provide a standalone tool for executing notebooks in different contexts—from command-line scripts to automated pipelines. The library depends on jupyter-client to manage kernel communication, jupyter-core for core Jupyter infrastructure, nbformat to read and write notebook files, and traitlets for configuration.
You use nbclient when you need to execute notebooks as part of a larger workflow—testing notebooks, generating reports, running batch jobs, or integrating notebook execution into applications. It handles cell execution, captures outputs, and manages the kernel lifecycle, letting you treat notebooks as executable code rather than interactive documents.
Use it for
- Automated testing of notebook code to verify correctness and catch regressions
- Batch processing where notebooks generate reports or analyses on a schedule
- Continuous integration pipelines that execute notebooks as part of build/test steps
- Data pipeline orchestration where notebooks are individual processing stages
- Documentation generation from executable notebooks with live outputs
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
nbclient is actively maintained, has low install friction, carries no known vulnerabilities, and solves a specific problem—programmatic notebook execution—that has no obvious alternative in the standard Jupyter ecosystem. It's appropriate for anyone building automation or tooling around notebooks.
Install
nbclient on PyPI
Before you install
Low friction install with four stable runtime dependencies (jupyter-client, jupyter-core, nbformat, traitlets). Active maintenance with a recent release 70 days ago and ongoing repository activity.
Requires Python 3.10 or later and a working Jupyter kernel (typically IPython) installed in the environment.
License in practice
BSD 3-Clause License permits use, modification, and distribution with minimal restrictions; suitable for both open-source and proprietary projects provided copyright and license text are retained.
Quickstart
pip install nbclient
from nbclient import NotebookClient
from nbformat import read
with open('notebook.ipynb') as f:
nb = read(f, as_version=4)
client = NotebookClient(nb)
client.execute()
Verify before relying
- Whether nbclient can execute notebooks with specific kernel types or only standard Python kernels
- Performance characteristics when executing large or long-running notebooks
- Error handling and recovery behavior when notebook cells fail during execution
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesjupyter-clientjupyter-corenbformattraitlets |
| Maintenance | Actively maintained 70 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 66,296,495 / month, #485 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 |
Evidence: nbclient-0.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “execute jupyter notebooks programmatically”
- nbclientnbclient executes Jupyter notebooks programmatically in different…
- execnbExecutes Jupyter notebook code and captures outputs without running a…
- jupyter-nbmodel-clientProgrammatically interact with live Jupyter notebooks over WebSocket,…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
nbconvert converts Jupyter notebooks (.ipynb files) to static formats including HTML, LaTeX, PDF, Markdown, ReStructuredText, Reveal.js, and executable scripts via command-line or programmatic interface.
Install it if you need to convert notebooks to static formats or automate notebook publishing.
Implements the Jupyter protocol and provides client and kernel management APIs for launching, communicating with, and managing Jupyter kernels.
Install it if you are building Jupyter frontends, managing kernels programmatically, or integrating interactive computation into applications.
Caches Jupyter notebook execution outputs to avoid re-running notebooks with deterministic outputs, enabling fast rebuilds of documentation and notebooks that depend on long-running computations.
A pytest plugin that executes Jupyter notebooks as tests, with support for parallel execution, cell-level error handling, timeouts, and optional output writeback for documentation builds.
Jupyter Notebook is a web-based interactive computing environment that lets you create and run code, visualizations, and documentation in a single browser-based interface, supporting multiple programming languages through pluggable kernels.
Install it if you need an interactive notebook environment for exploration, education, or reproducible research.
Returns the filename or full path of the currently running Jupyter notebook when executed in a browser-based notebook environment.
However, be aware that maintenance is aging (last release 362 days ago) and the package has known limitations outside browser notebooks, so verify it works with your…