flake8-requirements
Package requirements checker, plugin for flake8
Decision gist · record as of 2026-08-14
Yes, if you want automated validation that your code's imports match your declared dependencies. The low install friction and permissive license make it a straightforward addition to flake8 workflows. However, the aging maintenance status (last release 356 days ago) and the security caveat around eval() of setup.py mean you should only use it on trusted codebases and monitor the project for updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Evaluates setup.py with eval() to extract dependencies—only use on code from trusted sources to avoid arbitrary code execution.
- Low friction install with three lightweight runtime dependencies (flake8, tomli, packaging).
- Maintenance status is aging—last release was 356 days ago, though the repository remains active with a recent commit on 2025-12-01.
License · maintenance · safety
permissive license (permissive) — Licensed under permissive terms (MIT), so you can use and modify freely in both open and closed projects.
last release 2025-08-23 (356 days) · last repo commit 2025-12-01 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 196,184 downloads/mo, #9,793 on PyPI
Alternatives
Verify before relying
pip install flake8-requirements
# Then run flake8 on your project:
flake8 your_project/
# Or configure in setup.cfg:
# [flake8]
# known-modules = my-lib:[mylib.drm,mylib.encryption]- Whether I901 (unused requirement detection) is actually implemented, as the description marks it 'not implemented yet'
- Current state of support for modern Python versions beyond 3.8 and whether the aging maintenance status affects compatibility
What it is and what it does
flake8-requirements is a flake8 plugin that checks whether the packages you import in your code are actually declared as dependencies in your project's configuration. It reports I900 warnings when you use a package that isn't listed in your requirements, helping catch missing dependency declarations before deployment.
The plugin reads dependencies from setup.py (via eval), setup.cfg, pyproject.toml (PEP 621 or Poetry format), or requirements.txt. It includes a known mapping of package names to module names for common third-party packages, and allows custom mappings via flake8 configuration for private or renamed packages. A critical caveat: because it evaluates setup.py code to extract dependencies, you should only run it on projects you trust.
Use it for
- Catch missing dependency declarations in CI/CD before publishing a package to PyPI.
- Validate that all imports in a codebase are covered by declared requirements during code review.
- Map custom or private package names to their module names so the checker recognizes them correctly.
- Scan installed packages in the host environment to validate requirements against what's actually available.
- Enforce dependency hygiene in monorepos or projects with complex, multi-level requirements files.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you want automated validation that your code's imports match your declared dependencies.
The low install friction and permissive license make it a straightforward addition to flake8 workflows. However, the aging maintenance status (last release 356 days ago) and the security caveat around eval() of setup.py mean you should only use it on trusted codebases and monitor the project for updates.
Install
flake8-requirements on PyPI
Before you install
Low friction install with three lightweight runtime dependencies (flake8, tomli, packaging). Maintenance status is aging—last release was 356 days ago, though the repository remains active with a recent commit on 2025-12-01.
Evaluates setup.py with eval() to extract dependencies—only use on code from trusted sources to avoid arbitrary code execution.
License in practice
Licensed under permissive terms (MIT), so you can use and modify freely in both open and closed projects.
Quickstart
pip install flake8-requirements
# Then run flake8 on your project:
flake8 your_project/
# Or configure in setup.cfg:
# [flake8]
# known-modules = my-lib:[mylib.drm,mylib.encryption]
Verify before relying
- Whether I901 (unused requirement detection) is actually implemented, as the description marks it 'not implemented yet'
- Current state of support for modern Python versions beyond 3.8 and whether the aging maintenance status affects compatibility
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesflake8tomlipackaging |
| Maintenance | Aging 356 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 196,184 / month, #9,793 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_requirements-2.3.0-py3-none-any.whl
Tags
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 plugin dependency checker”
- flake8-requirementsA flake8 plugin that validates whether imported packages are declared…
- flake8-deprecatedA flake8 plugin that detects calls to deprecated methods and suggests…
- flake8-helperProvides utility functions and base classes to simplify building…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
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.
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
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…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pip-check-reqs · flake8-pep585 · flake8-black · flake8-unused-arguments · flake8-tidy-imports · fawltydeps · flake8-annotations · flake8-cognitive-complexity · flake8-typing-imports · Flake8-pyproject