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
Ahmed Hisham Ismail edited this page Jul 3, 2014
·
3 revisions
The module spdx.writers.tagvalue contains methods for writing out an SPDX document in tag/value format.
Methods
write_document
Takes two parameters document and out
out is any object that has a write method that takes as an argument a string to output, usually it's a file.
This method prints the top-level document fields version, data_license and comment. It uses the other methods in this module to output the subcomponents of the Document creation_info, reviews, package and extracted_licenses.
It raises an InvalidDocumentError (defined in the same module) if the document.validate returns False.
Note:
Document validation is only partially implemented.
Specifically package, extracted_license and file validations are stubs that return True.