distro2sbom
raw JSON → 0.6.0 verified Fri May 01 auth: no python
A Python tool to generate Software Bill of Materials (SBOM) for system distributions (Debian, RPM, Arch, BSD). Currently at version 0.6.0, released irregularly. Supports SPDX and CycloneDX formats.
pip install distro2sbom Common errors
error ModuleNotFoundError: No module named 'distro2sbom' ↓
cause distro2sbom is not installed or Python environment is misconfigured.
fix
Run
pip install distro2sbom in the correct virtual environment. error distro2sbom: error: unrecognized arguments: --type debian ↓
cause In v0.4.1+, `--type` was renamed to `--distro-type`.
fix
Use
--distro-type debian instead of --type debian. error ValueError: Unsupported distribution type ↓
cause An invalid or unsupported distribution type was passed to `--distro-type`.
fix
Use one of: auto, deb, rpm, arch, bsd.
Warnings
gotcha distro2sbom is a command-line tool only. It does not expose a stable Python API; importing it directly is unsupported. ↓
fix Install and run via the command line as `distro2sbom [options]`.
breaking In v0.5.0, the default SBOM format changed. Scripts relying on the previous default may break. ↓
fix Specify format explicitly with `--format spdx` or `--format cyclonedx`.
deprecated The `--type` flag was replaced with `--distro-type` in v0.4.1. Using `--type` may be ignored. ↓
fix Use `--distro-type` instead of `--type`.
gotcha On non-Debian systems, Debian-specific features (e.g., `--input-file` with .deb) will fail silently or throw errors. ↓
fix Ensure the target distribution tools are installed (dpkg, rpm, etc.) and use the correct `--distro-type`.
Imports
- distro2sbom
import distro2sbom
Quickstart
from distro2sbom import cli
cli.main(["--help"])