Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjmc89/spdx-license-list
SPDX License List as a Python dictionary
https://github.com/jjmc89/spdx-license-list
Last synced: 2 months ago
JSON representation
SPDX License List as a Python dictionary
- Host: GitHub
- URL: https://github.com/jjmc89/spdx-license-list
- Owner: JJMC89
- License: mit
- Created: 2022-12-24T01:24:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T23:19:53.000Z (3 months ago)
- Last Synced: 2024-10-11T02:11:43.611Z (3 months ago)
- Language: Python
- Homepage:
- Size: 112 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Latest PyPI release](https://img.shields.io/pypi/v/spdx-license-list?logo=pypi)](https://pypi.org/project/spdx-license-list) ![Latest GitHub release](https://img.shields.io/github/v/release/JJMC89/spdx-license-list?logo=github) ![Latest tag](https://img.shields.io/github/v/tag/JJMC89/spdx-license-list?logo=git)
![License](https://img.shields.io/pypi/l/spdx-license-list?color=blue) ![Python versions](https://img.shields.io/pypi/pyversions/spdx-license-list?logo=python)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/JJMC89/spdx-license-list/main.svg)](https://results.pre-commit.ci/latest/github/JJMC89/pywikibot-extensions/main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
# SPDX License List
Provides the SPDX License List as a Python dictionary
Data source: [spdx/license-list-data](https://github.com/spdx/license-list-data)
Originally designed as a replacement for [Michael Pöhn's spdx-license-list](https://gitlab.com/uniqx/spdx-license-list) but does not have the same API
## Installation
```console
pip install spdx-license-list
```## API
`spdx_license_list.LICENSES` is a dictionary of all the licenses.
The dictionary uses the identifier (**id**) as the keys, and the values are (typed) named tuples with the following attributes:
- **id** (*str*) - short identifier to identify a match to licenses in the context of an SPDX file, a source file, or elsewhere
- **name** (*str*) - full name that should be the title found in the license file or consistent with naming from other well-known sources
- **deprecated_id** (*bool*) - idendifier is deprecated
- **fsf_libre** (*bool*) - license is [listed as free by the FSF](https://www.gnu.org/licenses/license-list.en.html)
- **osi_approved** (*bool*) - license is [OSI-approved](https://opensource.org/licenses)`spdx_license_list.EXCEPTIONS` is a dictionary of all the license exceptions.
The dictionary uses the identifier (**id**) as the keys, and the values are (typed) named tuples with the following attributes:
- **id** (*str*) - short identifier to identify a match to license exceptions in the context of an SPDX file, a source file, or elsewhere
- **name** (*str*) - full name that should be the title found in the license file or consistent with naming from other well-known sources
- **deprecated_id** (*bool*) - idendifier is deprecated