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
Hashes for clean_notebook-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba94482ce76dbc6a7dfd0b77484ee16cd77ce6d5f4af17441f2a10d15bffa50f |
|
MD5 | a1ca2d6cc7e4e321200c7af8730b0383 |
|
BLAKE2b-256 | 2dc639ed504929e57b2a0929a0a6451eff1846bd33423963fd9ca6ae77acd86f |