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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file deptry-0.2.16.tar.gz.

File metadata

  • Download URL: deptry-0.2.16.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.7 Linux/5.15.0-1019-azure

File hashes

Hashes for deptry-0.2.16.tar.gz
Algorithm Hash digest
SHA256 172d2d0e2426ab3a14316571436f1a20c998ed1de962eff92d7d8b60fcf5bb4d
MD5 9ce281f8ae323d1766fd6deed9cf1968
BLAKE2b-256 739b6c30516d76bc325e7dacdfa228ebb2b2d6e193a41ebe29c8a724c6ed8daf

See more details on using hashes here.

File details

Details for the file deptry-0.2.16-py3-none-any.whl.

File metadata

  • Download URL: deptry-0.2.16-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.7 Linux/5.15.0-1019-azure

File hashes

Hashes for deptry-0.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 be00a52a5c15cff59d04d05af67c7b1058a3a4e02d6b64f1031429b846a79eb8
MD5 edf1ce7ce540f83c5245d5067baf3d06
BLAKE2b-256 4bcd9132ab2af077a8f2b9ac46599457f420dd11b8474b87a39131a099371b28

See more details on using hashes here.

Supported by

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