isort
A Python utility / library to sort Python imports.
Decision gist · record as of 2026-08-14
Yes. isort is a mature, actively maintained tool with zero dependencies, low install friction, and permissive licensing. It solves a real code-quality problem and is widely used in professional Python projects. Install it if your team cares about import ordering or you want to automate this aspect of code review.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later to run, though it can format Python 2 code.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained with recent commits and a mature codebase since 2013.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute isort freely in commercial and private projects with minimal restrictions.
last release 2026-02-28 (167 days) · last repo commit 2026-08-11 · 6,949 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 133,848,740 downloads/mo, #286 on PyPI
Alternatives
Verify before relying
pip install isort
# Command line:
isort mypythonfile.py
# Or from Python:
import isort
isort.file("mypythonfile.py")- Whether the package integrates with specific IDEs beyond the editor plugins mentioned.
- Performance characteristics on very large codebases or projects with thousands of files.
- How the --atomic flag behaves with different Python versions in practice.
What it is and what it does
isort is a Python utility that automatically sorts and organizes import statements in your code. It groups imports into logical sections, sorts them alphabetically within each section, and can wrap long import lines across multiple lines with configurable formatting. You can use it as a standalone command-line tool to process files or directories, or import it as a library within your own Python code. It integrates with pre-commit hooks and has editor plugins for popular text editors.
The package is designed to enforce consistent import ordering across a codebase without manual effort. It supports extensive configuration options for customizing how imports are grouped, wrapped, and indented, and can be used in CI/CD pipelines to verify that imports are correctly formatted. It also works alongside other formatters and can skip specific imports or entire files when needed.
Use it for
- Enforce consistent import ordering across a team codebase in CI/CD pipelines using the --check-only flag.
- Automatically format imports in a Python project directory recursively with a single command.
- Integrate import sorting into a pre-commit git hook to catch unsorted imports before they are committed.
- Programmatically sort imports within a larger code-processing tool or linting framework.
- Format Python 2 code imports even when running isort under Python 3.10+.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
isort is a mature, actively maintained tool with zero dependencies, low install friction, and permissive licensing. It solves a real code-quality problem and is widely used in professional Python projects. Install it if your team cares about import ordering or you want to automate this aspect of code review.
Install
isort on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a mature codebase since 2013.
Requires Python 3.10 or later to run, though it can format Python 2 code.
License in practice
MIT license (permissive): you can use, modify, and distribute isort freely in commercial and private projects with minimal restrictions.
Quickstart
pip install isort
# Command line:
isort mypythonfile.py
# Or from Python:
import isort
isort.file("mypythonfile.py")
Verify before relying
- Whether the package integrates with specific IDEs beyond the editor plugins mentioned.
- Performance characteristics on very large codebases or projects with thousands of files.
- How the --atomic flag behaves with different Python versions in practice.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 167 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 133,848,740 / month, #286 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Utilities |
Evidence: isort-8.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sort python imports”
- isortisort sorts Python imports alphabetically and automatically separates…
- usortμsort sorts Python imports within detected blocks while preserving…
- aspy.refactor-importsParses, classifies, and manipulates Python import statements as…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pytest-isort · reorder-python-imports · classify-imports · flake8-isort · usort · aspy.refactor-imports · uv-sort · flake8-tidy-imports · sort-lines · flake8-import-order