Skip to content

Commit 2ac3f21

Browse files
authored
docs: improve example for programmatic call of CLI (#670)
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent cda86b3 commit 2ac3f21

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ However, there are older versions of this tool, that support `python>=2.7`.
102102
This tool utilizes the [CycloneDX Python library][cyclonedx-library] to generate the actual data structures, and serialize and validate them.
103103

104104
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.
105-
However, the CLI is stable - you might call it programmatically, like so:
106-
```python
107-
from sys import executable
108-
from subprocess import run
109-
run((executable, '-m', 'cyclonedx_py', '--help'))
110-
```
105+
However, the CLI is stable - you might call it programmatically. See the documentation for an example.
111106

112107
## Contributing
113108

cyclonedx_py/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
# SPDX-License-Identifier: Apache-2.0
1414
# Copyright (c) OWASP Foundation. All Rights Reserved.
1515

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

2120
# There is no stable/public API.
22-
# You might use this instead:
21+
# However, you might call the stable CLI instead, like so:
2322
# from sys import executable
2423
# from subprocess import run
2524
# run((executable, '-m', 'cyclonedx_py', '--help'))

cyclonedx_py/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

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

0 commit comments

Comments
 (0)