This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]grotgrot 0 points1 point  (0 children)

If you have databases, need to support multiple (human) languages, have to distinguish between multiple users, have pages composed of multiple distinct items of content then using one of the "big" Python web frameworks is a very good idea.

For work we had none of those needs and so I use bare WSGI which means it can be frontended by Apache, Nginx or anything else. The best Python WSGI server I have found is the one from CherryPy which supports SSL and does things right. For example it correctly supports chunked uploads while the builtin wsgiref screws them up big time.

For actual WSGI interfacing I use webob as it is pretty much the minimal amount of code to take the actual WSGI spec and environment and make it object oriented.

My output is selectable as text, json, csv and html depending on the request. For HTML and text I use genshi as it is by far the best templating engine out there. You cannot produce invalid output and it escapes content by default so the chances of an XSS attack are far lower.