Skip to main content

A repository to check for unused dependencies in a poetry managed python project

Project description

deptry

Release Build status Commit activity Docs Code style with black Imports with isort License


deptry is a command line tool to check for unused dependencies in a poetry managed Python project. It does so by scanning the imported modules within all Python files in a directory and it's subdirectories, and comparing those to the dependencies listed in pyproject.toml.


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


Installation and usage

Installation

deptry can be added to your project with

poetry add deptry

Alternatively, it can be installed with pip install deptry.

Prerequisites

In order to check for obsolete imports, deptry should be run directly within the directory that contains the pyproject.toml file, and it requires the environment created with pyproject.toml to be activated.

Usage

To scan your project for obsolete imports, run

deptry .

or for a more verbose version

deptry . -v

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

This version

0.1.3

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.1.3.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

deptry-0.1.3-py3-none-any.whl (10.6 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