Skip to main content

A tool to query the SPDX license list.

Usage

API

import spdx_lookup as lookup

# Case-insensitive SPDX id lookup
lookup.by_id('gpl-3.0') # -> returns License object or None

# Case-insensitive SPDX name lookup
lookup.by_name('gpl-3.0') # -> returns License object or None

# Find closest match for provided license content
with open('some-license.txt') as f:
    match = lookup.match(f.read()) # -> returns LicenseMatch or None

match.confidence # -> a float between 0 and 100
match.license # -> a License object

Command-line tool

usage: spdx-lookup [-h] (-i ID | -n NAME | -d DIR | -f FILE)
                   {template,info} ...

optional arguments:
  -h, --help            show this help message and exit

Lookup method:
  -i ID, --id ID        Find license with given identifier
  -n NAME, --name NAME  Find license with given name
  -d DIR, --dir DIR     Search directory for valid license
  -f FILE, --file FILE  Read file to detect license

Actions:
  {template,info}
    template            print license template
    info                print metadata about license

License

BSD 2-clause. See LICENSE.

Metadata

Release files for spdx-lookup 0.3.3

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

Source distribution (sdist)

Source distribution for spdx-lookup 0.3.3
File Size Uploaded Provenance
spdx-lookup-0.3.3.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spdx-lookup 0.3.3
File Interpreter ABI Platform
spdx_lookup-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / spdx-lookup-0.3.3.tar.gz

Download URL spdx-lookup-0.3.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d41e08ecebb9a6720e8b1dff029b43802c9d929e06dcb648aea58ba93d8f125e
BLAKE2b-256 checksum
How to use checksums
2feaaad16afb2365fd84536a1dd42be115bb7079f56c3bc50c70257a3f4cfb94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.25.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6

Release files / spdx_lookup-0.3.3-py3-none-any.whl

Download URL spdx_lookup-0.3.3-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
108f66ebe42978332b1553c8eb43adfa856e3e863c3ae118f4cd4061b8aca3b6
BLAKE2b-256 checksum
How to use checksums
cfe09a56ce9ab694f1dce7f0ebd7b246b2b52d7f52f200f17ab3c4fd17194fa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.25.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6

Security for spdx-lookup 0.3.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files No provenance

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