Skip to content

Commit

Permalink
docs: improve example for programmatic call of CLI (#670)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck authored Feb 2, 2024
1 parent cda86b3 commit 2ac3f21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,7 @@ However, there are older versions of this tool, that support `python>=2.7`.
This tool utilizes the [CycloneDX Python library][cyclonedx-library] to generate the actual data structures, and serialize and validate them.

This tool does **not** expose any additional _public_ API or symbols - all code is intended to be internal and might change without any notice during version upgrades.
However, the CLI is stable - you might call it programmatically, like so:
```python
from sys import executable
from subprocess import run
run((executable, '-m', 'cyclonedx_py', '--help'))
```
However, the CLI is stable - you might call it programmatically. See the documentation for an example.

## Contributing

Expand Down
7 changes: 3 additions & 4 deletions cyclonedx_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.

# !! version is managed by semantic_release
# !! version is managed by `semantic_release`
# do not use typing here, or else `semantic_release` might have issues finding the variable
# flake8: noqa
__version__ = "4.1.0"
__version__ = "4.1.0" # noqa:Q000

# There is no stable/public API.
# You might use this instead:
# However, you might call the stable CLI instead, like so:
# from sys import executable
# from subprocess import run
# run((executable, '-m', 'cyclonedx_py', '--help'))
2 changes: 1 addition & 1 deletion cyclonedx_py/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

__all__ = [ # type:ignore[var-annotated]
# There is no stable/public API.
# You might use this instead:
# However, you might call the stable CLI instead, like so:
# from sys import executable
# from subprocess import run
# run((executable, '-m', 'cyclonedx_py', '--help'))
Expand Down

0 comments on commit 2ac3f21

Please sign in to comment.