Skip to main content

Cleanup imports in jupyter notebooks

Project description

### cleanipynb

[![](https://img.shields.io/pypi/v/clean_ipynb.svg)](https://pypi.python.org/pypi/cleanipynb) [![](https://img.shields.io/travis/i008/clean_ipynb.svg)](https://travis-ci.org/i008/clean_ipynb)

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

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page