Deterministically map license strings to its canonical identifier
Project description
LicenseLynx for Python
To use LicenseLynx in Python, you can call the map method from the LicenseLynx module to map a license name to its canonical form.
The return value is an object with the canonical name and the source of the license.
Installation
To install the library, run following command:
pip install licenselynx
Usage
from licenselynx.licenselynx import LicenseLynx
# Map the license name
license_object = LicenseLynx.map("licenseName")
print(license_object.id)
print(license_object.src)
# Map the license name with risky mappings enabled
license_object = LicenseLynx.map("licenseName", risky=True)
Organization Licenses
Organizations can register internal/proprietary license identifiers that are kept separate from OSS licenses.
To look up an organization license, pass the org parameter:
from licenselynx.licenselynx import LicenseLynx
from licenselynx import Organization
# Map a license name within an organization
license_object = LicenseLynx.map("licenseName", org=Organization.SIEMENS)
The LicenseSource enum is also available for inspecting the source type:
from licenselynx import LicenseSource
Helper methods on the returned license object:
# Check if the license comes from any organization
license_object.is_organization_source() # returns True if from any org
# Check if the license comes from a specific organization
license_object.is_organization_source_of(Organization.SIEMENS) # returns True if from Siemens
License
This project is licensed under the BSD 3-Clause "New" or "Revised" License (SPDX-License-Identifier: BSD-3-Clause).
Copyright (c) Siemens AG 2025 ALL RIGHTS RESERVED
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file licenselynx-2.2.0.tar.gz.
File metadata
- Download URL: licenselynx-2.2.0.tar.gz
- Upload date:
- Size: 108.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9485b8c888cdacdf990b2c5d9c52b85c78e687e0c266e0cf661df7a79303d104
|
|
| MD5 |
b37cec417694ad27215dd0923ffd8728
|
|
| BLAKE2b-256 |
132b018c0032cba66b996c4ca8110dc7d833023c8ca16e3f65e302c340f6fe79
|
Provenance
The following attestation bundles were made for licenselynx-2.2.0.tar.gz:
Publisher:
deploy.yaml on licenselynx/licenselynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
licenselynx-2.2.0.tar.gz -
Subject digest:
9485b8c888cdacdf990b2c5d9c52b85c78e687e0c266e0cf661df7a79303d104 - Sigstore transparency entry: 1214661652
- Sigstore integration time:
-
Permalink:
licenselynx/licenselynx@d19ee43a1c47c2f64cf2fc6898f5bf4add934279 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/licenselynx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@d19ee43a1c47c2f64cf2fc6898f5bf4add934279 -
Trigger Event:
push
-
Statement type:
File details
Details for the file licenselynx-2.2.0-py3-none-any.whl.
File metadata
- Download URL: licenselynx-2.2.0-py3-none-any.whl
- Upload date:
- Size: 112.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ea3bfee71cc38b8a52b0c913b492824c0e32f86cd22e738af3b4d9c0e78e5c
|
|
| MD5 |
457f9112d0e87cee5011a849b6a83a43
|
|
| BLAKE2b-256 |
08b827789b72f8b157fba568b76e2b1a30dccdac503cbf91a5bf6ddd58f6114a
|
Provenance
The following attestation bundles were made for licenselynx-2.2.0-py3-none-any.whl:
Publisher:
deploy.yaml on licenselynx/licenselynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
licenselynx-2.2.0-py3-none-any.whl -
Subject digest:
e9ea3bfee71cc38b8a52b0c913b492824c0e32f86cd22e738af3b4d9c0e78e5c - Sigstore transparency entry: 1214661729
- Sigstore integration time:
-
Permalink:
licenselynx/licenselynx@d19ee43a1c47c2f64cf2fc6898f5bf4add934279 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/licenselynx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@d19ee43a1c47c2f64cf2fc6898f5bf4add934279 -
Trigger Event:
push
-
Statement type: