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.0.tar.gz
(988.0 kB
view hashes)
Built Distribution
Close
Hashes for schematics_xml-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21655e35ceaba90c10003d915050c6154ab7cb9ee471014e1f66c833620bb17e |
|
MD5 | ac05a2395228278278a085b180f15947 |
|
BLAKE2b-256 | a0e41f49f8488d014b0160a689c389ecad4b35888306bae5f80da1804cec80a5 |