Reputation: 9015
When running pip list
or pip freeze
, is there a way to emit additional details for each package?
In our project, we must report the packages we're using, their origin and their license. What I'm trying to retrieve would be similar to e.g.:
Package Version PyPi Link License
------------- ------- ------------------------------- --------------------------
Flask 1.1.2 https://pypi.org/project/Flask/ BSD License (BSD-3-Clause)
Others... 1.2.3 ... ...
Entries I'm trying to find besides PyPi Link
:
https://palletsprojects.com/p/flask/
in case of flask)https://github.com/pallets/flask
in case of flask)BSD License (BSD-3-Clause)
in case of Flask)Upvotes: 2
Views: 1250
Reputation: 1447
If you run pip show <name>
(documentation) it would give you more details including the license, and I believe any additional link metadata within the package. If you have a requirements.txt file in your project you can do a bash(linux/mac) or PowerShell(windows) script to run the command for each dependency if doing it one at a time is too much hassle.
You can also use the--verbose
to get even more details like classifiers etc.
Upvotes: 3