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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deptree-0.0.8.tar.gz
Algorithm Hash digest
SHA256 c47de814b5500f58c5fc767619d79692fa3ebb106cc87e81c8c338aa4f6ed231
MD5 43e9d4425411247380fac190eb5be21f
BLAKE2b-256 f57b0c3859bc6b8694aabfedd31e5abf914cc5ecb74d80e493233d43170fef55

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for deptree-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 336487c304739fcbfa0ea44829e472c9d12840a9200976d018e54b0ce182c530
MD5 a05dc99befb332891c1e099be37b23ad
BLAKE2b-256 06545a6a47326b3e4cb07814cb6660aaab09afbae354edfa2bba8e29ff616a41

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