autopep8
Input—per 1M tokens
Output—per 1M tokens
Context—tokens
WeightsClosed
About
autopep8 is ranked #1 of 34 in code formatting tools on Inferse. It runs on API, Linux, macOS, Windows.
Compared on code formatting tools
- Free plan
- Yesgithub.com
- Supported languages
- Pythongithub.com
- Supported platforms
- OS independentgithub.com
- Editor integration
- Nogithub.com
- Ignore files
- Yesgithub.com
- Changed-lines formatting
- Yesgithub.com
- Library API
- Yesgithub.com
- License model
- open_sourcegithub.com
Facts
- Purpose
- autopep8 automatically formats Python code to conform to the PEP 8 style guide.github.com · 3 Oct 2026
- How it works
- It uses pycodestyle to identify formatting issues and can fix most issues that pycodestyle reports.github.com · 3 Oct 2026
- Installation
- The project documents installation with `pip install --upgrade autopep8`.github.com · 3 Oct 2026
- Requirements
- autopep8 requires pycodestyle.github.com · 3 Oct 2026
- Fixes
- Listed fixes include indentation, whitespace, blank lines, imports, line length, and selected code style issues.github.com · 3 Oct 2026
- Change controls
- The tool supports selecting or ignoring fix codes, setting a maximum line length, and enabling more aggressive changes.github.com · 3 Oct 2026
- Configuration
- It supports configuration through pyproject.toml, setup.cfg, tox.ini, .pep8, and .flake8 files.github.com · 3 Oct 2026
- Integration
- autopep8 can be used as a pre-commit hook.github.com · 3 Oct 2026
- Programming interface
- The project documents using autopep8 as a Python module through its `fix_code()` function.github.com · 3 Oct 2026
- Limit
- By default, autopep8 makes whitespace changes only; some fixes that can alter code meaning require the `--aggressive` option.github.com · 3 Oct 2026
- Compatibility
- PyPI lists Python >=3.9 as a requirement and classifies the operating system as OS Independent.pypi.org · 3 Oct 2026
- Audience
- PyPI classifies the intended audience as developers and the environment as console.pypi.org · 3 Oct 2026
- License
- PyPI identifies the project license as MIT License.pypi.org · 3 Oct 2026
- Support and maintenance
- The project links to GitHub Issues and lists two PyPI maintainers.github.com · 3 Oct 2026
- Change control
- By default, autopep8 makes whitespace changes; non-whitespace fixes can be enabled with the aggressive option.github.com · 3 Oct 2026
- Windows
- The configuration documentation refers to a Windows environment and its `~\.pycodestyle` global configuration file.github.com · 3 Oct 2026
- Python requirement
- The package metadata requires Python 3.9 or newer.pypi.org · 3 Oct 2026
- Intended audience
- PyPI classifies the package for developers and lists its environment as Console.pypi.org · 3 Oct 2026
Best autopep8 alternatives
See all 12
7.2 pgFormatter Free free plan, no paid price published Free plan
7.2 Prettier Free free plan, no paid price published Free plan
6.0 Black Free free plan, no paid price published Free plan
6.0 clang-format See plans price on the maker's page
6.0 rustfmt Free free plan, no paid price published Free plan
5.9 Accessibility Test Framework for Android Free free plan, no paid price published Free plan Where it ranks on Inferse
Sources
- github.com/hhatto/autopep8· checked 3 Oct 2026
- pypi.org/project/autopep8/· checked 3 Oct 2026
