Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Python schematics models for converting to and from XML.

Project description

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>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for schematics-xml, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size schematics_xml-0.2.1-py2.py3-none-any.whl (10.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size schematics-xml-0.2.1.tar.gz (990.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page