skillfed

pep8-naming

Check PEP-8 naming conventions, plugin for flake8

pep8-naming v0.15.1 2.8M downloads/30d#2,880 on PyPI530
Permissive license Expat license AGING released

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-naming

uv

uv add pep8-naming

poetry

poetry add pep8-naming

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming 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

Tags

flake8 naming conventionspep 8 naming checkerpython naming style lintercode style validationnaming convention enforcementflake8 plugin pep8check function variable names
lintercode-stylepep8

More Python Modules packages