[Tutor] python to serve xml or json or....

Kent Johnson kent37 at tds.net
Wed Jul 18 19:36:59 CEST 2007


Picio wrote:
> Hello, I' ve a bunch of things to ask about using Python as a server
> side language in a web application:
> I have a mysql db and I've alredy developed a python app that query
> the db and shot-out an xml file (made by the nice elementtree module
> like some people here on the list suggested). This file is then
> chewed-up by a javascript file who's responsible to generate a graph
> (see http://www.JSViz.org).
> Now I need to put it on line so that a user from web browser can query
> the db and see the graph. Next step could be to use ajax but for now
> something like a "PHP style" in python would be enough. I saw some PSP
> (python server pages) solution around but since I'm more or less a
> newbie I can't understand if I have to go to webware or spyce or a
> full fledged django.
> I like to start simple and make things more perfect but If there is a
> full featured solution to my case I will apply It.

This is hard to answer because there are many possibilities spanning a 
broad spectrum, and which is best depends on both requirements and 
personal taste. Django, TurboGears and Pylons are popular and include or 
support template languages and AJAX. Many more options listed here:
http://wiki.python.org/moin/WebFrameworks

Kent


More information about the Tutor mailing list