Hacker News new | ask | show | jobs
by yazmeya 1618 days ago
In fact, you don't. Your WSGI app is not a web server. It does not run or network by itself and doesn't speak HTTP. You need a compatible web server (e.g. Gunicorn) to do that for you. It's really not that much different from good old CGI. It's simple and flexible enough for a large number of use cases. Of course, that's not the only way to write web apps in Python. Using a library like Pyramid et al, you launch the HTTP endpoint manually from the main program, and attach various handlers/whatnot to it. All "self-contained".
1 comments

I love Python for slicing and dicing data, automating tasks and building tools, but for a web server or web application it's a mess and is a bad choice.
What do you base this judgment on? I've built several web applications using Python and things worked very well and were far from being a mess.