Skip to content
SPECIFICTION
Get listed

autopep8 vs clang-format

autopep8

github.com

clang-format

clang.llvm.org

Side by side

Figureautopep8clang-format
Price from——
Free plan——
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Plans published00
Spec score · Code formatters7.6 (#9)7.7 (#8)
Spec score · Code Formatting Tools7.6 (#19)7.6 (#20)
ConfigurationIt supports configuration through pyproject.toml, setup.cfg, tox.ini, .pep8, and .flake8 files.Formatting styles can be set with command-line options or project-level .clang-format or _clang-format files.
LicensePyPI identifies the project license as MIT License.LLVM releases are distributed under the Apache-2.0 license with LLVM exceptions, which the download page describes as OSI-approved.
LimitBy default, autopep8 makes whitespace changes only; some fixes that can alter code meaning require the `--aggressive` option.Formatting a line range or byte range can only be used with one input file.
Purposeautopep8 automatically formats Python code to conform to the PEP 8 style guide.ClangFormat is a set of tools built on LibFormat for formatting source code, available as a standalone tool and through editor integrations.

In their own words

autopep8

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

Visit github.com

clang-format

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

Visit clang.llvm.org