Skip to content

Get Started

XML Support

As you probably already know, DDEX relies heavily on XML.

This package is a lightweight, generic module you can use to easily create and validate DDEX XML documents – for any schema that python can parse.

For example, we can create a DDEX XML document from a Python object:

from ddex import xml_to_ddex

ddex = xml_to_ddex(path="Audio.xml")

Schemas can be automatically generated or can be manually submitted.

from ddex import load_ddex_xsd_schema, xml_to_ddex

schema = load_ddex_xsd_schema(path="release-notification.xsd")
ddex = xml_to_ddex(path="Audio.xml", schema=schema)


JSON Support

from ddex import json_to_ddex

ddex = json_to_ddex(path="Audio.json")


Creating your own python modules

You might also find it useful to create your own modules for DDEX objects.

It's not a great idea to constantly load and create DDEX objects, for one reason that they don't change often, and secondly because you can save lots of time and work by not constantly downloading files.

from ddex import generate_ddex_module


# You can then import the module (my.api.schemas.ern42)
# and use it just like any other python module