skillfed

lib4sbom

Software Bill of Material (SBOM) generator and consumer library

lib4sbom v0.10.4 317.0K downloads/30d#7,668 on PyPI44
Permissive license Apache-2.0 Active released

What it is and what it does

Lib4sbom is a Python library that abstracts away the differences between SPDX and CycloneDX SBOM formats, letting you parse and generate bills of materials without rewriting code for each format. It handles SPDX versions 2.2, 2.3, and 3.0 in TagValue, JSON, YAML, XML, RDF, and JSON-LD formats, plus CycloneDX versions 1.4 through 1.7 in JSON and XML. The library also supports parsing SBOMs embedded in In-Toto attestations and Protobom objects.

You work with a common set of SBOM data objects—files, packages, relationships, vulnerabilities, services, and cryptography metadata—regardless of which format you're reading or writing. This is useful for DevSecOps pipelines, supply-chain security tooling, and any workflow that needs to consume or produce SBOMs from multiple sources without format-specific branching logic.

Use it for:

  • Parse SBOMs from different tools (e.g., Syft, CycloneDX generators) into a unified data model for analysis.
  • Convert between SPDX and CycloneDX formats by parsing one and generating the other.
  • Extract vulnerability, package, and relationship data from SBOMs for compliance or risk reporting.
  • Build DevSecOps automation that ingests SBOMs from CI/CD pipelines without caring which format they use.
  • Embed SBOM parsing into security scanning tools that need to work with multiple SBOM standards.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Lib4sbom parses and generates Software Bill of Materials (SBOMs) in SPDX and CycloneDX formats, providing a unified abstraction layer to work with SBOMs regardless of their underlying format.

Yes. Lib4sbom is actively maintained, has no known vulnerabilities, and solves a real problem for anyone working with multiple SBOM formats. The low install friction and broad Python version support (3.9–3.14) make it a straightforward dependency. The alpha status reflects ongoing development, but the API is stable enough for production use in supply-chain and DevSecOps workflows.

Install

lib4sbom on PyPI

pip

pip install lib4sbom

uv

uv add lib4sbom

poetry

poetry add lib4sbom

Installing lib4sbom

Before you install

Low install friction; pure Python wheel with seven runtime dependencies (pyyaml, semantic_version, defusedxml, fastjsonschema, jsonschema, xmlschema, packageurl-python). Active maintenance with recent releases; last commit 2026-08-10.

License in practice

Apache-2.0 permissive license; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install lib4sbom

from lib4sbom.parser import SBOMParser

parser = SBOMParser()
parser.parse_file('sbom.spdx')
packages = parser.get_packages()

Requires Python 3.9 or later.

Verify before relying

  • Whether the library can round-trip SBOMs (parse and regenerate) without data loss across all supported formats.
  • Performance characteristics when parsing very large SBOMs with thousands of packages.
  • Completeness of SPDX RDF and XML support beyond the noted 'few package attributes'.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 7 — pyyaml, semantic_version, defusedxml, fastjsonschema, jsonschema, xmlschema, packageurl-python
Maintenance actively maintained — 119 days since the last release
Last repo commit
First released
Downloads 317,001/month — #7,668 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: lib4sbom-0.10.4-py3-none-any.whl

Keywords: security, tools, SBOM, DevSecOps, SPDX, CycloneDX, library

Development Status :: 3 - AlphaIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

SBOM parser generatorsoftware bill of materials librarySPDX CycloneDX parsingSBOM format conversionsupply chain component trackingDevSecOps SBOM toolsvulnerability tracking SBOM
sbomsupply-chain-securitydevops

More Build Tools packages