Support component license information (CLI) files
Project description
CLI Support for Python
Python library to read Component License Information (CLI) files. They can be created by FOSSology and stored in SW360.
For more information about the CLI file format, please have a look at ComponentLicenseInformation.md.
Usage
Installation
This project is available as Python package on PyPi.org.
Install cli_support and required dependencies:
pip install cli_support
Required Packages
- none
Using the API
-
Start using the API:
import cli_support clifile = cli_support.CLI.CliFile() clifile.read_from_file("cli_filename")
Contribute
- All contributions in form of bug reports, feature requests or merge requests are welcome!
- Please use proper docstrings to document functions and classes.
- Extend the testsuite poetry run pytest with the new functions/classes
Build
Building Python package
For building the library, you need Poetry. Build is then simply triggered using
poetry build
This creates the source and wheel files in dist/
subdirectory -- which can then
be uploaded or installed locally using pip
.
Test
Start the complete test suite or a specific test case (and generate coverage report):
poetry run pytest
or
poetry run coverage run -m pytest
poetry run coverage report -m --omit "*/site-packages/*.py"
poetry run coverage html --omit "*/site-packages/*.py"
Demo
The script show_licenses.py
shows how to use the library to retrieve some information
of a given CLI file.
python ./show_licenses.py ./test/testfiles/CLIXML_MIT_simple.xml
License
The project is licensed under the MIT license.
SPDX-License-Identifier: MIT
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 cli_support-2.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d80366ffd57ac932f6d307e726e34f897b6f898c2eee2c83cdb4e83fbd7145d |
|
MD5 | fa9bedbc96571d7c7a5da339d310fef6 |
|
BLAKE2b-256 | c705a90c535de1495274e43d6751db22039759cf721fd34eae7b1d25d7733dd8 |