The xmlschema library is an implementation of XML Schema for Python.