pep8
Python style guide checker
What it is and what it does
pep8 is a command-line tool that scans Python source files and reports style violations against PEP 8 conventions. It identifies issues like incorrect whitespace, import formatting, line length, and indentation, outputting results with file location, line number, and error codes that can be parsed by editors and build tools.
The tool is designed to be lightweight—it requires only the Python standard library and can run as a single file—and includes a plugin architecture for adding custom checks. However, as of version 1.7.1 (2017-10-24), the project is no longer maintained under the pep8 name; the maintainers have redirected users to pycodestyle for ongoing fixes and support.
Use it for:
- Automated style checking in CI/CD pipelines to enforce PEP 8 compliance before code merge
- Editor integration to highlight style violations in real-time as you write Python code
- Batch auditing of large codebases to identify and report all style violations with statistics
- Custom linting workflows where you extend pep8 with project-specific style checks via its plugin system
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Checks Python code against PEP 8 style conventions and reports violations with line numbers and error codes.
No. While pep8 is stable and has no known vulnerabilities, it has been abandoned and explicitly marked as superseded. The package itself warns users that it will no longer be released under this name. Install pycodestyle instead, which is the maintained successor.
Install
pep8 on PyPI
pip
pip install pep8uv
uv add pep8poetry
poetry add pep8Installing pep8
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last released 2017-10-24—and includes a warning that pep8 is no longer released under this name and will only be fixed in pycodestyle.
License in practice
Licensed under Expat license (MIT), a permissive open-source license with minimal restrictions on use, modification, and distribution.
Quickstart
pip install pep8
pep8 myfile.py
# Output: myfile.py:69:11: E401 multiple imports on one line
Verify before relying
- Whether pycodestyle is a direct replacement or requires code changes for existing pep8 integrations
- Current compatibility with Python versions beyond 3.5 (last mentioned in changelog)
Package facts
| License | Expat license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,216 days since the last release |
| First released | |
| Downloads | 1,791,812/month — #3,553 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pep8-1.7.1-py2.py3-none-any.whl
Keywords: pep8
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
autopep8autopep8 automatically reformats Python code to…
permissive · top 5,000 on PyPI
pycodestylepycodestyle checks Python code against PEP 8…
permissive · top 1,000 on PyPI
pytest-pep8A pytest plugin that integrates PEP8 style…
permissive · top 15,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
pydocstringformatterAutomatically formats Python docstrings to…
permissive · top 15,000 on PyPI
bashatebashate is a style checker for bash scripts…
permissive · top 15,000 on PyPI
yesqayesqa automatically removes unnecessary `#…
permissive · top 15,000 on PyPI
pytest-flake8A pytest plugin that runs flake8 PEP8…
permissive · top 15,000 on PyPI
check-manifestValidates that a Python package's MANIFEST.in…
permissive · top 5,000 on PyPI