Clean Jupyter notebooks for versioning
Project description
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. To remove the filter, run:
nb-clean unconfigure-git
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
Copyright
Copyright © 2017-2018 Scott Stevenson.
nb-clean is distributed under the terms of the ISC licence.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nb-clean-1.1.0.tar.gz.
File metadata
- Download URL: nb-clean-1.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b934d2de0d2625abfff49f33a4371aa9787a510e5be7f5288e98143a5092412
|
|
| MD5 |
ab20388a813897fbe100937f8a2e02db
|
|
| BLAKE2b-256 |
e506e353b418e0f4dce580872de72b9132fda573edee9e13d5f2a40703f6c09f
|
File details
Details for the file nb_clean-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: nb_clean-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5589a08d094c9205a5f02ee540932e8fe91d2443deca7f69f0fbe81be8f61053
|
|
| MD5 |
d8a93556865aa94ae40d80fb5d4e4983
|
|
| BLAKE2b-256 |
8978f9ba1917a296bd73e218b2197ab8380c2774ba4fe658861335b971bc39cf
|