Dexml is a dead-simple object-XML mapper for Python.
Loosely inspired by Django's ORM, dexml takes the obvious mapping between XML tags and Python objects and lets you capture that as cleanly as possible. You write some simple class definitions to define your models and their attributes, and dexml handles the round-tripping to and from XML.
To get started, check out the unfortunately-still-a-work-in-progress tutorial, the FAQ, or the auto-generated API listing.
Or if you just want to get up and running in a hurry, here's a quick sample of dexml in action:
>>> import dexml
>>> from dexml import fields
>>> class Person(dexml.Model):
... name = fields.String()
... age = fields.Integer(tagname="age")
>>> p = Person(name="Handsome B. Wonderful",age=36)
'<?xml version="1.0" ?><Person name="Handsome B. Wonderful"><age>36</age></Person>'
Version 0.5.0 of dexml has been released.
This release fixes some unicode rendering/encoding issues, implements pretty-printed output, and cleans up some behaviour around List/Dict fields with wrapper tags.
The dexml project has a website!
Yes, I've finally gotten around to finding a website/documentation toolchain that works for me. This means I'm going to be writing and expanding a tutorial, providing FAQs, and other fun things that just don't fit into the PyPI package page.