Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Python Import SorterNew to Visual Studio Code? Get it now.
Python Import Sorter

Python Import Sorter

AntiMach

|
35 installs
| (0) | Free
Automatically sort python imports
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Import sorter

A python utilitly for sorting python imports the right way.

CLI Written in Python, extension written in TypeScript.

Repository

Features

Format the whole document or selected sections of it.

Use builtin VSCode formatting options to format the document (Format Document, Format Selection, Editor Formatter, etc.)

Requirements

To run this extension, you must have Python 3.11 or higher and the Python Enviroments extension installed.

Extension Settings

This extension provides the following configurations:

  • python-import-sorter.groups: Specifies the imports to group by.
  • python-import-sorter.format: Specifies the formatter command to run after sorting imports.
  • python-import-sorter.config: Specifies the path to a config file.

Known Issues

Unknown.

Release Notes

[1.0.0]

  • Initial release
  • Automatic import sorting for Python files
  • Custom formatter command configuration through python-import-sorter.format (not set by default, eg.: python -m ruff format -)
  • Configurable import grouping through python-import-sorter.groups setting
  • Configurable arguments through the python-import-sorter.config setting
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft