Skip to main content

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

Project description

deptry

Release Build status Supported Python versions PyPI - Downloads License


deptry is a command line tool to check for issues with dependencies in a poetry managed Python project, such as obsolete or missing dependencies.

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 pyproject.toml.


Documentation: https://fpgmaas.github.io/deptry/


Quickstart

Installation

deptry can be added to your project with

poetry add --group dev deptry

or for older versions of poetry:

poetry add --dev deptry

Warning deptry is still in the early phases of development. For one-off testing of your project's dependencies, this is no issue. However, if you plan to use deptry in a CI/CD pipeline, it is a good idea to pin the version.

Prerequisites

In order to check for obsolete imports, deptry requires a pyproject.toml file to be present in the directory passed as the first argument, and it requires the corresponding environment to be activated.

Usage

To scan your project for obsolete imports, 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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deptry-0.2.16.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

deptry-0.2.16-py3-none-any.whl (19.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page