Python library to read and write 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.
This project is available as Python package on PyPi.org.
Install cli_support and required dependencies:
pip install cli_support
- none
-
Start using the API:
import cli_support clifile = cli_support.CLI.CliFile() clifile.read_from_file("cli_filename")
- 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
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
.
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"
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
Copyright 2019-2024 Siemens
The project is licensed under the MIT license.
SPDX-License-Identifier: MIT
For an up-to-date CycloneDX SBOM, please have a look at the SBOM folder.