$npx skillfedfor your agent

classify-imports

Utilities for refactoring imports in python-like syntax.

Worth itPyPI Software DevelopmentReleased Jul 2026382.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — classify_imports-4.5.0-py2.py3-none-any.whl
v4.5.0 · released 2026-07-10 · Python >=3.10

Yes. The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well. Install it if you need to programmatically classify or sort Python imports; skip it if you only need a command-line import formatter. The MIT license and recent activity make it a low-risk choice.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 no runtime dependencies.
  • Active maintenance with a recent release and current Python version support.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you retain the license notice.

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

0 known vulnerabilities (OSV.dev, 2026-08-14) · 382,392 downloads/mo, #7,087 on PyPI

Verify before relying

pip install classify-imports

from classify_imports import import_obj_from_str, sort, classify_base

obj = import_obj_from_str('import sys')
print(classify_base('sys'))  # 'BUILTIN'

partitioned = sort([import_obj_from_str('import sys'), import_obj_from_str('import requests')])
  • Whether the package integrates with common import-sorting tools or is primarily for programmatic use.
  • Performance characteristics when processing large import blocks or files with many imports.
Same gist for agents: .md · .json

What it is and what it does

classify-imports is a Python utility library for parsing and organizing import statements according to standard conventions. It classifies imports into four standard categories—future, builtin, third-party, and application—and provides functions to split compound imports, sort import groups, and determine the classification of any module name. The library works with import objects parsed from Python-like syntax, making it useful for code refactoring tools, linters, and import management scripts.

The package has no external runtime dependencies and is distributed as a pure Python wheel, making installation straightforward. It targets modern Python versions and supports both CPython and PyPy. With active maintenance and recent releases, it is suitable for integration into build pipelines or as a foundation for import-related tooling.

Use it for

  • Automatically organize and group imports in Python files according to standard conventions during code refactoring.
  • Build custom import linting or validation tools that need to classify and partition imports by type.
  • Parse and manipulate import statements programmatically in code generation or AST transformation scripts.
  • Integrate import sorting logic into editor plugins or pre-commit hooks for consistent import organization.
  • Analyze Python codebases to identify and report on import patterns and dependencies.

Worth the install?

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

Worth it

Yes.

The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well. Install it if you need to programmatically classify or sort Python imports; skip it if you only need a command-line import formatter. The MIT license and recent activity make it a low-risk choice.

Install

classify-imports on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with a recent release and current Python version support.

Requires Python 3.10 or later.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you retain the license notice.

Quickstart

pip install classify-imports

from classify_imports import import_obj_from_str, sort, classify_base

obj = import_obj_from_str('import sys')
print(classify_base('sys'))  # 'BUILTIN'

partitioned = sort([import_obj_from_str('import sys'), import_obj_from_str('import requests')])

Verify before relying

  • Whether the package integrates with common import-sorting tools or is primarily for programmatic use.
  • Performance characteristics when processing large import blocks or files with many imports.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 35 days since the last release
Last repo commit
First released
Downloads382,392 / month, #7,087 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: classify_imports-4.5.0-py2.py3-none-any.whl

Tags

Capabilities
python import sortingclassify imports builtin third-partyrefactor import statementsimport statement parserorganize python importsimport grouping utility
Topics
import-refactoringcode-analysis

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 › “python import sorting”

  • classify-importsParses, classifies, and sorts Python import statements into standard…
  • usortμsort sorts Python imports within detected blocks while preserving…
  • pytest-isortA pytest plugin that automatically checks whether imports in Python…

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

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also aspy.refactor-imports · isort · reorder-python-imports · usort · stdlib-list · sqlparse · flake8-import-order · import-deps · stdlibs · pytest-isort