fawltydeps
Find undeclared and unused 3rd-party dependencies in your Python project.
What it is and what it does
Fawltydeps is a linter for Python project dependencies that compares what your code actually imports against what you've declared in your dependency files. It catches two common problems: undeclared dependencies (you import something but forgot to add it to requirements.txt or pyproject.toml, risking runtime errors) and unused dependencies (you listed something but never use it, wasting installation space and increasing breakage risk). The tool scans Python source code in your project directory, parses your dependency declarations, and reports the gaps.
It depends on standard Python packaging libraries—importlib_metadata, isort, packaging, pydantic, PyYAML, tomli, and pip-requirements-parser—to handle the parsing and comparison. You run it as a command-line tool from your project root, and it outputs a report of what's missing or superfluous. The project is in beta status and supports Python 3.9 through 3.13.
Use it for:
- Audit an existing project to find forgotten dependency declarations before deploying to production.
- Clean up requirements files by identifying and removing packages that are no longer used.
- Enforce dependency hygiene in CI/CD pipelines to catch undeclared imports before merge.
- Validate that a refactored codebase still declares all the packages it actually needs.
- Reduce container image or virtual environment size by removing unnecessary declared dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fawltydeps identifies undeclared dependencies (imports without corresponding declarations) and unused dependencies (declared but never imported) in Python projects.
Yes, if you want automated dependency auditing. The tool is straightforward to install and run, has no known vulnerabilities, and uses permissive MIT licensing. The aging maintenance status (435 days since last release) is a minor concern for a stable linter, but the repository is not archived and remains active. Worth adding to development dependencies to catch dependency mismatches early.
Install
fawltydeps on PyPI
pip
pip install fawltydepsuv
uv add fawltydepspoetry
poetry add fawltydepsInstalling fawltydeps
Before you install
Low friction installation with seven runtime dependencies, all common Python packaging tools. The project is aging (435 days since last release) but the repository remains active with recent commits and no archival.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions; suitable for both open-source and commercial projects.
Quickstart
pip install fawltydeps
fawltydeps
This scans the current directory for Python code, extracts declared dependencies, and reports undeclared and unused ones.
Requires Python 3.9.2 or later; works with Python 3.9 through 3.13.
Verify before relying
- Whether the tool handles monorepo structures or multi-package projects beyond single-directory scans.
- Performance characteristics on large codebases or projects with hundreds of dependencies.
- Support for dependency extras, optional dependencies, or conditional imports.
Package facts
| License | MIT License Copyright (c) Tweag I/O Limited. Some parts are: Copyright (c) 2018 Michael Herrmann Copyright (c) 2015 Steve Cook Permission is hereby granted, free of charge, to any person obtaining a… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9.2) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — importlib_metadata, isort, packaging, pip-requirements-parser, pydantic, PyYAML, tomli |
| Maintenance | aging — 435 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 182,668/month — #10,090 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fawltydeps-0.20.0-py3-none-any.whl
Keywords: dependencies, linters, packaging
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
deptryScans Python projects to detect unused,…
permissive · top 5,000 on PyPI
pip-check-reqsAudits Python project imports against…
permissive · top 15,000 on PyPI
tachTach enforces module boundaries, dependency…
permissive · top 5,000 on PyPI
creosoteCreosote scans your Python project's source…
permissive · top 5,000 on PyPI
flake8-requirementsA flake8 plugin that validates whether imported…
permissive · top 15,000 on PyPI
pyflakesPyflakes checks Python source files for logical…
permissive · top 1,000 on PyPI
deadcodeScans Python codebases to find and optionally…
agpl · top 15,000 on PyPI
uncalledDetects unused functions in Python projects…
permissive · top 15,000 on PyPI
autoflakeautoflake removes unused imports and unused…
permissive · top 5,000 on PyPI
cppcleancppclean analyzes C++ source code to identify…
permissive · top 15,000 on PyPI