{"id":15718435,"url":"https://github.com/justintime50/pip-tree","last_synced_at":"2025-04-13T21:36:59.494Z","repository":{"id":46935471,"uuid":"311878740","full_name":"Justintime50/pip-tree","owner":"Justintime50","description":"Get the dependency tree of your Python virtual environment via Pip.","archived":false,"fork":false,"pushed_at":"2024-10-15T17:24:04.000Z","size":89,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-25T06:48:36.602Z","etag":null,"topics":["dependency","dependency-tree","environment","package","pip","project","python","tree","venv","virtual","virtual-environments"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Justintime50.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-11T06:08:20.000Z","updated_at":"2024-10-21T20:49:49.000Z","dependencies_parsed_at":"2023-01-21T13:18:49.165Z","dependency_job_id":"eb7bfaa0-308b-4292-bd3c-fbe6ad7bbbf1","html_url":"https://github.com/Justintime50/pip-tree","commit_stats":{"total_commits":47,"total_committers":3,"mean_commits":"15.666666666666666","dds":0.276595744680851,"last_synced_commit":"405b857b5d12774997a70e48825d227530896e12"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justintime50%2Fpip-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justintime50%2Fpip-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justintime50%2Fpip-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justintime50%2Fpip-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Justintime50","download_url":"https://codeload.github.com/Justintime50/pip-tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788743,"owners_count":21161726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency","dependency-tree","environment","package","pip","project","python","tree","venv","virtual","virtual-environments"],"created_at":"2024-10-03T21:53:03.682Z","updated_at":"2025-04-13T21:36:59.464Z","avatar_url":"https://github.com/Justintime50.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Pip Tree\n\nGet the dependency tree of your Python virtual environment via Pip.\n\n[![Build Status](https://github.com/Justintime50/pip-tree/workflows/build/badge.svg)](https://github.com/Justintime50/pip-tree/actions)\n[![Coverage Status](https://coveralls.io/repos/github/Justintime50/pip-tree/badge.svg?branch=main)](https://coveralls.io/github/Justintime50/pip-tree?branch=main)\n[![PyPi](https://img.shields.io/pypi/v/pip-tree)](https://pypi.org/project/pip-tree/)\n[![Licence](https://img.shields.io/github/license/justintime50/pip-tree)](LICENSE)\n\n\u003cimg src=\"https://raw.githubusercontent.com/justintime50/assets/main/src/pip-tree/showcase.png\" alt=\"Showcase\"\u003e\n\n\u003c/div\u003e\n\nThere is no simple, native way to get the dependency tree of a Python virtual environment using the Pip package manager for Python. Pip Tree fixes this problem by retrieving every package from your virtual environment and returning a list of JSON objects that include the package name, version installed, date updated, and which packages are required by each package (the tree).\n\n## Install\n\n```bash\n# Install Pip Tree globally\npip3 install pip-tree\n\n# Install Pip Tree into the virtual environment of the project you want to run it on\nvenv/bin/pip install pip-tree\n\n# Install locally\njust install\n```\n\n## Usage\n\n```text\nVirtual Env Usage:\n    pip-tree\n\nGlobal Usage:\n    pip-tree --path \"path/to/my_project/venv/lib/python3.9/site-packages\"\n\nOptions:\n    -h, --help            show this help message and exit\n    -p PATH, --path PATH  The path to the site-packages directory of a Python virtual environment. If a path is not provided, the virtual environment Pip Tree is run from will be used.\n```\n\n### Sample Output\n\n```text\nGenerating Pip Tree Report...\n\n[\n    {\n        \"name\": \"docopt\",\n        \"version\": \"0.6.2\",\n        \"updated\": \"2021-05-12\",\n        \"requires\": [],\n        \"required_by\": [\n            \"coveralls\"\n        ]\n    },\n    {\n        \"name\": \"flake8\",\n        \"version\": \"3.9.2\",\n        \"updated\": \"2021-05-12\",\n        \"requires\": [\n            \"mccabe\u003c0.7.0,\u003e=0.6.0\",\n            \"pyflakes\u003c2.4.0,\u003e=2.3.0\",\n            \"pycodestyle\u003c2.8.0,\u003e=2.7.0\"\n        ],\n        \"required_by\": []\n    },\n    {\n        \"name\": \"Flask\",\n        \"version\": \"2.0.0\",\n        \"updated\": \"2021-05-12\",\n        \"requires\": [\n            \"click\u003e=7.1.2\",\n            \"itsdangerous\u003e=2.0\",\n            \"Jinja2\u003e=3.0\"\n            \"Werkzeug\u003e=2.0\",\n        ],\n        \"required_by\": []\n    }\n]\n\nPip Tree report complete! 40 dependencies found for \"path/to/my_project/venv/lib/python3.12/site-packages\".\n```\n\n### Package\n\nIn addition to the CLI tool, you can use functions to retrieve the list of packages and their details from a Python virtual environment in your own code:\n\n```python\nimport pip_tree\n\npath = 'path/to/my_project/venv/lib/python3.12/site-packages'\n\npackage_list = pip_tree.get_pip_package_list(path)\nfor package in package_list:\n    package_details = pip_tree.get_package_details(package)\n    print(package_details['name'])\n```\n\n## Development\n\n```bash\n# Get a comprehensive list of development tools\njust --list\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintime50%2Fpip-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustintime50%2Fpip-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintime50%2Fpip-tree/lists"}