Skip to content

Unit tests PyPI - Python Version PyPI PyPI - Downloads GitHub contributors PyPI - License

nb_prep

nb_prep automates preparing jupyter notebooks for sharing and storage.

You can use the nb_prep CLI to:

  • Convert jupyter notebooks to HTML (using nbconvert) and:
    • add a date prefix to the filename.
    • add a git hash suffix to the filename.
    • move the HTML file to a configured output directory
  • Strip jupyter notebooks of all cell outputs (using nbstripout)

You can also configure nb_prep once as a pre- and post-commit hook and have notebook output automatically prepared every time you git commit.

nb_prep is a useful automation tool when you have a lot of analysis notebooks in git that you want to share with stakeholders. If your main interest is preparing clean notebooks for storing in git commits, consider using jupytext instead.

Installation

pip install nb_prep

Documentation

See allianz-direct.github.io/nb_prep.


Last update: 2022-01-20