autopep8
A tool that automatically formats Python code to conform to the PEP 8 style guide
Decision gist · record as of 2026-08-14
Yes. autopep8 is a stable, actively maintained tool with no known vulnerabilities, low install friction, and permissive licensing. It solves a concrete problem—automated PEP 8 compliance—and is suitable for any Python project that needs style enforcement. Install it if you want to automate formatting rather than enforce it via linting alone.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel and only two runtime dependencies (pycodestyle and tomli).
- The project is actively maintained with recent commits and has been in production use since 2011, supporting current Python versions (3.9+).
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), meaning you can use, modify, and distribute autopep8 freely with minimal restrictions—suitable for both open-source and proprietary projects.
last release 2025-01-14 (577 days) · last repo commit 2026-07-20 · 4,659 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,612,203 downloads/mo, #1,443 on PyPI
Alternatives
Verify before relying
pip install autopep8
autopep8 --in-place --aggressive myfile.py- Whether the tool can be integrated as a library (not just CLI) and what the programmatic API surface looks like
- Performance characteristics when processing large codebases or running recursively across many files
What it is and what it does
autopep8 is a command-line tool that reads Python source files and automatically rewrites them to conform to the PEP 8 style guide. It uses pycodestyle to detect formatting violations—such as incorrect indentation, missing or extraneous whitespace, and improper comment spacing—then applies fixes without altering code logic or multiline string content.
The tool operates in several modes: it can print diffs, modify files in place, process directories recursively, or read from stdin. It supports aggressive modes for non-whitespace changes, selective error fixing via include/exclude lists, and configuration via local or global pep8 config files. It's designed for developers who want automated style compliance without manual formatting work.
Use it for
- Automatically reformat a codebase to meet PEP 8 standards before committing or deploying
- Integrate into CI/CD pipelines to enforce consistent style across pull requests
- Fix formatting violations reported by linters without manually editing each line
- Recursively clean up style issues across an entire project directory
- Apply selective fixes to only certain error categories while leaving others untouched
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
autopep8 is a stable, actively maintained tool with no known vulnerabilities, low install friction, and permissive licensing. It solves a concrete problem—automated PEP 8 compliance—and is suitable for any Python project that needs style enforcement. Install it if you want to automate formatting rather than enforce it via linting alone.
Install
autopep8 on PyPI
Before you install
Low install friction with a pure-Python wheel and only two runtime dependencies (pycodestyle and tomli). The project is actively maintained with recent commits and has been in production use since 2011, supporting current Python versions (3.9+).
License in practice
Licensed under MIT (permissive), meaning you can use, modify, and distribute autopep8 freely with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install autopep8
autopep8 --in-place --aggressive myfile.py
Verify before relying
- Whether the tool can be integrated as a library (not just CLI) and what the programmatic API surface looks like
- Performance characteristics when processing large codebases or running recursively across many files
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespycodestyletomli |
| Maintenance | Actively maintained 577 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,612,203 / month, #1,443 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: autopep8-2.3.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python style guide auto-fix”
- autopep8autopep8 automatically reformats Python code to comply with PEP 8…
- sqlfluffSQLFluff is a SQL linter and auto-fixer that checks SQL code for…
- fixitFixit is a configurable linting framework built on LibCST that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pep8 · pycodestyle · sort-lines · yapf · paragraphs · bashate · autoflake · doc8 · flake8-noqa · codefind