Registry / devops / nbdev
library3.0.17pypypi✓ verified 84d ago

nbdev is a Python library that enables a complete literate programming environment, allowing users to develop, test, document, and deploy software using Jupyter Notebooks. It leverages Quarto for powerful documentation generation and provides a robust command-line interface for managing the development workflow. Currently at version 3.0.15, nbdev maintains a rapid release cadence, frequently pushing minor updates and bug fixes.

pip install nbdev
INSTALL
IMPORT
SIG · NBDEV
N
nbdev
devopspythonv3.0.17
Install
7.1s avg
Import
1941ms
Disk
83MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.0.17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 2.038s · 86.6MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.1s · import 1.843s · 88MB
83MB installed
● package 83MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

show_doc
from nbdev.showdoc import show_doc
Commonly imported within notebooks to display docstrings for exported functions/classes.

This quickstart demonstrates the typical nbdev CLI workflow: creating a new project, exporting notebook code to Python modules, running tests, and generating documentation. Remember to manually create/edit a notebook file with '#|export' cells before running `nbdev_export`.

# 1. Create a new nbdev project (run in your terminal) nbdev_new --user "Your Name" --email "your@example.com" --repo-path my_nbdev_project --git-url "https://github.com/your-username/my_nbdev_project" --lib-name my_nbdev_project cd my_nbdev_project # 2. Open 00_core.ipynb (or create a new notebook like `01_utils.ipynb`) # Add a cell with `#|export` at the top and define a function: # #|export # def greet(name): # "Returns a personalized greeting" # return f"Hello, {name}!" # 3. Export your notebooks to Python modules nbdev_export # 4. Test your library nbdev_test # 5. Generate documentation (requires Quarto CLI installed separately) # nbdev_docs serve # To build and serve docs locally
nbdev --version
Debug
Known issues
breakingnbdev v3 introduced significant breaking changes, including a complete rewrite of CLI commands, migration from `settings.ini` to `pyproject.toml` for configuration, and a new directory structure.
fix
Review the official nbdev v3 migration guide. Update CLI commands (e.g., `nbdev_build_lib` -> `nbdev_export`), refactor configuration, and adjust project structure.
affects: 2.x to 3.x
breakingThe notebook frontmatter syntax changed in nbdev v3 to align with Quarto's standards. Old YAML-like frontmatter may no longer be parsed correctly.
fix
Update notebook frontmatter to the new Quarto-compatible format. Consult the nbdev documentation for the correct syntax.
affects: 2.x to 3.x
gotchaNot running `nbdev_install_hooks` after creating or cloning a project can lead to notebooks with dirty outputs being committed to Git, which can cause merge conflicts or unnecessary diffs.
fix
Always run `nbdev_install_hooks` in the root of your nbdev project. This sets up git hooks to automatically clean notebooks on commit.
affects: All versions
gotchaThe `nbdev_docs` command requires the Quarto CLI tool to be installed and available in your system's PATH. nbdev does not install Quarto for you.
fix
Download and install the Quarto CLI from the official Quarto website (quarto.org) for your operating system.
affects: All versions (where docs are generated)
Errors
Common errors & fixes
nbdev_export: command not found
The nbdev package is not installed or its CLI tools are not in your system's PATH.
fix
Ensure nbdev is installed using `pip install nbdev`. If using a virtual environment, activate it before running commands. You may need to restart your terminal.
ModuleNotFoundError: No module named 'your_project_name.core'
This error typically occurs when trying to import a module that hasn't been created yet or isn't in Python's import path. Often, `nbdev_export` hasn't been run, or there's an issue with the project setup.
fix
Run `nbdev_export` from your project's root directory. Ensure your notebook contains cells marked `#|export` and that your `pyproject.toml` (or `settings.py`) correctly defines `lib_name`.
ERROR: QUARTO NOT INSTALLED. Please install quarto from quarto.org.
The `nbdev_docs` command relies on the external Quarto command-line interface, which is not found on your system.
fix
Download and install the Quarto CLI from https://quarto.org/docs/get-started/ for your operating system. Ensure it's added to your system's PATH.
Git command `git diff --name-only --cached --diff-filter=ACM` failed with exit code 128
This often indicates issues with the git hooks managed by nbdev, possibly due to a `.git` directory problem or incorrect hook setup, especially after cloning or moving a repository.
fix
Navigate to your project root and run `nbdev_install_hooks`. If the problem persists, manually check your `.git/hooks` directory or re-initialize git if safe to do so.
Upgrade
Version history
3.0.17latest on PyPI · released May 21, 2026
Audit
Dependencies
fastcorerequiredProvides core utilities and data structures leveraged by nbdev.
Agent activity
10 hits · last 30 days
node
10
Resources
nbdev — pip install nbdev · libregistry