Skip to main content

CLI Support for Python

License Python Version PyPI Static checks Unit tests

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.

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

Copyright 2019-2024 Siemens

The project is licensed under the MIT license.
SPDX-License-Identifier: MIT

Metadata

Release files for cli-support 2.0.2

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

Source distribution (sdist)

Source distribution for cli-support 2.0.2
File Size Uploaded
cli_support-2.0.2.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-support 2.0.2
File Interpreter ABI Platform
cli_support-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / cli_support-2.0.2.tar.gz

Download URL cli_support-2.0.2.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5908aeb1fd1c66de6a0de40e10bb2a5cfb54114d928d9b40c478ec8423ddf499
BLAKE2b-256 checksum
How to use checksums
8944522b7499014dd63881444e86cb44205802409377cbb0f7009f3f078e4fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.0 Windows/10

Release files / cli_support-2.0.2-py3-none-any.whl

Download URL cli_support-2.0.2-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f56759f129e2b204f0e84de2dc1ff0a7e1f9187d5d88f0b4e528e9d3acd7f080
BLAKE2b-256 checksum
How to use checksums
ce54b2a5f4ec90ac7139fa8081b3aa6b5e9fa817f314d08d71ca4ff917e83c1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.0 Windows/10

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.3

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