# python/deptry

> Compares the imports of the project with the dependencies it declares: missing, unused, and transitive ones.

Compares the imports of the project with the dependencies it declares: missing, unused, and transitive ones.

Part of the [`python`](/reference/configurations/python/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `push` [stage](/start/concepts/#stage), once per scope. It runs uv.

## Why

An import that works through somebody else’s dependency breaks the day they drop it.

## What to do

Declare the dependency, or remove the one nothing imports. Turn one rule off with `gspot ignore python/deptry --rule <code> --reason "<why>"`.

## Example

An import of a third-party package missing from the project dependencies reports a finding. Declare the package and update the lockfile, or remove the import.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore python/deptry --paths "<glob>" --reason "<why>"
```
