deptry 0.25.1


pip install deptry

  Latest version

Released: Mar 18, 2026


Meta
Author: Florian Maas, Mathieu Kniewallner
Requires Python: >=3.10

Classifiers

Development Status
  • 3 - Alpha

Environment
  • Console

Intended Audience
  • Developers

Topic
  • Software Development :: Libraries :: Python Modules
  • Software Development :: Quality Assurance

Programming Language
  • Python
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Rust
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

deptry logo

Release Build status Supported Python versions codecov PyPI - Downloads License

deptry is a command line tool to check for issues with dependencies in a Python project, such as unused or missing dependencies. It supports projects using Poetry, pip, PDM, uv, and more generally any project supporting PEP 621 specification.

Dependency issues are detected by scanning for imported modules within all Python files in a directory and its subdirectories, and comparing those to the dependencies listed in the project's requirements.


Documentation - Contributing


Quickstart

Installation

To add deptry to your project, run one of the following commands:

# Install with poetry
poetry add --group dev deptry

# Install with pip
pip install deptry

Warning: When using pip to install deptry, make sure you install it within the virtual environment of your project. Installing deptry globally will not work, since it needs to have access to the metadata of the packages in the virtual environment.

Prerequisites

deptry should be run within the root directory of the project to be scanned, and the project should be running in its own dedicated virtual environment.

Usage

To scan your project for dependency issues, run:

deptry .

Example output could look as follows:

Scanning 2 files...

foo/bar.py:1:0: DEP004 'numpy' imported but declared as a dev dependency
foo/bar.py:2:0: DEP001 'matplotlib' imported but missing from the dependency definitions
pyproject.toml: DEP002 'pandas' defined as a dependency but not used in the codebase
Found 3 dependency issues.

Configuration

deptry can be configured by using additional command line arguments, or by adding a [tool.deptry] section in pyproject.toml. For more information, see the Usage and Configuration section of the documentation..


Repository initiated with fpgmaas/cookiecutter-poetry.

0.25.1 Mar 18, 2026
0.25.0 Mar 18, 2026
0.24.0 Nov 09, 2025
0.23.1 Jul 31, 2025
0.23.0 Jan 25, 2025
0.22.0 Jan 10, 2025
0.21.2 Dec 19, 2024
0.21.1 Nov 15, 2024
0.21.0 Nov 08, 2024
0.20.0 Aug 27, 2024
0.19.1 Aug 10, 2024
0.19.0 Aug 07, 2024
0.18.0 Jul 31, 2024
0.17.0 Jul 21, 2024
0.16.2 Jul 05, 2024
0.16.1 Apr 06, 2024
0.16.0 Apr 04, 2024
0.15.0 Mar 24, 2024
0.14.2 Mar 19, 2024
0.14.1 Mar 18, 2024
0.14.0 Mar 14, 2024
0.14.0a1 Mar 13, 2024
0.13.0 Mar 12, 2024
0.12.0 Jun 18, 2023
0.11.0 May 10, 2023
0.10.1 May 09, 2023
0.10.0 May 08, 2023
0.9.0 May 06, 2023
0.8.0 Jan 24, 2023
0.7.1 Jan 05, 2023
0.7.0 Dec 27, 2022
0.6.6 Nov 22, 2022
0.6.5 Nov 14, 2022
0.6.4 Nov 09, 2022
0.6.3 Oct 23, 2022
0.6.2 Oct 22, 2022
0.6.1 Oct 08, 2022
0.5.13 Oct 02, 2022
0.5.12 Oct 01, 2022
0.5.11 Sep 30, 2022
0.5.10 Sep 27, 2022
0.5.9 Sep 26, 2022
0.5.8 Sep 26, 2022
0.5.7 Sep 24, 2022
0.5.6 Sep 22, 2022
0.5.5 Sep 20, 2022
0.5.4 Sep 19, 2022
0.5.3 Sep 18, 2022
0.5.2 Sep 18, 2022
0.5.1 Sep 18, 2022
0.5.0 Sep 17, 2022
0.4.7 Sep 15, 2022
0.4.6 Sep 14, 2022
0.4.5 Sep 13, 2022
0.4.4 Sep 13, 2022
0.4.3 Sep 13, 2022
0.4.2 Sep 12, 2022
0.4.1 Sep 11, 2022
0.4.0 Sep 11, 2022
0.3.2 Sep 10, 2022
0.3.1 Sep 10, 2022
0.2.17 Sep 10, 2022
0.2.16 Sep 09, 2022
0.2.15 Sep 09, 2022
0.2.14 Sep 09, 2022
0.2.13 Sep 09, 2022
0.2.12 Sep 09, 2022
0.2.10 Sep 08, 2022
0.2.9 Sep 08, 2022
0.2.8 Sep 08, 2022
0.2.7 Sep 07, 2022
0.2.6 Sep 07, 2022
0.2.5 Sep 07, 2022
0.2.3 Sep 06, 2022
0.2.2 Sep 06, 2022
0.2.1 Sep 05, 2022
0.2.0 Sep 05, 2022
0.1.5 Sep 04, 2022
0.1.4 Sep 04, 2022
0.1.3 Sep 04, 2022
0.1.2 Sep 04, 2022
0.0.4 Sep 03, 2022
0.0.3 Sep 03, 2022
0.0.2 Sep 02, 2022
0.0.1 Sep 02, 2022
Extras: None
Dependencies:
click (<9,>=8.0.0)
colorama (>=0.4.6)
packaging (>=23.2)
requirements-parser (<1,>=0.11.0)
tomli (>=2.0.1)