# hhatto/autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.

Repository: https://github.com/hhatto/autopep8
Canonical: https://ross.abutalabs.com/products/autopep8
Homepage: https://pypi.org/project/autopep8/
Language: Python
License: MIT
License Family: permissive
Topics: python, formatter, pep8, codeformatter
Last push: 2026-07-20T12:23:40+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 8, longevity 100
- inputs: {"age_days": 5726, "days_push": 44, "days_rel": 596, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4660, forks 284 (observed 2026-08-28T04:08:56.443139+00:00)

## What it is
autopep8 is a Python tool that automatically formats Python code to conform to the PEP 8 style guide. It uses pycodestyle to detect formatting issues and can fix most of them, either in place or via diff output.

## Use cases
- format python code to pep 8
- auto fix pycodestyle violations
- clean up python code style automatically
- reformat python files before committing
- fix indentation and spacing in python code

## When to choose
- you want automated PEP 8 compliance for Python codebases
- you need to fix pycodestyle-reported issues without manual editing
- you want a lightweight formatter tightly aligned with pycodestyle rules

## When to avoid
- you prefer a faster, more opinionated formatter like Black or Ruff
- you need formatting beyond PEP 8 style rules
- you want a formatter that also enforces linting beyond style issues

## Facets
- artifact type: cli-tool
- maturity: stable
- function: formatter, linter, cli
- domain: developer-tools, programming-languages
- platform: python, cli, cross-platform
- tags: pep8, code-formatting, pycodestyle, python, command-line

## Member repositories
- hhatto/autopep8 (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:56.443139+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:27.047681+00:00, confidence not recorded.
  - readme: https://github.com/hhatto/autopep8 (fetched 2026-08-28T04:08:56.443139+00:00, sha 6b3df2c53199)
  - homepage: https://pypi.org/project/autopep8/ (fetched 2026-08-29T09:03:48.751150+00:00, sha 4b4e8fead74a)
  - registry_pypi: https://pypi.org/pypi/autopep8/json (fetched 2026-08-29T09:03:48.753508+00:00, sha f139e291dc45)
- Data as of 2026-08-30T08:39:29.467469+00:00.
