Awesome Python Code Formatters
A curated list of awesome Python code formatters
Code formatters
- 2to3 -- Automated Python 2 to 3 code translation.
- add-trailing-comma -- A tool to automatically add trailing commas to calls and literals.
- autoflake -- Removes unused imports and unused variables as reported by pyflakes.
- autopep8 -- A tool that automatically formats Python code to conform to the PEP 8 style guide.
- black -- The uncompromising Python code formatter.
- com2ann -- Translates type comments to type annotations.
- decrapify -- Some scripts that use pybowler.io for refactoring Python code.
- docformatter -- Formats docstrings to follow PEP 257.
- eradicate -- Removes commented-out code from Python files.
- isort -- A Python utility / library to sort imports.
- prettier -- An opinionated code formatter, not only for Python.
- pybetter -- Tool for fixing trivial problems with your code.
- pyupgrade -- A tool to automatically upgrade syntax for newer versions of the language.
- reindent.py -- Change Python (.py) files to use 4-space indents and no hard tab characters.
- star-destroyer -- Eliminates
import *from your modules. - teyit -- Unittest assertion formatter.
- unify -- Modifies strings to all use the same quote where possible.
- yapf -- Yet another Python code formatter from Google.
Improvements and wrappers
- black-macchiato -- paints part of your python code black.
- blacken-docs -- Run
blackon python code blocks in documentation files. - brunette -- best practice Python code formatter, wrapper around
blackwith improvements. - gray -- wrapper around
isort,pyupgrade,add-trailing-comma, andunify. - jupyterlab_code_formatter -- A universal code formatter for JupyterLab.
- pyformat -- wrapper around
autopep8,autoflake,docformatter, andunify. - shed -- wrapper around
autoflake,black,com2ann,isort,pybetter,pyupgrade, andteyit; with fully automatic configuration andblacken-docs-inspired support for code in docs files too.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
