ibflex is a Python library for converting brokerage statement data in Interactive Brokers' Flex XML format into standard Python data structures, so it can be conveniently processed and analyzed with ...
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 . < ...