nb-prep

Prepares jupyter notebooks for storing stripped versions in git and sharing results with stakeholders


Keywords
precommit, nbconvert, nbstripout, jupyter, notebook, python, hooks, jupyter-notebook, jupyter-notebooks, precommit-hooks
License
MIT
Install
pip install nb-prep==1.0.2

Documentation

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.