$npx skillfedfor your agent

reorder-python-imports

Tool for reordering python imports

Worth itPyPI Quality AssuranceReleased Jul 2026147.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — reorder_python_imports-3.17.0-py2.py3-none-any.whl
v3.17.0 · released 2026-07-10 · Python >=3.10 · 1 runtime deps: classify-imports

Yes. Low install friction, permissive MIT license, active maintenance, no known vulnerabilities, and a focused tool that solves a real problem (merge conflicts from import changes). Use it if your team wants deterministic import ordering enforced automatically, especially via pre-commit hooks.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction: pure Python wheel with a single runtime dependency (classify-imports).
  • Active maintenance with a release 35 days ago and 784 repository stars.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.

last release 2026-07-10 (35 days) · last repo commit 2026-07-15 · 784 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,672 downloads/mo, #11,053 on PyPI

Verify before relying

pip install reorder-python-imports

reorder-python-imports myfile.py

# Or add to .pre-commit-config.yaml:
# - repo: https://github.com/asottile/reorder-python-imports
#   rev: v3.17.0
#   hooks:
#   - id: reorder-python-imports
  • Performance characteristics when processing large codebases or files with many imports.
  • How the static analysis approach differs in practice from similar tools on real-world projects.
  • Support for type-checking-only imports and conditional import blocks.
Same gist for agents: .md · .json

What it is and what it does

reorder-python-imports is a command-line tool that automatically reformats Python import statements according to a consistent style designed to minimize merge conflicts. It separates imports into three sections (standard library, third-party, first-party), places import statements before from imports, splits multi-item from imports into individual lines, and removes duplicates. The tool uses static analysis to understand import classification.

It integrates as a pre-commit hook or standalone CLI tool and supports options for Python version targeting (e.g., --py3-plus to remove obsolete __future__ imports), adding or removing specific imports, replacing imports with alternatives, and handling application-specific module paths. The single-import-per-line style allows multiple developers to modify imports without creating merge conflicts, even when editing the same module.

Use it for

  • Enforce consistent import ordering across a team codebase via pre-commit hooks.
  • Automatically remove obsolete __future__ imports when upgrading to newer Python versions.
  • Replace compatibility library imports with modern equivalents automatically.
  • Reduce merge conflicts when multiple contributors add imports to the same file.
  • Rewrite mock and typing imports for newer Python versions automatically.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Low install friction, permissive MIT license, active maintenance, no known vulnerabilities, and a focused tool that solves a real problem (merge conflicts from import changes). Use it if your team wants deterministic import ordering enforced automatically, especially via pre-commit hooks.

Install

reorder-python-imports on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency (classify-imports). Active maintenance with a release 35 days ago and 784 repository stars.

Requires Python 3.10 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.

Quickstart

pip install reorder-python-imports

reorder-python-imports myfile.py

# Or add to .pre-commit-config.yaml:
# - repo: https://github.com/asottile/reorder-python-imports
#   rev: v3.17.0
#   hooks:
#   - id: reorder-python-imports

Verify before relying

  • Performance characteristics when processing large codebases or files with many imports.
  • How the static analysis approach differs in practice from similar tools on real-world projects.
  • Support for type-checking-only imports and conditional import blocks.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
classify-imports
MaintenanceActively maintained 35 days since the last release
Last repo commit
First released
Downloads147,672 / month, #11,053 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: reorder_python_imports-3.17.0-py2.py3-none-any.whl

Tags

Capabilities
python import reorderingorganize python importsimport sorting toolmerge conflict reductionstatic import analysisimport formatterpython code formatter
Topics
import-formattingpre-commit-hookcode-quality

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 › “merge conflict reduction”

  • reorder-python-importsAutomatically reorders Python imports into a standardized format…
  • merge3Implements 3-way merge of text sequences, combining changes from two…
  • django-linear-migrationsEnforces linear migration history in Django projects by tracking the…

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.

Install it if your test suite takes long enough that parallelization would save meaningful time.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.

Install it if you work with CloudFormation templates.

MIT-0pure Python
114.9Mdownloads / mo

See also absolufy-imports · isort · usort · pyupgrade · classify-imports · google-pasta · aspy.refactor-imports · pytest-isort · sort-lines · mo-future