cyclonedx-bom is a Python library and command-line tool for generating CycloneDX Software Bill of Materials (SBOM) for Python projects and environments. It supports various formats and schema versions of the CycloneDX specification. The current version is 7.3.0, and it maintains an active release cadence with frequent updates, with the latest release on March 30, 2026.
pip install cyclonedx-bomNo compatibility data collected yet for this library.
Demonstrates how to generate a CycloneDX SBOM for the current Python environment using the `cyclonedx-py` command-line tool and capture its JSON output.
Remove the `--PEP-639` flag from your CLI commands. PEP 639 handling is now implicit and always active.
Update your CLI commands to use `--spec-version` instead of `--schema-version` and `--output-file` instead of `--outfile`.
If programmatic SBOM generation is required, leverage `subprocess` to call `cyclonedx-py` commands, or consider using the `cyclonedx-python-lib` package for direct library interaction.
To generate SBOMs for Conda environments, activate the environment and use `cyclonedx-py environment` or pipe `conda list --json` output to `cyclonedx-py requirements -` if applicable.
Use the `-S` flag with caution. Evaluate whether the potential for incomplete component detection outweighs the benefits for your specific environment analysis.
Ensure your environment uses Python 3.9, 3.10, 3.11, 3.12, or 3.13.
Ensure `cyclonedx-bom` is installed and accessible: `pip install cyclonedx-bom` (for local environment) or `pipx install cyclonedx-bom` (for global execution), then verify installation with `cyclonedx-bom --version`.
Inspect the detailed validation errors (often printed in debug mode or alongside the main error) to identify and correct the specific issues in the input data or configuration that lead to non-compliant SBOM generation.
Freeze your dependencies by updating your `requirements.txt` file to include exact version numbers (e.g., `package==1.2.3`) or use `pip freeze > requirements.txt` to generate a frozen list.
Ensure your manifest files are saved with UTF-8 encoding. If running on Windows, you might need to explicitly set the Python interpreter's encoding or ensure your environment uses UTF-8 by default.
Use the `export` subcommand to specify the format: `cyclonedx-bom export --format json --output bom.json`.
No dependency data recorded yet.