schematics-xml

Python schematics models for converting to and from XML.


Keywords
schematics, xml, model, modelling, dicttoxml, xmltodict
License
MIT
Install
pip install schematics-xml==0.2.1

Documentation

schematics-xml

Python schematics models for converting to and from XML.

Build Status Code Health Code Coverage Documentation Status Latest Version Supported Python versions

Install

pip install schematics-xml

Example Usage

Simply inherit XMLModel.

from schematics_xml import XMLModel

class Person(XMLModel):
    name = StringType()

john = Person(dict(name='John'))

xml = john.to_xml()

XML now contains;

<?xml version='1.0' encoding='UTF-8'?>
<person>
  <name>John</name>
</person>

And back the other way;

john = Person.from_xml(xml)

Author

Alex Hayes <alex@alution.com>