This small project allows you to decode DDEX files into friendly Python data types.
This project allows you to read DDEX files into friendly Python data types. XML files are decoded using the PyXB library.
Keep in mind that this is a fairly low level library that only aims at making DDEX files easier to read using Python. Some DDEX data structures expose lists containing only one element, and some value like UpdateIndicator are not cast as booleans.
Version 3.7 is causing issues with PyXB.
from ddexreader import open_ddex, ddex_to_dict xml_path = '/path/to/my/ddex_file.xml' ddex = open_ddex(xml_path) ddex_dict = ddex_to_dict(ddex)
After installing pyxb on your (unix) system, enter:
pyxbgen -u [the url to the definition file]
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|ddexreader-0.1.1-py2.py3-none-any.whl (2.0 MB) Copy SHA256 Checksum SHA256||2.7||Wheel||Sep 14, 2015|
|ddexreader-0.1.1.zip (2.0 MB) Copy SHA256 Checksum SHA256||–||Source||Sep 14, 2015|