# PyCQA/isort

A Python utility / library to sort imports.

Repository: https://github.com/PyCQA/isort
Canonical: https://ross.abutalabs.com/products/isort
Homepage: https://isort.readthedocs.io/
Language: Python
License: MIT
License Family: permissive
Topics: auto-formatter, isort, sorting-imports, python-utility, cli, linter, cleaner, formatter, python, python3, hacktoberfest
Last push: 2026-08-26T21:50:45+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 4748, "days_push": 7, "days_rel": 7, "gap_med": 29, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6947, forks 678 (observed 2026-08-28T04:09:51.672120+00:00)

## What it is
isort is a Python utility and library that automatically sorts imports alphabetically and separates them into sections by type. It ships as a CLI tool, a Python library, and editor plugins, with official pre-commit support.

## Use cases
- sort python imports alphabetically
- automatically organize import statements in my project
- clean up messy import blocks in python files
- enforce consistent import ordering across a codebase
- make isort compatible with black formatting
- run import sorting in pre-commit hooks

## When to choose
- you want automated, deterministic import ordering in Python projects
- you need a formatter that integrates with black, pre-commit, and editors
- you want both a CLI and an embeddable Python library for import sorting

## When to avoid
- you need general-purpose code formatting beyond imports (use black or ruff)
- your project is not Python
- you need a linter for code correctness rather than style

## Facets
- artifact type: cli-tool
- maturity: stable
- function: formatter, linter, cli
- domain: developer-tools
- platform: python, cli, cross-platform
- tags: import-sorting, code-style, pre-commit, python3, auto-formatter, command-line, python

## Member repositories
- PyCQA/isort (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:51.672120+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:13.106231+00:00, confidence not recorded.
  - readme: https://github.com/PyCQA/isort (fetched 2026-08-28T04:09:51.672120+00:00, sha 3e2282115a38)
  - registry_pypi: https://pypi.org/pypi/isort/json (fetched 2026-08-29T08:37:30.688559+00:00, sha fda070f71410)
- Data as of 2026-08-30T08:39:29.467469+00:00.
