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.3.0.tar.gz (93.2 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.3.0-py3-none-any.whl (96.4 kB view details)

Uploaded Python 3

File details

Details for the file licenselynx-2.3.0.tar.gz.

File metadata

  • Download URL: licenselynx-2.3.0.tar.gz
  • Upload date:
  • Size: 93.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for licenselynx-2.3.0.tar.gz
Algorithm Hash digest
SHA256 f6b9195ab41f54ece5ab79bddbdac677c7dbec218a1157f98fc1ef36859878b7
MD5 b6171691483229cb19ed0d7151280f2d
BLAKE2b-256 2e538662c2863e5c1fd9ca7d06ed1c3d348c6d1095dffdf547cdb4c6bb663efc

See more details on using hashes here.

Provenance

The following attestation bundles were made for licenselynx-2.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: licenselynx-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 96.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for licenselynx-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01255e35e068ba3355019ee51e68c5cf3b3165073929a73190f6a3d2b8b5e867
MD5 38613f0743f6e723a774169af7388a65
BLAKE2b-256 bc97ca9df9a9b3c0ef39132ca159d4ff5d13c9d24fdcb60fc707b964007ff5ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for licenselynx-2.3.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