spdx-lookup


Namespdx-lookup JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/bbqsrc/spdx-lookup-python
SummarySPDX license list query tool
upload_time2020-12-07 01:56:02
maintainer
docs_urlNone
authorBrendan Molloy
requires_python
licenseBSD-2-Clause
keywords spdx licenses database lookup query
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            spdx-lookup
===========

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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bbqsrc/spdx-lookup-python",
    "name": "spdx-lookup",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "spdx,licenses,database,lookup,query",
    "author": "Brendan Molloy",
    "author_email": "brendan+pypi@bbqsrc.net",
    "download_url": "https://files.pythonhosted.org/packages/2f/ea/aad16afb2365fd84536a1dd42be115bb7079f56c3bc50c70257a3f4cfb94/spdx-lookup-0.3.3.tar.gz",
    "platform": "",
    "description": "spdx-lookup\n===========\n\nA tool to query the SPDX license list.\n\nUsage\n-----\n\nAPI\n~~~\n\n::\n\n    import spdx_lookup as lookup\n\n    # Case-insensitive SPDX id lookup\n    lookup.by_id('gpl-3.0') # -> returns License object or None\n\n    # Case-insensitive SPDX name lookup\n    lookup.by_name('gpl-3.0') # -> returns License object or None\n\n    # Find closest match for provided license content\n    with open('some-license.txt') as f:\n        match = lookup.match(f.read()) # -> returns LicenseMatch or None\n\n    match.confidence # -> a float between 0 and 100\n    match.license # -> a License object\n\nCommand-line tool\n~~~~~~~~~~~~~~~~~\n\n::\n\n    usage: spdx-lookup [-h] (-i ID | -n NAME | -d DIR | -f FILE)\n                       {template,info} ...\n\n    optional arguments:\n      -h, --help            show this help message and exit\n\n    Lookup method:\n      -i ID, --id ID        Find license with given identifier\n      -n NAME, --name NAME  Find license with given name\n      -d DIR, --dir DIR     Search directory for valid license\n      -f FILE, --file FILE  Read file to detect license\n\n    Actions:\n      {template,info}\n        template            print license template\n        info                print metadata about license\n\nLicense\n-------\n\nBSD 2-clause. See LICENSE.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "SPDX license list query tool",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/bbqsrc/spdx-lookup-python"
    },
    "split_keywords": [
        "spdx",
        "licenses",
        "database",
        "lookup",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfe09a56ce9ab694f1dce7f0ebd7b246b2b52d7f52f200f17ab3c4fd17194fa4",
                "md5": "ad51805ccaae43f057ad1b23449919ed",
                "sha256": "108f66ebe42978332b1553c8eb43adfa856e3e863c3ae118f4cd4061b8aca3b6"
            },
            "downloads": -1,
            "filename": "spdx_lookup-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ad51805ccaae43f057ad1b23449919ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5548,
            "upload_time": "2020-12-07T01:56:01",
            "upload_time_iso_8601": "2020-12-07T01:56:01.155556Z",
            "url": "https://files.pythonhosted.org/packages/cf/e0/9a56ce9ab694f1dce7f0ebd7b246b2b52d7f52f200f17ab3c4fd17194fa4/spdx_lookup-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2feaaad16afb2365fd84536a1dd42be115bb7079f56c3bc50c70257a3f4cfb94",
                "md5": "3f29dade32e73831aef6c95bc8dca28d",
                "sha256": "d41e08ecebb9a6720e8b1dff029b43802c9d929e06dcb648aea58ba93d8f125e"
            },
            "downloads": -1,
            "filename": "spdx-lookup-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3f29dade32e73831aef6c95bc8dca28d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4987,
            "upload_time": "2020-12-07T01:56:02",
            "upload_time_iso_8601": "2020-12-07T01:56:02.483821Z",
            "url": "https://files.pythonhosted.org/packages/2f/ea/aad16afb2365fd84536a1dd42be115bb7079f56c3bc50c70257a3f4cfb94/spdx-lookup-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-12-07 01:56:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bbqsrc",
    "github_project": "spdx-lookup-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spdx-lookup"
}
        
Elapsed time: 0.26946s