Metadata-Version: 2.4
Name: licomp_toolkit
Version: 0.6.3
Summary:  Simple command line tool to check compatibility between two licenses, given context 
Home-page: https://codeberg.org/software-compliance-org/licomp-toolkit
Author: Henrik Sanklef
Author-email: hesa@sandklef.com
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSES/GPL-3.0-or-later.txt
Requires-Dist: licomp==0.5.*
Requires-Dist: licomp-osadl==0.5.*
Requires-Dist: licomp-reclicense==0.5.*
Requires-Dist: licomp-dwheeler==0.5.*
Requires-Dist: licomp-proprietary==0.5.*
Requires-Dist: licomp-hermione==0.5.*
Requires-Dist: licomp-gnuguide==0.5.*
Requires-Dist: licomp-doubleopen==0.1.*
Requires-Dist: licomp-oslc-handbook==0.1.*
Requires-Dist: foss-flame
Requires-Dist: PyYaml
Provides-Extra: dev
Requires-Dist: bump2version~=1.0; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: setuptools; extra == "dev"
Requires-Dist: reuse; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Licomp Toolkit

Licomp Toolkit 

The licomp-toolkit is a Python-based utility designed to evaluate
license compatibility between different software components. It serves
as a bridge to multiple compatibility resources, allowing developers
and legal teams to determine if an inbound license (e.g., a library
they want to use) is legally compatible with their project's outbound
license.

## Example question with a licomp-toolkit answer

Can I use an inbound component under license `LGPL-2.1-or-later AND Apache-2.0` to my program licensed under `BSD-3-Clause`?

```shell
$ licomp-toolkit -of text verify --inbound-license "LGPL-2.1-or-later AND Apache-2.0" --outbound-license "BSD-3-Clause"
outbound:      BSD-3-Clause
inbound:       Apache-2.0 AND LGPL-2.1-or-later
resources:     licomp_osadl, licomp_reclicense
provisioning:  binary-distribution
usecase:       library
compatibility: yes
```
## Introduction 

Licomp can be used to help determine if an inbound license is
compatible with an outbound license. These compatibility checks need
context which is often missing in tools, resources and
discussions. The context above must be provided to licomp-toolkit. In
short the context is:

* use case - how you use the licensed component
* provisioning - how you provide the component to your user
* modification - if you have modified the component

## Architectural overview

![Graphical overview of Licomp Toolkit and its resources](docs/images/licomp-toolkit.png "Licomp Toolkit graphical overview")

Licomp toolkit is using the [Licomp](https://codeberg.org/software-compliance-org/licomp) api to communicate with the Licomp resources. For a better understanding of Licomp we suggest you read:

* [Licomp basic concepts](https://codeberg.org/software-compliance-org/licomp/#licomp-concepts)
* [Licomp reply format](https://codeberg.org/software-compliance-org/licomp/blob/main/docs/reply-format.md)

## Licomp resources

Licomp toolkit uses the following compatibility resources using the [Licomp](https://codeberg.org/software-compliance-org/licomp) api: [licomp-hermione](https://codeberg.org/software-compliance-org/licomp-hermione), [licomp-osadl](https://codeberg.org/software-compliance-org/licomp-osadl), [licomp-proprietary](https://codeberg.org/software-compliance-org/licomp-proprietary), [licomp-reclicense](https://codeberg.org/software-compliance-org/licomp-reclicense), [licomp-dwheeler](https://codeberg.org/software-compliance-org/licomp-dwheeler) and [licomp-gnuguide](https://codeberg.org/software-compliance-org/licomp-gnuguide).

# Using Licomp Toolkit

## Command line interface (brief intro)

If you want to check if the following is compatible:
* outbound license "MIT"
* inbound license "LGPL-2.0-or-later"

```shell
$ licomp-toolkit verify -il MIT -ol LGPL-2.0-or-later | jq .summary.results
{
  "nr_valid": "1",
  "yes": {
    "count": 1,
    "percent": 100.0
  }
}
```

In the above example, `licomp-toolkit` by default chose:
* usecase `library`- i.e. the licenses component is used as a library (e.g. linking to it)
* provisioning `binary-distribution`
* modification is not yet implemented

For more detailed guides to `licomp-toolkit`, please check out:
* [Licomp Toolkit - Command Line Guide](docs/cli-guide.md)
* [Licomp Toolkit - Reply Format](docs/reply-format.md)

## Python module

If you want to check if the following is compatible:
* outbound license "MIT"
* inbound license "LGPL-2.0-or-later"

```python
>>> from licomp_toolkit.toolkit import LicompToolkit
>>> licomp_toolkit = LicompToolkit()
>>> compatibilities = licomp_toolkit.outbound_inbound_compatibility("MIT", "LGPL-2.0-or-later", "library", "binary-distribution")
>>> print(str(compatibilities['summary']['results']))
{'nr_valid': '1', 'yes': {'count': 1, 'percent': 100.0}}
```

For a more detailed guide to the `licomp-toolkit` Python api, please check out: [Licomp Toolkit - Python module](docs/python-api.md)

# License

Licomp Toolkit is released in [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.en.html)

# Installing Licomp Toolkit

See [Installing Licomp Toolkit](docs/installation.md)

# What tools use Licomp Toolkit

* [SBoM Compliance Tool](https://codeberg.org/software-compliance-org/sbom-compliance-tool)

# Sponsors

As part of [Automated FOSS License Compliance](https://codeberg.org/software-compliance-org/automated-foss-license-compliance), Licomp Toolkit is sponsored (2025-2026) by:

![NLnet logo](https://nlnet.nl/logo/banner-160x60.png) ![NGI0Core logo](docs/images/NGI0Core_tag.png?height=50px&width=300px)
