A collection of opinions, thoughts, tricks and misc. information.
I've just started (and, surprisingly, am almost done) with a new project of mine. You've all probably worked with turbogears and cherrypy, and you're aware of how wonderful they can make life for python web developers. I've been using cherrypy for a while now with a framework of my own very similar to turbogears. In fact, the std matching site
that I developed runs on it. I called it zippo.
It got very complicated, as would be expected, and I decided recently I'd take a look into the code and start cleaning it up a bit further. That got me thinking of other development techniques, such as mod_python. I prefer mod_python over cherrypy, as it hooks directly into apache instead of needing to be run through its own server. It makes life a little easier to find hosting (although the folks at python-hosting.com do a good job). So I started to wonder if I could port the zippo cp stuff to mod_python. Sure enough, I found the way to do it, and created my own nifty handler. It's not nearly as full-featured as cherrypy, but it does the job well...
So far I've got the following functional:
- path model (class hierarchy)
- continuation-based modelling
- RDBM-based sessions
- templating (via cheetah, but easily changed)
- configuration via the path model
- user authentication
I've still got a lot of work to do on refining it until it's ready for production, but I think I'm going to GPL it so all you people who never read my blog can use it, too. For a simple "Hello World" page I'm getting about 560 requests per second with ab (1.7 GHz Pentium4), and with a more complicated page involving user authentication and uncompiled cheetah templates, about 230 rps.. Not all that bad. Give me a few more days and I'll put out the first release.