Python schematics models for converting to and from XML.
Project description
Python schematics models for converting to and from XML.
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='ISO-8859-1'?>
<person>
<name>John</name>
</person>
And back the other way;
john = Person.from_xml(xml)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
schematics-xml-0.1.2.tar.gz
(989.3 kB
view hashes)
Built Distribution
Close
Hashes for schematics_xml-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c54131bf84534416b66bd500dfa837698fde1465194bcce3d4c33431ae24a6c |
|
MD5 | 33bbbd4616b76f6dff996b45bce1565f |
|
BLAKE2b-256 | 9356d24d5c8e1b853105374ff7f4aeb144742f1c929cb71f84d0238708f522b3 |