Introduction
Display installed Python projects as a tree of dependencies.
Features
Output compatible with requirements.txt
Show dependencies or dependents
Detect circular dependencies
Detect missing dependencies
Repositories
Distributions:
Source code:
Usage
$ deptree --help
usage: deptree [-h] [--version] [-r] [-f] [project [project ...]]
Display installed Python projects as a tree of dependencies
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
Examples
$ deptree cryptography
cryptography==2.9 # cryptography
cffi==1.14.0 # cffi!=1.11.3,>=1.8
pycparser==2.20 # pycparser
six==1.14.0 # six>=1.4.1
$ deptree --reverse cryptography
cryptography==2.9 # -
SecretStorage==3.1.2 # cryptography
keyring==21.2.0 # SecretStorage>=3; sys_platform == "linux"
twine==3.1.1 # keyring>=15.1
$ deptree --flat cryptography
cffi==1.14.0
# pycparser
cryptography==2.9
# six>=1.4.1
# cffi!=1.11.3,>=1.8
pycparser==2.20
six==1.14.0
$ deptree --flat --reverse cryptography
# SecretStorage: cryptography
cryptography==2.9
# twine: keyring>=15.1
keyring==21.2.0
# keyring: SecretStorage>=3; sys_platform == "linux"
SecretStorage==3.1.2
twine==3.1.1
$ deptree CircularDependencyA
CircularDependencyA==0.0.0 # CircularDependencyA
CircularDependencyB==0.0.0 # CircularDependencyB
CircularDependencyA # !!! CIRCULAR CircularDependencyA
Installation
For better comfort, use as a single-file isolated zipapp:
For example:
$ python -m pip install --target ./deptree/ deptree
$ python -m zipapp --python '/usr/bin/env python' --main 'deptree.cli:main' ./deptree/
$ mv ./deptree.pyz ~/.local/bin/deptree
This way the tool can be used in virtual environments without installing it in the virtual environments. The tool can then see the projects installed in the virtual environment but without seeing itself.
Details
Similar projects
Metadata
Release files for deptree 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deptree-0.0.12.tar.gz | 10.5 kB | Without provenance | Details for deptree-0.0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deptree-0.0.12-py3-none-any.whl | Python 3 | none | any | Details for deptree-0.0.12-py3-none-any.whl |
Total release size: 21.2 kB
Release files / deptree-0.0.12.tar.gz
| Download URL | deptree-0.0.12.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13afaf34dba2b9754451282432b90818c3c3353c134a13eb198f076368675d98
|
|
BLAKE2b-256 checksum How to use checksums |
81cb53cd912a7d7a43538033e14a6bc59d89edb0bb1a92f2db38cd348c728043
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / deptree-0.0.12-py3-none-any.whl
| Download URL | deptree-0.0.12-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
608dcaa721c90d01aef94eb6e4f57a403c395fb35dc02f32d08510aed5beffe2
|
|
BLAKE2b-256 checksum How to use checksums |
c7bfc521012f1dc89eeb82653937047be586e8bcebc6d6804fa31b535f03c362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for deptree 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.