Skip to main content

Clean Jupyter notebooks for versioning

Project description

https://img.shields.io/github/tag/srstevenson/nb-clean.svg?maxAge=2592000 https://img.shields.io/pypi/v/nb-clean.svg?maxAge=2592000

nb-clean cleans Jupyter notebooks of cell execution counts and outputs, preparing them for committing to version control. It provides a Git filter to automatically clean notebooks before they are staged, and can also be used as a standalone tool outside Git or with other version control systems.

Installation

To install the latest release from PyPI, use pip:

pip install nb-clean

nb-clean requires Python 3.6 or later.

Usage

To install a filter in an existing Git repository to automatically clean notebooks before they are staged, run the following from the working tree:

nb-clean configure-git

nb-clean will configure a filter in the Git repository in which it is run, and will not mutate your global or system Git configuration.

Aside from usage from a filter in a Git repository, you can also clean up a Jupyter notebook manually with:

nb-clean clean -i original.ipynb -o clean.ipynb

Project details


Download files

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

Source Distribution

nb-clean-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nb_clean-1.0.0-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nb-clean-1.0.0.tar.gz.

File metadata

  • Download URL: nb-clean-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nb-clean-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf84fff65fbe0578549710ad637aa95f900c6976be84cb9894a440a1ab830191
MD5 ce78ab9dd27de550d5e5426c4455a431
BLAKE2b-256 ce72ea6ad879ff0bef8fd747412ab34eb90280767eea451b2fdaf8faa8306ace

See more details on using hashes here.

File details

Details for the file nb_clean-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nb_clean-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8e6fe3e68d6e675766d941f6895f18e52fb4c12308c176bcff23331e8319d8a2
MD5 9d05c86632450b9a33f35fe0cf8b5df2
BLAKE2b-256 56c5caa5d0740163860727ef3fdfc7f8e665dce9b71c2c696ea4a0387f2b5b26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page