isort

Automatically sorts and organizes Python import statements

Tool
PyPI
v9.0.2
6,963 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 96
Maintenance 96
Community 72
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
83 /100 Excellent
Architecture 85
Code Quality 90
Innovation 68
Learning Curve 88

isort is a widely-adopted Python utility that reorders import statements into a consistent, configurable layout — grouping standard-library, third-party, and local imports into sections, alphabetizing within each, and collapsing or wrapping multi-line imports according to one of several wrap styles. It can be run as a standalone CLI (isort .), as a pre-commit hook, or invoked programmatically via its isort.api module from other tools.

Because raw import ordering is subjective, isort ships built-in compatibility profiles (black, django, google, pycharm, and others) that pre-configure its dozens of settings to match a target formatter or style guide, avoiding the diff-churn that comes from two tools disagreeing about import style. It’s part of the PyCQA (Python Code Quality Authority) family of tools alongside flake8 and pylint, and is commonly paired with Black or Ruff in a formatting pipeline.

What You Get

  • A isort CLI for sorting single files, whole directories, or piped stdin, with --check/--diff modes for CI
  • Built-in compatibility profiles (black, django, google, pycharm, appnexus, and more) to match a project’s formatter
  • A programmatic isort.api module (sort_file, sort_code_string, check_file) for embedding in other tools/linters
  • Configurable import sections, known third-party/first-party lists, and multiple line-wrap styles for long import lines
  • First-class pre-commit hook support and editor/IDE plugin ecosystem (VS Code, PyCharm, vim)
  • A _vendored copy of tomli and other dependencies to keep isort’s own install footprint minimal

Common Use Cases

  • Running isort . (or isort --check . in CI) to enforce consistent import ordering across a Python codebase
  • Wiring isort into pre-commit so import sorting happens automatically before every commit
  • Pairing isort with Black or Ruff using the built-in black profile to avoid the two tools fighting over formatting
  • Cleaning up import statements after large refactors or auto-generated code merges
  • Embedding isort.api.sort_code_string() inside a custom linting or code-generation tool’s own formatting step

Under The Hood

Architecture — main.py handles CLI argument parsing and dispatch, api.py exposes the stable programmatic entry points, core.py/parse.py do the actual import-block parsing and classification, place.py decides which section (stdlib/third-party/first-party/local) an import belongs to using the bundled stdlibs/ module-name database, and wrap.py/wrap_modes.py handle the various supported line-wrapping styles for the final output. Tech Stack — Pure Python 3.10+ with a deliberately small dependency footprint (some dependencies are vendored under _vendored/ to avoid version-conflict issues in the tools that embed isort), packaged with a standard pyproject.toml/setuptools build. Code Quality — The test suite is split into unit, integration, and benchmark directories, giving both fine-grained correctness coverage and end-to-end regression protection against real-world codebases; the project carries full type hints (py.typed) and has been rated “Mature” (Development Status 6) on PyPI for years. API Design — Both the CLI (isort ., isort --check ., isort --profile black .) and the Python API (isort.sort_file(), isort.check_file()) are deliberately minimal for the common case, while dozens of settings remain available via pyproject.toml/setup.cfg/.isort.cfg for teams with specific import-style requirements.

Used by 8 apps in this directory

Python
68%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,722

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 68%
TypeScript 30%
Updated today
C++
68%
Apache 2.0

ClickHouse

Analytics · Data Engineering · Databases

50,569

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
65
Dependency
Built with
C++ 68%
Python 13%
Updated today
TypeScript
74%
Apache 2.0

Fern

Developer Tools

3,822

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
66
Dependency
Built with
TypeScript 74%
Updated today
TypeScript
98%
Other

GrowthBook

Ab Testing Experimentation · Analytics · Developer Tools

8,527

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript 98%
Updated today
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,433

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
88
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 2 days ago
Go
93%
MIT

NornicDB

AI Development · AI Memory · Databases

916

A single graph+vector+temporal database for AI workloads — Neo4j-compatible, sub-millisecond hybrid search, and built-in memory decay.

View details
80
Repo Health
82
Technical
71
Dependency
Built with
Go 93%
Updated today
Python
97%
MIT

Stealth Browser MCP

Developer Tools · Mcp

3,266

An MCP server giving AI agents real, undetectable browser automation — built on nodriver and Chrome DevTools Protocol to navigate sites protected by Cloudflare and other anti-bot systems for automation and testing workflows.

View details
74
Repo Health
66
Technical
73
Dependency
Built with
Python 97%
Updated today
TypeScript
48%
MIT

supermemory

AI Development · AI Memory · Note Taking

31,370

The state-of-the-art memory and context engine for AI agents — ranked #1 on all three major AI memory benchmarks.

View details
88
Repo Health
82
Technical
67
Dependency
Built with
TypeScript 48%
MDX 32%
Python 17%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers