SPDX license list query tool
Project description
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.
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
spdx-lookup-0.3.3.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file spdx-lookup-0.3.3.tar.gz
.
File metadata
- Download URL: spdx-lookup-0.3.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d41e08ecebb9a6720e8b1dff029b43802c9d929e06dcb648aea58ba93d8f125e |
|
MD5 | 3f29dade32e73831aef6c95bc8dca28d |
|
BLAKE2b-256 | 2feaaad16afb2365fd84536a1dd42be115bb7079f56c3bc50c70257a3f4cfb94 |
File details
Details for the file spdx_lookup-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: spdx_lookup-0.3.3-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 108f66ebe42978332b1553c8eb43adfa856e3e863c3ae118f4cd4061b8aca3b6 |
|
MD5 | ad51805ccaae43f057ad1b23449919ed |
|
BLAKE2b-256 | cfe09a56ce9ab694f1dce7f0ebd7b246b2b52d7f52f200f17ab3c4fd17194fa4 |