Skip to main content

pip-licenses-reader

The pip-licenses-reader provides a simple reader for JSON files generated by pip-licenses.

Setting up the data

Create a file called bill_of_materials.json using the following command:

  pip-licenses --format=json --output-file=bill_of_materials.json --with-authors --with-urls

and place it next to your start-up script.

NOTE: If you use another file name or location, the file path must set at run-time.

Usage

from pip_licenses_reader import read_file

license_collection = read_file()

The resulting element will be read-only. It provides a value called projects, which is iterable. For each item, the following properties are set:

  • author
  • name
  • url
  • version (as packaging.version.Version from setuptools or packaging)
  • license

Hence, the data can be considered as bill of materials for your project, if it was created from a virtual env.

If you used another file path or name, this can be passed as the first argument called file.

Errors will be logged using the a regular Logger from pythons logging module.

License

This project is licensed under the BSD-3-Clause license.

Metadata

Release files for pip-licenses-reader 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pip-licenses-reader 0.9.0
File Size Uploaded
pip-licenses-reader-0.9.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pip-licenses-reader 0.9.0
File Interpreter ABI Platform
pip_licenses_reader-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / pip-licenses-reader-0.9.0.tar.gz

Download URL pip-licenses-reader-0.9.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b3135f2121dc418d1f47fa13917a1eb7a04a249b6e5960251f914efdcc37bb62
BLAKE2b-256 checksum
How to use checksums
fdf5597e3e69ee5c2f918ac9a72377e3de044ceb6fb02f619894b42d85cda9ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release files / pip_licenses_reader-0.9.0-py3-none-any.whl

Download URL pip_licenses_reader-0.9.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7514eb0780612348975ee0f52f58c0dc0479bce86512362224e2351cfeb2c913
BLAKE2b-256 checksum
How to use checksums
fe4f3e9a10ff1d5bc4e494b0915a93585cf426e5b01e9ae538f35c353366cbd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page