Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

licenselynx-2.2.0.tar.gz (108.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

licenselynx-2.2.0-py3-none-any.whl (112.1 kB view details)

Uploaded Python 3

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

Hashes for licenselynx-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9485b8c888cdacdf990b2c5d9c52b85c78e687e0c266e0cf661df7a79303d104
MD5 b37cec417694ad27215dd0923ffd8728
BLAKE2b-256 132b018c0032cba66b996c4ca8110dc7d833023c8ca16e3f65e302c340f6fe79

See more details on using hashes here.

Provenance

The following attestation bundles were made for licenselynx-2.2.0.tar.gz:

Publisher: deploy.yaml on licenselynx/licenselynx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for licenselynx-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ea3bfee71cc38b8a52b0c913b492824c0e32f86cd22e738af3b4d9c0e78e5c
MD5 457f9112d0e87cee5011a849b6a83a43
BLAKE2b-256 08b827789b72f8b157fba568b76e2b1a30dccdac503cbf91a5bf6ddd58f6114a

See more details on using hashes here.

Provenance

The following attestation bundles were made for licenselynx-2.2.0-py3-none-any.whl:

Publisher: deploy.yaml on licenselynx/licenselynx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page