Live data from Hacker News

Ask HN: Best Python web framework

news.ycombinator.com

1–10 of 110 posts

Ask HN: Best Python web framework

#1
I know this question gets asked every now and again, but the most recent informed thread I found was two years old and, as we all know, things move on.

Last time, the answer could be summarized as "Django but ...", with Pylons and Flask getting a good mention. Have these now "overtaken" the incumbent? What about Web2Py?

Re: Ask HN: Best Python web framework

#3
Sadly, Django is still by far the most popular. It's ok, though. You're likely to not hate it intensely. It also has a lot of third party code available, and a fair amount of functionality built-in.

Flask is nicer (and lets you seamlessly use SQLAlchemy, which is so much better than Django's crappy ORM), but also tiny. It's basically just a bit of glue between werkzeug, SQLAlchemy and Jinja2.

Pyramid has more things in it than Flask and also uses SQLAlchemy.

web2py appears both bad and unpopular to me.

Re: Ask HN: Best Python web framework

#4
The best for what? What do you want to do?

We have found Django to be great for throwing up a site quickly. We primarily use Pyramid now for our more serious development as it fits more with what we're trying to achieve. My feeling is the beauty of Python is that there are more than one ways of doing something. Define what you want out of your framework, try some and then see how you feel

Re: Ask HN: Best Python web framework

#6
post #4

The best for what? What do you want to do? We have found Django to be great for throwing up a site quickly. We primarily use Pyramid now for our more serious development as it fits more with what we're trying to achieve. My feeling is the beauty of Python is that there are more than one ways of doing something. Define what you want out of your framework, try some and then see how you feel

The specific project I'm looking at is a small photo-sharing app for a newspaper website. Functionally simple, but with some pretty intense traffic spikes. Since it's a straightforward job I'd like to use it as an opportunity to switch to Python, which I've been itching to do for a while (alternative would be Symfony on PHP).

However I have a longer term concern, which is that I don't want to be learning a new framework for every project or have legacies with the "wrong" framework knocking around. This is why I framed the question in general terms.

Re: Ask HN: Best Python web framework

#9
post #4

The best for what? What do you want to do? We have found Django to be great for throwing up a site quickly. We primarily use Pyramid now for our more serious development as it fits more with what we're trying to achieve. My feeling is the beauty of Python is that there are more than one ways of doing something. Define what you want out of your framework, try some and then see how you feel

from ">>> import this"

"There should be one-- and preferably only one --obvious way to do it."

Re: Ask HN: Best Python web framework

#10
I use web2py. It struggles to get the attention that Django gets, but it has a robust development community.

It offers a good balance between Django (which i find a little big and unwieldy), and Flask (which I think suffers from the opposite problem).

Post reply on HN