SpdxFile#

pydantic model technote.metadata.spdx.SpdxFile#

Representation of a SPDX license database file as a Pydantic model.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "SpdxFile",
   "description": "Representation of a SPDX license database file as a Pydantic model.",
   "type": "object",
   "properties": {
      "licenseListVersion": {
         "title": "Licenselistversion",
         "description": "Version string of this license file.",
         "type": "string"
      },
      "licenses": {
         "title": "Licenses",
         "type": "array",
         "items": {
            "$ref": "#/definitions/SpdxLicense"
         }
      }
   },
   "required": [
      "licenseListVersion",
      "licenses"
   ],
   "definitions": {
      "SpdxLicense": {
         "title": "SpdxLicense",
         "description": "A license item as contained in a `SpdxFile`.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Common human-readable name of the license.",
               "type": "string"
            },
            "licenseId": {
               "title": "Licenseid",
               "description": "SPDX license identifier.",
               "type": "string"
            },
            "seeAlso": {
               "title": "Seealso",
               "description": "URLs to documentation about this license.",
               "type": "array",
               "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2083,
                  "format": "uri"
               }
            },
            "isOsiApproved": {
               "title": "Isosiapproved",
               "description": "Flag indicating if the license is approved by the OSI (Open Software Initiative) ",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "licenseId",
            "isOsiApproved"
         ]
      }
   }
}

Fields:
field license_listVersion: str [Required] (alias 'licenseListVersion')#

Version string of this license file.

field licenses: List[SpdxLicense] [Required]#

The licenses.

classmethod load_internal()#

Load an SpdxFile from Technote’s package data.

Returns:

The SpdxFile instance from the licenses.json file packaged in Lander. This file is a mirror of the canonical license database maintained at spdx/license-list-data.

Return type:

SpdxFile