Skip to main content

Cleanup imports in jupyter notebooks

Project description

### cleanipynb

[![](]( [![](](

This package will cleanup your jupyter notebook by:

  • removing unused imports (globally)
  • moving all imports to the first cell and reordering them
  • reformatting your code with autopep8

All this with preserving the cell structure thanks to jupytext smart export to python features.

> WARNING: Cleaning happens in-place - Be careful

### Usage:

`bash pip install cleanipynb cleanipynb path_to_your_notebook.ipynb `

### Demo: ![](beforeafter.gif)

### Credits:

  • jupytext
  • importanize
  • autoflake
  • autopep8

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cleanipynb, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size cleanipynb-0.4.2-py2.py3-none-any.whl (4.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size cleanipynb-0.4.2.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page