Skip to main content

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. If you want remove ending newlines in code cells, use the -s/--strip-trailing-newlines argument.

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

clean_notebook-0.2.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

clean_notebook-0.2.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file clean_notebook-0.2.1.tar.gz.

File metadata

  • Download URL: clean_notebook-0.2.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clean_notebook-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f2914a8c541b37a740ab90412e75291521a20f3c47d4c086eb4aebe489a7e30d
MD5 e97b79c82fdf602ea29bc1b91823aea2
BLAKE2b-256 2db454554163914879c3a45587e06692739a33e7fef7af78611c402cc2348269

See more details on using hashes here.

Provenance

The following attestation bundles were made for clean_notebook-0.2.1.tar.gz:

Publisher: build.yaml on hoxbro/clean_notebook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clean_notebook-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: clean_notebook-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clean_notebook-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c62b6d8b71e67478e8ae24dafa1b3e1b278d13bd3477b24f6dc632d381fd4ef3
MD5 68e2d9e1b30c483450e821d23cef4c8b
BLAKE2b-256 7c32848ef23c7a5cfcf0edff7385ce92047675ac7cbb8f15c991a6bd8b25d7c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clean_notebook-0.2.1-py3-none-any.whl:

Publisher: build.yaml on hoxbro/clean_notebook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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