--- id: fawltydeps version: "0.20.0" 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) license_treatment: permissive maintenance: aging --- # fawltydeps — Find undeclared and unused 3rd-party dependencies in your Python project. License: permissive · Maintenance: aging · Downloads: 182.7K/mo ## 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 above — 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 pip install fawltydeps uv add fawltydeps poetry add fawltydeps ## Installing 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_current - Install friction: low - Maintenance: aging - Downloads: 182.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags find unused dependencies python, detect undeclared imports, dependency checker python, missing dependency declarations, clean up project dependencies, dependency audit tool, python import validator, dependency-management, linting, ci-cd [View on SkillFed](https://skillfed.io/packages/fawltydeps) · [View on PyPI](https://pypi.org/project/fawltydeps/)