The goal is to be able to quickly extract all the available information in the document to a python dictionay. The dictionay can then be stored in a database or a csv file (for a later Machine ...
yq can be called as a module if needed. With -y/-Y, files can be edited in place like with sed -i: Because YAML treats JSON as a dialect of YAML, you can use yq to convert JSON to YAML: yq -y . < ...