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.

Source Distribution

cleanipynb-0.4.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

cleanipynb-0.4.2-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 2 Python 3

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