Skip to main content

Reorder python imports for Jupyter notebooks

Project description

jupyter-reorder-python-imports

reorder-python-imports is a great library. Now availble in Jupyter notebook and lab.

What does it do?

Once loaded, automatically format python imports according to reorder-python-imports using their formatting methods.

Quickstart

python -m pip install jupyter-reorder-python-imports.

Import into Jupyter using two methods:

%load_ext jupyter_reorder_python_imports

Or,

import jupyter-reorder-python-imports

jupyter-reorder-python-imports.load()

The latter method allows for specifying min_python_version, which is a tuple specifying the minimum python version to be used for reordering imports. For example, min_python_version=(3,9) specifies that the minimum python version is 3.9, and min_python_version=(3,) specifies python 3.

import jupyter-reorder-python-imports

jupyter-reorder-python-imports.load(min_python_version=(3,9))

TODO

Contribution ideas:

  • Improve testing

Acknowledgements

Of course, thanks to the reorder-python-imports and jupyter teams for their continued work that we all use!

Further, thanks to jupyter-black whose code greatly helped this project.

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

jupyter_reorder_python_imports-0.0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

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