Skip to main content

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

Project description

deptry

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


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


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 withing 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 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.4.4.tar.gz (17.8 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.4.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deptry-0.4.4.tar.gz
  • Upload date:
  • Size: 17.8 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.4.4.tar.gz
Algorithm Hash digest
SHA256 048cfb608dcf94e406f0ba7c2e16fc7ff01544807d40146793680b10b329418f
MD5 6a8a209f47c34125fd1d102d9d0274c9
BLAKE2b-256 8d16308fc0459f011df4cf5f5086d0e8c42726907a118975b8247ad2e26772cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deptry-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 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.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 63d6a3f52483d3f710f5f340a050efe954459368277c3b404585614a59ed198c
MD5 7ed221ce755c6f21717cb105722ce29a
BLAKE2b-256 54cb64778312195db8e424c53fdbe5325887d72cf9ef89e1a5cc3b68c2d51f85

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