Skip to content
/ deptry Public
forked from fpgmaas/deptry

A command line utility to check for obsolete, missing and transitive dependencies in a Python project.

License

Notifications You must be signed in to change notification settings

JotaFan/deptry

 
 

Repository files navigation


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 obsolete or missing dependencies. It supports the following types of projects:

  • Projects that use Poetry and a corresponding pyproject.toml file
  • Projects that use PDM and a corresponding pyproject.toml file
  • Projects that use a requirements.txt file according to the pip standards

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.


Link to documentation


Quickstart

Installation

deptry can be added to your project with

poetry add --group dev deptry

or with

<activate virtual environment>
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 .

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 documentation.


Repository initiated with fpgmaas/cookiecutter-poetry.

About

A command line utility to check for obsolete, missing and transitive dependencies in a Python project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.8%
  • Jupyter Notebook 2.0%
  • Makefile 1.2%