Skip to main content

Display installed Python projects as a tree of dependencies

Project description

1 Introduction

Display installed Python projects as a tree of dependencies.

2 Features

  • Output compatible with requirements.txt

  • Show dependencies or dependents

  • Detects circular dependencies

  • Detects missing dependencies

3 Usage

usage: deptree [-h] [--version] [-r] [project [project ...]]

positional arguments:
  project        name of project whose dependencies (or dependents) to show

optional arguments:
  -h, --help     show this help message and exit
  --version      show program's version number and exit
  -r, --reverse  show dependent projects instead of dependencies

3.1 Examples

$ deptree twine
twine==2.0.0  # twine
  pkginfo==1.5.0.1  # pkginfo>=1.4.2
  readme-renderer==24.0  # readme-renderer>=21.0
    bleach==3.1.0  # bleach>=2.1.0
      six==1.13.0  # six>=1.9.0
      webencodings==0.5.1  # webencodings
    docutils==0.15.2  # docutils>=0.13.1
    Pygments==2.4.2  # Pygments
    six==1.13.0  # six
  requests==2.22.0  # requests>=2.20
    certifi==2019.9.11  # certifi>=2017.4.17
    chardet==3.0.4  # chardet<3.1.0,>=3.0.2
    idna==2.8  # idna<2.9,>=2.5
    urllib3==1.25.7  # urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  requests-toolbelt==0.9.1  # requests-toolbelt!=0.9.0,>=0.8.0
    requests==2.22.0  # requests<3.0.0,>=2.0.1
      certifi==2019.9.11  # certifi>=2017.4.17
      chardet==3.0.4  # chardet<3.1.0,>=3.0.2
      idna==2.8  # idna<2.9,>=2.5
      urllib3==1.25.7  # urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  setuptools==39.0.1  # setuptools>=0.7.0
  tqdm==4.38.0  # tqdm>=4.14
$ deptree -r requests
requests==2.22.0  #
  requests-toolbelt==0.9.1  # requests<3.0.0,>=2.0.1
    twine==2.0.0  # requests-toolbelt!=0.9.0,>=0.8.0
  twine==2.0.0  # requests>=2.20

4 Repositories

4.1 Distributions

4.2 Source code

5 Details

Similar projects

6 Hacking

This project makes extensive use of tox, pytest, and GNU Make.

6.1 Development environment

Use following command to create a Python virtual environment with all necessary dependencies:

tox --recreate -e develop

This creates a Python virtual environment in the .tox/develop directory. It can be activated with the following command:

. .tox/develop/bin/activate

6.2 Run test suite

In a Python virtual environment run the following command:

make review

Outside of a Python virtual environment run the following command:

tox --recreate

6.3 Build and package

In a Python virtual environment run the following command:

make package

Outside of a Python virtual environment run the following command:

tox --recreate -e package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deptree-0.0.7.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

deptree-0.0.7-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file deptree-0.0.7.tar.gz.

File metadata

  • Download URL: deptree-0.0.7.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1

File hashes

Hashes for deptree-0.0.7.tar.gz
Algorithm Hash digest
SHA256 de16d6b62b63df2eef20126567a4ade256770b8099134d2b7b73b49c36dca34f
MD5 26708df725dae599fcd9ff30b86b34c4
BLAKE2b-256 0b4ab25c7eebcf7c44410840cf8fd0414db20ee9bad7b73031f177cb24f9f9f5

See more details on using hashes here.

File details

Details for the file deptree-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: deptree-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1

File hashes

Hashes for deptree-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 af146c8e0a1219f17cdee09969b35ed9233f53082c9a8138e09990d488bd610f
MD5 0f42ff5373cb7588e01bd5c1f1949d5a
BLAKE2b-256 bbb29a0dc450e445935db386f57b654cfb7d60854d8936ccdf37f7ee8603a6c4

See more details on using hashes here.

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