spdx_licenses

A library to retrieve the list of commonly used licenses from the SPDX License List.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License BSD3
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:24

Tags

Installation

nimble install spdx_licenses
choosenim install spdx_licenses
git clone https://github.com/euantorano/spdx_licenses.nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
spdx_licenses - - - - - - -

README

spdx_licenses CircleCI Build Status

A library to retrieve the list of commonly used licenses from the SPDX License List.

Installation

Add to your .nimble file:

# Dependencies

requires "spdx_licenses >= 1.0.0"

Or to install it globally run:

nimble install spdx_licenses

Documentation

Usage

There are async versions of all of the exported methods. For cases where you pass in a custom AsyncHttpClient, simply call the procedures as normal. For cases when using the default HttpClient, the call is postfixed with Async (eg: getLicenseList() is getLicenseListAsync()).

  • Retrieving a list of all licenses, as a table keyed by license ID:
import spdx_licenses

# You can also pass in your own custom `HttpClient` instance if you have one you wish to re-use
let licenses = getLicenseList()

echo "Found licenses: "

for lic in licenses.keys:
  echo "- ", lic
  • Getting the license text for a specific license by license ID:
import spdx_licenses

# You can also pass in your own custom `HttpClient` instance if you have one you wish to re-use
let licenseText = getLicenseText("BSD-3-Clause")

echo licenseText