pep8-naming
Check PEP-8 naming conventions, plugin for flake8
What it is and what it does
pep8-naming is a flake8 plugin that enforces PEP 8 naming conventions across your Python codebase. When installed alongside flake8, it automatically becomes available and checks for naming violations: class names should use CapWords, functions and variables should be lowercase, method arguments should follow specific patterns (cls for classmethods, self for instance methods), and imports should preserve the naming style of their source. It emits error codes N801 through N818 to identify specific violations.
The plugin integrates seamlessly into your existing flake8 workflow—once installed, it runs without additional configuration. It provides options to ignore specific names or patterns (useful for test frameworks that use setUp/tearDown conventions), and to recognize custom decorators as classmethods or staticmethods to avoid false positives. It supports Python 3.9+ and has been maintained since 2013.
Use it for:
- Enforce consistent naming style across a team's codebase during CI/CD by adding pep8-naming checks to your flake8 configuration.
- Catch naming violations in pull requests automatically, flagging issues like improper function names or variable names that violate PEP 8.
- Configure custom decorator recognition to avoid false positives when using frameworks with non-standard method decorators.
- Validate codebases for naming convention compliance before refactoring or standardizing on PEP 8 style.
- Integrate into pre-commit hooks to catch naming issues before code is committed to the repository.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that checks Python code for compliance with PEP 8 naming conventions, detecting violations like improper class names, function names, variable names, and import aliases.
Yes. pep8-naming is a lightweight, zero-configuration flake8 extension that adds genuine value to code quality checks. It has no security vulnerabilities, permissive licensing, and low install friction. The aging maintenance status (466 days since release) is not a blocker—the plugin's scope is narrow and stable, and the underlying PEP 8 standard does not change frequently. Install it if you use flake8 and want to enforce naming conventions.
Install
pep8-naming on PyPI
pip
pip install pep8-naminguv
uv add pep8-namingpoetry
poetry add pep8-namingInstalling pep8-naming
Before you install
Installs with minimal friction as a pure Python wheel depending only on flake8. The package is aging (466 days since last release) but remains in production/stable status with an active repository.
License in practice
Licensed under the Expat license, a permissive open-source license with no restrictions on commercial or private use.
Quickstart
pip install pep8-naming
flake8 your_code.py
# Plugin is automatically available; errors like N801, N802, N803 will be reported
Requires flake8 to be installed; the plugin only works as a flake8 extension, not as a standalone tool.
Verify before relying
- Whether the 466-day gap since last release indicates active maintenance or dormancy relative to flake8's own release cycle.
- How well the plugin handles edge cases in modern Python features like type variables (N808 error code).
Package facts
| License | Expat license (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | aging — 466 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,811,840/month — #2,880 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pep8_naming-0.15.1-py3-none-any.whl
Keywords: flake8, pep8, naming
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
flake8-annotationsA Flake8 plugin that enforces PEP 3107-style…
permissive · top 15,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-class-attributes-orderA flake8 extension that enforces a configurable…
permissive · top 15,000 on PyPI
flake8-quotesA flake8 plugin that enforces consistent quote…
permissive · top 5,000 on PyPI
flake8-variables-namesA flake8 extension that detects poorly named…
permissive · top 15,000 on PyPI
flake8-copyrightA flake8 plugin that enforces the presence of…
unclear · top 15,000 on PyPI
pyflakesPyflakes checks Python source files for logical…
permissive · top 1,000 on PyPI
flake8-pep3101A flake8 plugin that detects and flags…
copyleft · top 15,000 on PyPI
pytest-flake8A pytest plugin that runs flake8 PEP8…
permissive · top 15,000 on PyPI
pylamaPylama is a code audit tool that wraps multiple…
permissive · top 15,000 on PyPI