首页 公告 项目 RSS

⬇️⬇️⬇️ 欢迎关注我的 telegram 频道和 twitter ⬇️⬇️⬇️


联系方式: Twitter Github Email Telegram

Using Deptry

August 5, 2025 本文有 151 个字 需要花费 1 分钟阅读

Introduction

Deptry is a command-line tool designed to check for dependency issues in Python projects, such as unused or missing dependencies. It supports projects managed by Poetry, pip, PDM, uv, as well as any project that follows the PEP 621 specification.

Installing Deptry

You can easily install Deptry using Poetry:

poetry add deptry

Basic Usage

Run the following command in your project root directory to start analysis:

deptry .

Output example:

Scanning 6 files...

download.py:1:8: DEP003 'requests' imported but it is a transitive dependency
main.py:10:1: DEP003 'starlette' imported but it is a transitive dependency
pyproject.toml: DEP002 'deptry' defined as a dependency but not used in the codebase
pyproject.toml: DEP002 'jinja2' defined as a dependency but not used in the codebase
utils.py:7:8: DEP003 'redis' imported but it is a transitive dependency
Found 5 dependency issues.

For more information, see the documentation: https://deptry.com/

Feel free to follow my blog at www.bboy.app

Have Fun