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)
>>> p.render()
'<?xml version="1.0" ?><Person name="Handsome B. Wonderful"><age>36</age></Person>'


Tue, 25 Sep 2012

dexml version 0.5.0 released

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.


Mon, 11 Jul 2011

Website Live

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.

FYI, the hosting is provided by the cheeseshop. The site is built using a combination of sphinx for the API docs and tutorial, and hyde for the general layout and management.


Older project news...