A small module to read the information written by pip-licenses.
Project description
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
- 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.
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
Hashes for pip-licenses-reader-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e95f2d1d797fa5560ca65f9c56744c08dd69f7a961977318a3d7c9bcbba915e |
|
MD5 | 608bfdb9f48afbd5555aee4dfe93438b |
|
BLAKE2b-256 | aea8fddea5ef791b194824dd0ff3023abbb07bf51c75f1357989fde0b2df7ea4 |
Hashes for pip_licenses_reader-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1277e9a9b24b0bfd625d951acb86c7d2ce54b326fdda533c24e93d7b98ac13 |
|
MD5 | 7e601ae2e494d7c2de8f094079a63c4b |
|
BLAKE2b-256 | 4a4ebc778c2aebf378b1792525eaaa560e9d758086331eb73e9f2838cde29258 |