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

  • Detect circular dependencies

  • Detect missing dependencies

3 Usage

usage: deptree [-h] [--version] [-r] [-f] [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
  -f, --flat     show flat list instead of tree

3.1 Examples

$ deptree cryptography
cryptography==2.8  # cryptography
  cffi==1.13.2  # cffi!=1.11.3,>=1.8
    pycparser==2.19  # pycparser
  six==1.13.0  # six>=1.4.1
$ deptree --reverse cryptography
cryptography==2.8  #
  SecretStorage==3.1.1  # cryptography
    keyring==21.0.0  # secretstorage; sys_platform == "linux"
      twine==3.1.1  # keyring>=15.1
$ deptree --flat cryptography
cryptography==2.8
# cffi!=1.11.3,>=1.8
# six>=1.4.1
$ deptree --flat --reverse cryptography
# secretstorage cryptography
cryptography==2.8

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

Uploaded Source

Built Distribution

deptree-0.0.8-py3-none-any.whl (9.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