--- id: flake8-import-order version: "0.19.2" license: LGPLv3 license_treatment: copyleft maintenance: active --- # flake8-import-order — Flake8 and pylama plugin that checks the ordering of import statements. License: copyleft · Maintenance: active · Downloads: 1.6M/mo ## What it is and what it does flake8-import-order is a flake8 plugin that validates how imports are organized in Python code. It enforces grouping conventions—typically stdlib first, then third-party packages, then local code—and checks that each group is properly sorted. The plugin supports multiple built-in styles including cryptography (the default), google, smarkets, appnexus, edited, pycharm, and pep8, and allows you to define custom styles by extending the base class. You configure it by specifying which names belong to your application and optionally which packages are internal to your organization. It reports four warning types: I100 (imports out of order), I101 (names within a from-import out of order), I201 (missing blank line between groups), and I202 (extra blank line within a group). Checks operate only at module scope and ignore conditional imports except those under TYPE_CHECKING blocks. Use it for: - Enforce consistent import organization across a team to improve code readability - Integrate import ordering checks into CI/CD pipelines with other flake8 rules - Adopt a specific import style and automatically flag deviations in code review - Define a custom import style for your organization and register it as an entry point ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A flake8 plugin that enforces import ordering and grouping according to configurable conventions, reporting violations through four warning codes. Yes, if you use flake8 and want automated import ordering enforcement. The plugin is actively maintained, has no known vulnerabilities, and imposes minimal installation friction. The LGPLv3 copyleft license is a consideration only if you plan to redistribute the code; for typical development use it is not a barrier. ## Install pip install flake8-import-order uv add flake8-import-order poetry add flake8-import-order ## Installing flake8-import-order Before you install: Low friction installation as a pure Python wheel with only pycodestyle and setuptools as runtime dependencies. The project is actively maintained with recent commits since its initial release. License in practice: Licensed under LGPLv3 (copyleft), which requires derivative works to be distributed under the same license terms. This may restrict redistribution or embedding in proprietary code. Quickstart: pip install flake8-import-order Add to .flake8 config: [flake8] import-order-style = cryptography application-import-names = myapp Verify before relying: - Whether performance is acceptable on large codebases with many imports - Exact Python version compatibility beyond the classifiers listed ## Package facts - License: LGPLv3 (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 import order plugin, python import linter, import grouping checker, code style validation, flake8 import checker, linting, code-style [View on SkillFed](https://skillfed.io/packages/flake8-import-order) · [View on PyPI](https://pypi.org/project/flake8-import-order/)