[Tutor] MySQL -->Python-->XML for JSviz

Alan Gauld alan.gauld at btinternet.com
Tue Jul 3 23:31:02 CEST 2007

"Picio" <picioslug at gmail.com> wrote

> I know there are a lot of good tools to do this in pyhton

Yep, you could use minidom and I think ElementTree can write
XML as well as read it.

> flexibility for the future I'd like to use an Object relational 
> mapper
> like SQLAlchemy or SQLObject todo the job.

ORMs are good at translkating between objects in memory
and SQL they are not generally good at XML. You will probably
be better combining an ORM with a templating system like Kid
or Cheetah. They are designed to generate XML and fill in the
blanks with data.

> have in mind a solution to have multiple formats coming outside of 
> the
> ORM: json, csv, plain text etc...

Kid can definitely do XML, JSON. The ORM and plain Python is
probably best for plain text and similarly the csv module will handle
that format.


Alan G. 

More information about the Tutor mailing list