Skip to main content

Tools to maintain a respository of Jupyter notebooks

Project description


nbpages is a command line tool for managing a github repository of Jupyter notebooks. The project was inspired by the tools included with the Python Data Science Handbook by Jake Vanderplas.


pip install nbpages

To upgrade a previously installed version to the latest version

pip install nbpages --upgrade


The nbpages package assumes you have created a public github repository containing one or more Jupyter notebooks in a subdirectory named notebooks. The notebooks must be committed to a github repository before proceeding.

nbpages orders notebooks into a chapter/section heirarchy using a filename prefix. Included filenames must have an prefix wherenn refers to the chapter number or, if a letter, to an Appendix. The second pair of digits mm refers to the section number. Section 00 is reserved to hold the chapter title and any introductory material. The notebooks must also have the usual .ipynb suffix.

Once the notebook repository has been published on github, nbpages setup is performed with the command

nbpages --setup

A directory named templates is created if one doesn't already exist. A configuration file config is created inside the directory using data read from the .git. Jinja templates and notebook_header.jinja are created if they don't already exist. These templates can be edited as required using data fields defined in config.

Normal Usage

Following setup, the normal use of nbpages is to execute the command line


from the top level directory of the notebook repository. Normally this command would be between completing edits or additions to the notebooks and prior to a github commit. The command will

  • add or amend headers and navigation bars in all notebooks,
  • write a table of contents file
  • write a keyword index
  • write using the template file


To help achieve a consistent style over a collection of notebooks, use the command

nbpages --lint

to locate some forms of notebook 'lint'. A current list of additional features can be found

nbpages --help

Table of Contents

Keyword Index

Style Guide

Chapter 1.0 Getting Started with nbcollection

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nbpages, version 0.0.1.dev6
Filename, size File type Python version Upload date Hashes
Filename, size nbpages-0.0.1.dev6.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page