| 1 |
``download`` command |
| 2 |
==================== |
| 3 |
|
| 4 |
.. automodule:: debsbom.commands.download.DownloadCmd |
| 5 |
|
| 6 |
.. argparse:: |
| 7 |
:module: debsbom.cli |
| 8 |
:func: setup_parser |
| 9 |
:prog: debsbom |
| 10 |
:path: download |
| 11 |
|
| 12 |
JSON Output Schema |
| 13 |
------------------ |
| 14 |
|
| 15 |
When the application is run with JSON output enabled (via the ``--json`` flag), |
| 16 |
status messages are emitted as single-line JSON objects to standard output. |
| 17 |
Each line represents a distinct package download operation. |
| 18 |
|
| 19 |
The schema for these JSON objects is as follows: |
| 20 |
|
| 21 |
.. literalinclude:: ../../../src/debsbom/schema/schema-download.json |
| 22 |
:language: json |
| 23 |
|
| 24 |
Fields |
| 25 |
~~~~~~ |
| 26 |
|
| 27 |
* **status**: |
| 28 |
The status of the download operation. This field will contain one of the |
| 29 |
following predefined values from the :py:class:`DownloadStatus` enum: |
| 30 |
|
| 31 |
* ``"ok"``: The file was either successfully downloaded or found in the cache, and the checksum was verified. |
| 32 |
* ``"checksum_mismatch"``: The downloaded file's checksum did not match the expected value. |
| 33 |
* ``"not_found"``: The requested file or package could not be located. |
| 34 |
|
| 35 |
* **package**: |
| 36 |
An object identifying the package, including the name and the version as a string. |
| 37 |
|
| 38 |
* **filename**: |
| 39 |
The name of the processed file or an empty string if the package is unavailable. |
| 40 |
|
| 41 |
* **path**: |
| 42 |
The absolute path to the downloaded file or an empty string if nothing could be downloaded. |