2

When running pip list or pip freeze, is there a way to emit additional details for each package?

Further details:

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:

  • PyPi Link
  • Homepage (https://palletsprojects.com/p/flask/ in case of flask)
  • Code (https://github.com/pallets/flask in case of flask)
  • License (BSD License (BSD-3-Clause) in case of Flask)
Community
  • 1
  • 1
Tar
  • 8,529
  • 9
  • 56
  • 127

1 Answers1

3

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.

jkr
  • 17,119
  • 2
  • 42
  • 68
Kieran Wood
  • 1,297
  • 8
  • 15