Skip to main content

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

Requires Python 3.9 or higher. Python 3.9 compatibility is retained for downstream integrations; Python 3.9 reached upstream end-of-life in October 2025. Use a maintained Python version where possible.

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

Development and compatibility testing

Use Poetry 2.4.3 to install dependencies and maintain poetry.lock. CI tests Python 3.9–3.14, including smoke tests against the built wheel. Linting and release tooling run on modern Python.

Pytest is a development dependency and is not installed with LicenseLynx. Python 3.9 uses pytest 8.4.2; newer Python versions use a patched pytest 9 release. The legacy version is affected by CVE-2025-71176 (Unix temporary-directory handling), with no upstream Python 3.9-compatible fix. The Python 3.9 CI jobs use disposable GitHub-hosted runners and a private temporary directory. This mitigates exposure but does not remove the dependency advisory. For local legacy testing, use an isolated environment and a private temporary root:

private_tmp=$(mktemp -d)
TMPDIR="$private_tmp" poetry run python -m pytest -m "not smoke"

Revisit Python 3.9 support when downstream integrations no longer require it.

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

Metadata

Release files for licenselynx 2.4.0

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

Source distribution (sdist)

Source distribution for licenselynx 2.4.0
File Size Uploaded Provenance Actions
licenselynx-2.4.0.tar.gz 100.8 kB With provenance Details for licenselynx-2.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for licenselynx 2.4.0
File Interpreter ABI Platform Actions
licenselynx-2.4.0-py3-none-any.whl Python 3 none any Details for licenselynx-2.4.0-py3-none-any.whl

Total release size: 204.5 kB

Release files / licenselynx-2.4.0.tar.gz

Download URL licenselynx-2.4.0.tar.gz
Size 100.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa8938900d9bf385ff7789588cd9faefdf650b5d4409d00929e37ba2c32bee36
BLAKE2b-256 checksum
How to use checksums
ef499a5103bb355d5705de3d6d5bd695705fcf9032ab4450cc314a49cf469a9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / licenselynx-2.4.0-py3-none-any.whl

Download URL licenselynx-2.4.0-py3-none-any.whl
Size 103.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b8373a88f144cf4e3f2bfa07cdfd46a04cca93484e805540b435216475e86eb
BLAKE2b-256 checksum
How to use checksums
832ba0dd4c199e9717cce669b541bbddec5b2cd8c0619dae463aa3234f27bd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for licenselynx 2.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for licenselynx-2.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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