You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,14 @@ This library implements SPDX parsers, convertors, validators and handlers in Pyt
44
44
* visualize the structure of a SPDX document by creating an `AGraph`. Note: This is an optional feature and requires
45
45
additional installation of optional dependencies
46
46
47
-
# Planned features
47
+
## Experimental support for SPDX 3.0
48
+
* Create v3.0 elements and payloads
49
+
* Convert v2.2/v2.3 documents to v3.0
50
+
* Serialize to JSON-LD
51
+
52
+
See [Quickstart to SPDX 3.0](#quickstart-to-spdx-30) below.
53
+
The implementation is based on the descriptive markdown files in the repository https://github.com/spdx/spdx-3-model (latest commit: ea2e1446ae937c6722b3f599f95813f8747d54b4).
48
54
49
-
* up-to-date support of SPDX v3.0 as soon as it is released
In contrast to SPDX v2, all elements are now subclasses of the central `Element` class.
173
+
This includes packages, files, snippets, relationships, annotations, but also SBOMs, SpdxDocuments, and more.
174
+
For serialization purposes, all Elements that are to be serialized into the same file are collected in a `Payload`.
175
+
This is just a dictionary that maps each Element's SpdxId to itself.
176
+
Use the `write_payload()` functions to serialize a payload.
177
+
There currently are two options:
178
+
* The `spdx_tools.spdx3.writer.json_ld.json_ld_writer` module generates a JSON-LD file of the payload.
179
+
* The `spdx_tools.spdx3.writer.console.payload_writer` module prints a debug output to console. Note that this is not an official part of the SPDX specification and will probably be dropped as soon as a better standard emerges.
180
+
181
+
You can convert an SPDX v2 document to v3 via the `spdx_tools.spdx3.bump_from_spdx2.spdx_document` module.
182
+
The `bump_spdx_document()` function will return a payload containing an `SpdxDocument` Element and one Element for each package, file, snippet, relationship, or annotation contained in the v2 document.
183
+
184
+
166
185
# Dependencies
167
186
168
187
* PyYAML: https://pypi.org/project/PyYAML/ for handling YAML.
0 commit comments