Registry / devops / distro2sbom

distro2sbom

JSON →
library0.6.0pypypi✓ verified 85d ago

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
INSTALL
IMPORT
SIG · DISTRO2SBOM
D
distro2sbom
devopspythonv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

distro2sbom
import distro2sbom
The library is a CLI tool, not meant for Python import. No public API.

Run the CLI from Python (avoid). Prefer command line: distro2sbom --help

from distro2sbom import cli cli.main(["--help"])
distro2sbom --version
Debug
Known issues
gotchadistro2sbom 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]`.
affects: all
breakingIn 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`.
affects: >=0.5.0
deprecatedThe `--type` flag was replaced with `--distro-type` in v0.4.1. Using `--type` may be ignored.
fix
Use `--distro-type` instead of `--type`.
affects: <0.4.1
gotchaOn 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`.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'distro2sbom'
distro2sbom is not installed or Python environment is misconfigured.
fix
Run `pip install distro2sbom` in the correct virtual environment.
distro2sbom: error: unrecognized arguments: --type debian
In v0.4.1+, `--type` was renamed to `--distro-type`.
fix
Use `--distro-type debian` instead of `--type debian`.
ValueError: Unsupported distribution type
An invalid or unsupported distribution type was passed to `--distro-type`.
fix
Use one of: auto, deb, rpm, arch, bsd.
Upgrade
Version history
0.6.0latest on PyPI · released Apr 21, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
distro2sbom — pip install distro2sbom · libregistry