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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jupyter_reorder_python_imports-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16895fe15a12063876e886f59f7ab327e89e7891a4159237c0e93fd5cb1d540d |
|
MD5 | 1eae3bf86a4697736477992a3aa57ba1 |
|
BLAKE2b-256 | 244af564802f51aaf138c7dca7c5ff95d6f57308f98770936cc9dea9b1569183 |
Hashes for jupyter_reorder_python_imports-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9efa898ac8cce9de8253661acb8761706c18c5902e6dade25d279c7a0ba2a6a |
|
MD5 | e900c6bef9a395c72496022cc9de2c82 |
|
BLAKE2b-256 | 56ac1da775fc27c9917f62249b84933d79f082af6ecb25fa5ea684185afdcc26 |