bridge.services.spdx.spdx_ingestor module#
Async client for the SPDX license list. Fetches a license by SPDX identifier and returns the full JSON payload, including the canonical license text.
- class bridge.services.spdx.spdx_ingestor.SPDXLicenseIngestor(spdx_id)[source]#
Bases:
IngestorIngest license metadata from the SPDX license list by SPDX identifier.
This client fetches the JSON representation of a single license from the SPDX license list, which includes the canonical license text (
licenseText), name, and other metadata.- Parameters:
spdx_id (str) – SPDX license identifier (e.g.
"MIT","GPL-3.0-only").
- async fetch()[source]#
Fetch the SPDX license record for the specified SPDX identifier.
- Returns:
JSON metadata for the SPDX license, including at least
licenseId,name, andlicenseTextfields.- Return type:
dict
- Raises:
SPDXLicenseNotFoundError – If the SPDX service does not return a valid license record.
httpx.RequestError, httpx.HTTPStatusError – For network/HTTP issues.