Skip to content

alexhayes/schematics-xml

Repository files navigation

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>

About

Python schematics models for converting from and to XML.

Resources

License

Stars

Watchers

Forks

Packages

No packages published