[mod_python] How do you use mod_python?

David Geller dg at sponsera.com
Thu Jan 19 15:56:30 EST 2006


Hi all,

Well, my use of mod_python for developing web apps has been progressive 
and gradual.

The first use (when I was just learning Python) was for a simple rss 
reader - and there, I wrote custom handlers, doing everything "by hand". 
Even the database was done "raw" - no ORM's or anything fancy.

Next, I discovered Cheetah, and combined it with mod_python. Which was 
cool, and worked for what I needed to do - but then my needs were simple.

After looking and evaluating what seems like dozens of packages (which I 
try continually to do at least a little of) I came to what I still think 
is one of the best packages out there for advanced templating and 
providing a basic framework for complex applications: Myghty. The 
package is superb, the documentation second to none (which is very 
important), and the support from the author, Mike Bayer, and the 
community excellent. Due to its high-level nature, it distances your 
application from mod_python, and in fact supports mod_python among other 
python web interfaces transparently.

Using mod_python, Myghty, FormEncode and SqlObject, I wrote a 
forum/bulletin board system called Topicale (which, alas, I have not had 
time to refine to where I feel comfortable to release !) Also wrote an 
extensive package for doing questionnaires on the web, which was 
deployed and used extensively for almost two years.

We now operate a family of dynamically-concocted websites for obtaining 
leads for professionals (www.capitalcounselors.com is one example) - 
they use mod_python, along with Myghty.

I am now looking into this new database package, also by Mike Bayer, 
called Sqlalchemy. I may not quite be ready for prime time, but it looks 
extremely promising for all things database in Python. It separates 
schema definitions from objects, and lets you combine the two in a 
multitude of ways which seems really flexible.

Anyway, if you want to use Apache, mod_python works just fine. And if 
you use something like Myghty, it makes things much much easier and 
opens up a world of possibilities with minimal work (although, as usual, 
things tend to always take more work than they should!).

Cheers-
David




More information about the Mod_python mailing list