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='UTF-8'?>
<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.2.0.tar.gz
(990.0 kB
view hashes)
Built Distribution
Close
Hashes for schematics_xml-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f35e51a8220765d9134bd43f36193e8a46605179d57ce0852ce94a86ca801621 |
|
MD5 | 45256ee5c06103301a6ae3e2ccf2e29a |
|
BLAKE2b-256 | d760adf38a3ec5871ef63c95cb1ba015e334cdcdb47fe54cd12818c097b8f206 |