{"repo":"PyCQA/isort","free":true,"listed":false,"github":"https://github.com/PyCQA/isort","clone":"git clone https://github.com/PyCQA/isort.git","description":"A Python utility / library to sort imports.","language":"Python","stars":6948,"topics":["auto-formatter","isort","sorting-imports","python-utility","cli","linter","cleaner","formatter","python","python3"],"license":"MIT","category":"dev-tools","readme_excerpt":"------------------------------------------------------------------------ [ ][pypi status] [pypi status]: https://pypi.org/project/isort/ Read Latest Documentation - Browse GitHub Code Repository isort your imports, so you don't have to. isort is a Python utility / library to sort imports alphabetically and automatically separate into sections and by type. It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports. It requires Python 3.10+ to run but supports formatting Python 2 code too. - Try isort now from your browser! - Using black? See the isort and black compatibility guide. - isort has official support for pre-commit! Before isort: After isort: Installing isort Installing isort is as simple as: Using isort From the command line : To run on specific files: To apply recursively: If globstar is enabled, isort . is equivalent to: To view proposed changes without applying them: Finally, to atomically run isort against a project, only applying changes if they don't introduce syntax errors: (Note: this is disabled by default, as it prevents isort from running against code written using a different version of Python.) From within Python : or: Installing isort's for your preferred text editor Several plugins have been written that enable to use isort from within a variety of text-editors. You can find a full list of them on the isort wiki. Additionally, I will enthusiastically accept pull requests that include plugins for","default_branch":null,"files":null,"tree":[],"storefront":"/r/PyCQA","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PyCQA/isort/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}