Skip to main content

No project description provided

Project description

Clean Py


A small CLI program designed to automatically lint .ipynb and .py source code. Tidy and remove redundant imports (via autoflake), sort imports (via isort), lint and format source code in a standardised way (via black). Additionally, clear all .ipynb cell outputs and execution counts. Forked from KwatMe's orginal repo.


Via pip:

pip install clean-py

Or clone directly:

git clone
cd clean_py
pip install .


Clean a single file:

clean_py a_single_notebook.ipynb

Or recurse within a input dir:

clean_py <input_dir>

Clean with specific features if necessary:

clean_py <input_dir> -py True -isort True -black False -autoflake False


Simple pytesting via:


Multi-venv tox testing via:



  • Update version within
  • Create dist .whl and .tar archives via:
python sdist bdist_wheel

Push to main pypi repo via:

twine upload dist/*

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_py-0.5.tar.gz (4.7 kB view hashes)

Uploaded source

Built Distribution

clean_py-0.5-py3-none-any.whl (5.4 kB view hashes)

Uploaded py3

Supported by

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