skillfed

nbtoolbelt

Tools to work with Jupyter notebooks

nbtoolbelt v2026.4.1 201.8K downloads/30d#9,660 on PyPI
Permissive license MIT License Copyright (c) 2017 - Eindhoven University of Technology, The Netherlands Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) Active released

What it is and what it does

nbtoolbelt is a suite of utilities for working with Jupyter notebooks at scale, available both as command-line scripts and as importable library functions. It wraps nbformat, nbconvert, jupyter-client, and data libraries (numpy, pandas) to provide operations like validation against the notebook schema, statistical summaries, content extraction, and execution with optional pre/post-processing. The package is particularly useful for educators and researchers who need to automate notebook workflows—validating student submissions, generating exercise templates with fill-in-the-blank sections (the 'punch' tool), or batch-processing collections of notebooks for analysis or transformation.

The tool is production-stable (Development Status 5) and has been maintained since 2017. It targets developers, educators, scientists, and system administrators. All operations are available through a single command-line entry point (nbtb) with per-tool options, or as library calls for integration into larger Python workflows.

Use it for:

  • Validate a batch of student-submitted notebooks against the Jupyter schema before grading or processing.
  • Generate exercise notebooks by punching holes into template notebooks and distributing them for students to fill in.
  • Extract and summarize statistics from a collection of notebooks (cell counts, execution time, output sizes).
  • Concatenate multiple notebooks into a single document for report generation or archival.
  • Clean notebooks by removing execution outputs, metadata, or specific cell types before version control or sharing.
  • Execute a notebook with automatic pre-cleaning and post-processing as part of a data pipeline or CI workflow.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

nbtoolbelt provides command-line and library tools for validating, inspecting, cleaning, executing, splitting, and concatenating Jupyter notebooks, plus a specialized tool for creating exercise notebooks with fill-in-the-blank sections.

Yes. nbtoolbelt is a mature, actively maintained utility for Jupyter notebook automation with low install friction, no security vulnerabilities, and a permissive MIT license. Install it if you regularly work with multiple notebooks, need to validate or batch-process them, or want to automate notebook-based workflows (especially in education or research). It is not necessary for casual single-notebook use.

Install

nbtoolbelt on PyPI

pip

pip install nbtoolbelt

uv

uv add nbtoolbelt

poetry

poetry add nbtoolbelt

Installing nbtoolbelt

Before you install

Low install friction with a pure-wheel distribution. Actively maintained as of 105 days ago with support for current Python versions (3.10–3.13). Runtime dependencies are all well-established Jupyter ecosystem packages.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for both commercial and open-source projects.

Quickstart

pip install nbtoolbelt

from nbtoolbelt import validate
validate('notebook.ipynb')

# Or via command line:
# nbtb validate notebook.ipynb

Requires Python 3.10 or later (supports up to 3.13).

Verify before relying

  • Whether the 'punch' tool for exercise creation integrates with existing learning management systems or grading workflows.
  • Performance characteristics when processing very large notebooks or batch operations on hundreds of files.
  • Availability and completeness of programmatic API documentation beyond the command-line interface.

Package facts

License MIT License Copyright (c) 2017 - Eindhoven University of Technology, The Netherlands Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive)
Python support supports the current Python release (<3.14,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — nbformat, nbconvert, jupyter-client, numpy, pandas
Maintenance actively maintained — 105 days since the last release
First released
Downloads 201,848/month — #9,660 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: nbtoolbelt-2026.4.1-py3-none-any.whl

Keywords: Jupyter notebooks, software tools, education

Development Status :: 5 - Production/StableFramework :: JupyterIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: EducationTopic :: Scientific/EngineeringTopic :: Software Development :: LibrariesTopic :: Utilities

Tags

jupyter notebook command line toolsnotebook validation and inspectionbatch notebook processingnotebook cleaning and formattingnotebook concatenation and splittingjupyter notebook utilitiesexercise notebook generation
jupyternotebook-automationeducation

More Libraries packages