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 .py 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, but since configuration is set within pyproject.toml, this is not recommended.

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 check

or for a more verbose version

deptry check -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. //TODO


Repository initiated with fpgmaas/cookiecutter-poetry.

Project details


Release history Release notifications | RSS feed

This version

0.0.1

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.0.1.tar.gz (7.3 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.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deptry-0.0.1.tar.gz
Algorithm Hash digest
SHA256 80052d9b0aaa13541a10f782cef79237bee3885a691ccc75eb89e780cd4198bb
MD5 00beecd1c010a429658128c4bbd37546
BLAKE2b-256 ed3482ae48201326c408974722ec5ec95b89babea3c16bfca9e8fcf287297427

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for deptry-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5545cb52cb6e76908bae3efa984a2de95a8ff2eda8bb81a3ffcefda8d7d5148
MD5 630ebd20c5d0bebb3fbf787be6f30794
BLAKE2b-256 831c16ad85ba540d36c4ecba437901155e0346d3074400ef018d1397b27400cd

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