A simple package to clean Jupyter notebooks
Project description
Clean up notebook
A simple command to clean up your Jupyter notebooks.
Usage
If you want to run this tool in a CLI, pipx is advised.
pipx install clean-notebook
To use clean-notebook
with pre-commit, add this to your .pre-commit-config.yaml
:
- repo: https://github.com/hoxbro/clean_notebook
rev: "" # Use the sha / tag you want to point at
hooks:
- id: clean-notebook
Configuration
To clean a notebook run the command clean-notebook example.ipynb
or if you want to do it for multiple files clean-notebook example1.ipynb example2.ipynb
.
The following arguments are supported --dry-run
to not overwrite the file and --keep-empty
to keep empty cells. If you want not to delete a specific metadata key, the -i
/--ignore
argument can be used. If more keys should be ignored: clean-notebook . -i tags -i slideshow
.
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
File details
Details for the file clean_notebook-0.1.12.tar.gz
.
File metadata
- Download URL: clean_notebook-0.1.12.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4aa4eafa15b02ab6a56ff8cb4369cde5ff799bd4b441d23135461437d4cae9d3 |
|
MD5 | 9e032fa6f420d72ac5d155b98150bb92 |
|
BLAKE2b-256 | 2bbcc5ea602f6c7e84030656666aa0b623e541789db6318ac2b754fa2524a6ef |
File details
Details for the file clean_notebook-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: clean_notebook-0.1.12-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da1e051f569c5b963edc37a8b6961725ea4cefa9f99bfdd58c2ed6c88edbc8c5 |
|
MD5 | 6ac25c75b8b06ae23f432322836644c0 |
|
BLAKE2b-256 | a090c0e6f312c05edd36f2b9dbb585e769a2684b7f75a732f9e95e045c583a7a |