$npx skillfedfor your agent

flake8-class-attributes-order

A flake8 extension that checks classes attributes order

With conditionsPyPI Python ModulesReleased Mar 2025363.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flake8_class_attributes_order-0.3.0-py3-none-any.whl
v0.3.0 · released 2025-03-20 · Python >=3.9 · 2 runtime deps: flake8, typing-extensions

Yes, if you value consistent class organization and your team can tolerate aging maintenance. The plugin is stable, has no known vulnerabilities, and solves a real code-style problem. However, verify compatibility with your current flake8 version before adopting. Best suited for teams that already use flake8 and want to standardize class layouts.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later and an existing flake8 installation.
  • Installs with minimal friction—only two runtime dependencies (flake8 and typing-extensions).
  • Maintenance is aging: last release was 512 days ago, though the repository remains active with a recent commit.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with only attribution required. No licensing restrictions on commercial or private projects.

last release 2025-03-20 (512 days) · last repo commit 2025-03-20 · 60 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 363,191 downloads/mo, #7,226 on PyPI

Verify before relying

pip install flake8-class-attributes-order

# Then run flake8 on your code:
flake8 your_file.py

# Configure in setup.cfg or .flake8:
# [flake8]
# use_class_attributes_order_strict_mode = True
  • Whether the aging maintenance status affects compatibility with the latest flake8 versions.
  • Performance impact on large codebases with many classes.
Same gist for agents: .md · .json

What it is and what it does

This package is a flake8 plugin that validates the internal structure of Python classes by enforcing a consistent order for attributes, methods, and nested elements. It recognizes different attribute types—docstrings, properties, static methods, class methods, nested classes, constants, fields, and regular methods—and checks that they appear in a defined sequence. By default it expects `__new__` and `__init__` first, followed by other magic methods, then properties, static methods, class methods, and regular methods, with protected and private variants ordered separately.

Beyond ordering, it also detects class-level logic (like conditional expressions or attribute modifications) that should typically live in `__init__` instead. The tool is configurable: you can use a strict mode that separates protected and private variants into their own sections, or manually define your own attribute order. It reports violations as CCE001 (wrong order) and CCE002 (class-level expression) errors that integrate into your flake8 workflow.

Use it for

  • Enforce consistent class structure across a large codebase to improve readability and maintainability.
  • Catch Django model fields and methods that are out of conventional order in model definitions.
  • Detect class-level logic (e.g., widget configuration) that belongs in `__init__` but was placed at class scope.
  • Validate that nested classes like `Meta` appear in the expected position within their parent class.
  • Integrate class-structure validation into CI/CD pipelines alongside other flake8 checks.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you value consistent class organization and your team can tolerate aging maintenance.

The plugin is stable, has no known vulnerabilities, and solves a real code-style problem. However, verify compatibility with your current flake8 version before adopting. Best suited for teams that already use flake8 and want to standardize class layouts.

Install

flake8-class-attributes-order on PyPI

Before you install

Installs with minimal friction—only two runtime dependencies (flake8 and typing-extensions). Maintenance is aging: last release was 512 days ago, though the repository remains active with a recent commit.

Requires Python 3.9 or later and an existing flake8 installation.

License in practice

MIT license permits unrestricted use, modification, and distribution with only attribution required. No licensing restrictions on commercial or private projects.

Quickstart

pip install flake8-class-attributes-order

# Then run flake8 on your code:
flake8 your_file.py

# Configure in setup.cfg or .flake8:
# [flake8]
# use_class_attributes_order_strict_mode = True

Verify before relying

  • Whether the aging maintenance status affects compatibility with the latest flake8 versions.
  • Performance impact on large codebases with many classes.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
flake8typing-extensions
MaintenanceAging 512 days since the last release
Last repo commit
First released
Downloads363,191 / month, #7,226 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Environment :: ConsoleFramework :: Flake8Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: DocumentationTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Evidence: flake8_class_attributes_order-0.3.0-py3-none-any.whl

Tags

Capabilities
flake8 class attribute orderpython class structure linterenforce method orderingclass organization checkerflake8 code style extensionclass attribute validationpython class layout checker
Topics
flake8-plugincode-styleclass-structure
PyPI keywords
flake8

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 › “flake8 class attribute order”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

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.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

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.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

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…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also flake8-annotations-complexity · pep8-naming · abstractcp · flake8-functions · flake8-plugin-utils · overrides · flake8-unused-arguments · flake8-annotations · flake8-expression-complexity · flake8-pie