{"id":1818,"library":"deptry","title":"Deptry Dependency Checker","description":"Deptry is a command-line utility for Python projects that identifies unused, missing, and transitive dependencies. Maintained by Astral (the team behind Ruff), it's actively developed with regular releases, often in sync with the broader Astral ecosystem.","status":"active","version":"0.25.1","language":"en","source_language":"en","source_url":"https://github.com/astral-sh/deptry","tags":["dependencies","linter","tool","development","static analysis","cli"],"install":[{"cmd":"pip install deptry","lang":"bash","label":"Install Deptry"}],"dependencies":[],"imports":[],"quickstart":{"code":"deptry .","lang":"bash","description":"Run Deptry on the current directory to check for dependency issues. This will scan source files and project configuration to identify unused, missing, or transitive dependencies. Configure via `pyproject.toml` for more specific checks."},"warnings":[{"fix":"Verify your `pip install` command (it should be `pip install deptry`) and documentation sources. The current official `deptry` is maintained by Astral.","message":"Deptry's ownership and repository moved from `s-weigand/deptry` to `astral-sh/deptry`. While the core CLI interface largely remained consistent, ensure you are installing the package from the official source and referring to the documentation at `deptry.astral.sh`. Older guides or references might point to the archived repository.","severity":"breaking","affected_versions":"All versions (post-migration, roughly >= 0.12.0)"},{"fix":"Remove the `--requirements-txt` flag from your commands. Deptry will automatically detect common dependency files. For explicit control, configure `dependency_file_paths` in `[tool.deptry]` within your `pyproject.toml`.","message":"The `--requirements-txt` CLI flag was removed. Deptry now relies on auto-discovery of dependency files (e.g., `requirements.txt`, `pyproject.toml`) or explicit configuration within `pyproject.toml`.","severity":"breaking","affected_versions":">= 0.12.0"},{"fix":"Configure `ignore_unused`, `ignore_missing`, `ignore_transitive`, and `exclude` paths in your `pyproject.toml` under `[tool.deptry]` to fine-tune the analysis for your project's specific needs. Use comments to explain ignores for future maintainers.","message":"Deptry may sometimes report false positives (unused dependencies) or false negatives (missing dependencies). This can occur due to dynamic imports, specific project structures, or dependencies used only in non-source files (e.g., configurations, CI scripts).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your project's Python environment and the environment where Deptry is installed is 3.10 or higher. Upgrade Python if necessary.","message":"Deptry requires Python 3.10 or newer. Attempting to run it with older Python versions will result in an installation error or runtime failures.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}