Watch
1
0
Fork
You've already forked python-sbom
0
No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann 319b3291bb
Adding debian version 0.5.0-1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-11-21 19:30:41 +01:00
.github Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
bench Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
debian Adding debian version 0.5.0-1. 2026-11-21 19:30:41 +01:00
docs Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
src/python_sbom Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
tests Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
.git_archival.txt Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
.gitattributes Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
.gitignore Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
.pre-commit-config.yaml Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
.readthedocs.yaml Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
CONTRIBUTING.md Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
hatch_build.py Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
LICENSE Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
pylock.toml Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
pyproject.toml Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
README.md Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00
tox.toml Adding upstream version 0.5.0. 2026-11-21 19:00:56 +01:00

python-sbom

python-sbom

PyPI Supported Python versions check Documentation Status Downloads OpenSSF Scorecard

Software bills of materials (SBOMs) for Python distributions. python-sbom writes a CycloneDX SBOM into every wheel you build, where PEP 770 (a Python Enhancement Proposal) tells installers to keep it. The SBOM records your project, the runtime dependencies it declares, any wheels it bundles, and the build toolchain, and a rebuild with the same inputs reproduces it byte for byte.

Use

python-sbom works with every build backend. Pick the integration for yours:

Backend Add to [build-system] requires Turn it on
hatchling python-sbom[hatch] [tool.hatch.build.hooks.python-sbom]
pdm-backend python-sbom[pdm] [tool.python-sbom]
setuptools python-sbom[setuptools] [tool.python-sbom]
any other, such as meson-python, maturin, scikit-build-core or flit-core python-sbom build-backend = "python_sbom.backend", and your backend in [tool.python-sbom]

With hatchling:

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling>=1.28", "python-sbom[hatch]>=0.2"]

[tool.hatch.build.hooks.python-sbom]

With meson-python, or any backend without a plugin, python-sbom wraps it:

[build-system]
build-backend = "python_sbom.backend"
requires = ["meson-python>=0.18", "python-sbom>=0.2"]

[tool.python-sbom]
build-backend = "mesonpy"

For a wheel built outside the build interface, such as with maturin build, or renamed after it by auditwheel repair, embed the SBOM afterwards:

python-sbom embed dist/*.whl

To convert and validate SBOMs in continuous integration (CI), install the command line in a tool environment of its own with pipx or uv:

pipx install 'python-sbom[validate]'
python-sbom validate dist/

The documentation starts with a tutorial, then has a guide per backend, the options and commands, and how the SBOM is built. It also covers describing a zipapp, adding project knowledge through a content provider, and rendering an SBOM as SPDX (Software Package Data Exchange).

License

python-sbom's own code is under the MIT license. The wheel and source distribution also ship the schema files python-sbom validate checks documents against, unmodified from CycloneDX/specification, under the Apache-2.0 license. The package metadata covers both, so its license expression is MIT AND Apache-2.0.