Display installed Python projects as a tree of dependencies
Project description
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
Installation
For better comfort, use as a single-file isolated zipapp:
For example:
$ python3 -m pip install --target ./deptree/ deptree
$ python3 -m zipapp --python '/usr/bin/env python3' --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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deptree-0.0.9.tar.gz
.
File metadata
- Download URL: deptree-0.0.9.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ef5c777c1a92d3c865691b80a15193b42b69322126ef190fdd4205d72e1e16 |
|
MD5 | fbf5fa1ef43077a3fc23f86c1fe1c22c |
|
BLAKE2b-256 | 2c177f4c7a925f5bb9aeffdb2076ada2d5c04fd57c0f37560106f8dcb3354e8a |
File details
Details for the file deptree-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: deptree-0.0.9-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a3515bfd9ed3a5d38cabc3617b3bcfd0a24f56a3e4172ff554cffc4e4cbcf7 |
|
MD5 | 60fc8a6a351f8f4266a6c71281047418 |
|
BLAKE2b-256 | 3beb23a23cefc98021eb0298d5a542a1e4d6cdcc25f89e7b3341b5dfc2547354 |