Skip to content
SPECIFICTION
Get listed

autopep8 vs Black

autopep8

github.com

Black

black.readthedocs.io

Side by side

Figureautopep8Black
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Self-hosted—Yes
Plans published01
Spec score · Code formatters7.6 (#9)8.7 (#1)
Spec score · Code Formatting Tools7.6 (#19)8.7 (#1)
InstallationThe project documents installation with `pip install --upgrade autopep8`.Black installs with pip or pipx and requires Python 3.10 or later to run.
LicensePyPI identifies the project license as MIT License.Black is licensed under the MIT license.
Purposeautopep8 automatically formats Python code to conform to the PEP 8 style guide.Black is an opinionated formatter for Python code that follows PEP 8.

Plans

autopep8

No plans published.

autopep8 pricing →

Black

  • BlackFree

Black pricing →

In their own words

autopep8

autopep8 has no write-up on Specifiction yet; its figures are above.

Visit github.com

Black

Black is a free, MIT-licensed formatter for Python code that follows PEP 8. It reformats whole files in place and uses a default line length of 88 characters. Its limited style choices are intended to keep code consistent across projects; indentation style cannot be configured. After formatting, Black checks whether the abstract syntax tree remains effectively equivalent and raises an error if the check fails. Install it with pip; it requires Python 3.10 or newer. The documentation lists editor integrations including Emacs, PyCharm, IntelliJ IDEA, Vim, Neovim, Visual Studio Code and Sublime Text, as well as GitHub Actions and doctest workflows. Notebook formatting is available with the jupyter extra, though Black skips cells containing certain magics or invalid syntax. It also includes blackd, an HTTP server that binds to localhost by default. Black is primarily a command-line tool and does not provide a Python interface. Stable releases preserve formatting within the same calendar year when the options match.

Visit black.readthedocs.io