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.1.tar.gz
(988.2 kB
view hashes)
Built Distribution
Close
Hashes for schematics_xml-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3122d59d4920d4ef0f0de8a7032ae12d0ceb2217cceb612a0658e9dca71081a2 |
|
MD5 | bd729a41884f27de9436ce8c1691eaf9 |
|
BLAKE2b-256 | fb0808d12fd9ac4f2b1212a1dab51f1ee46098e3d93bda1d3f214843701360fa |