Live data from Hacker News

Ask HN: Best Python web framework

news.ycombinator.com

91–100 of 110 posts

Re: Ask HN: Best Python web framework

#91
post #19

(Full disclosure: I'm a member of Django's core team) There's no single "best" for every application. One-size-fits-none. One of Django's strengths is in the fact that parts of the framework come off easily when they no longer serve your needs. If the ORM is no longer working for you, you can use SQLAlchemy or write raw SQL. Authentication no longer working for you? Write your own or use a 3rd party one. Et cetera. T…

> the smartest web hackers I know universally regard web2py as a fundamentally incorrect way to approach web development

Would you care to elaborate on that? Have any of these smart web hackers used web2py for real web development? I ask because web2py has had thousands of happy users building and maintaining web applications for several years now, and in practice, no one seems to be having the kinds of problems one might expect from a "fundamentally incorrect" approach. What exactly is fundamentally incorrect?

Re: Ask HN: Best Python web framework

#92
post #43

Earlier quoted context omitted.

I use both and personally if I'd have to generalize I would say Django for simpler stuff and Flask for complex stuff. Flask is great if you're going to do a complex app. All the interface will be custom designed (so the Django admin is of no use). You have a database heavy app, SQLAlchemy is more flexible than Django ORM and allows greater SQL expression, Unit of Work etc. Jinja2 is more flexible then Django template…

I'd just like to comment that, having built a medium to large Flask app over the last year, I would never recommend it as a framework for non-trivial sites. I don't even want to sum up the amount of time that Django would have solved my problem instantly, but instead I had to pull my hair out dealing with Flask's global variables, circular dependency issues, and general lack of cohesion or standards. I think it's a g…

I disagree. Flask's thread locals have never been a problem for me and it's not like you can escape them, most frameworks use them in some form implicitly, for example both Django and Pyramid. The circular dependency in Flask hasn't been a problem either, once I wrapped my head around how to do it properly. Lack of standards I would say is still a bit of a problem, but Blueprints helped. I wouldn't say Django has this one quite figured out either though, and in general I usually have to do some heavy customization when using 3rd party Django apps with their own views and urls.

Re: Ask HN: Best Python web framework

#95
post #19

(Full disclosure: I'm a member of Django's core team) There's no single "best" for every application. One-size-fits-none. One of Django's strengths is in the fact that parts of the framework come off easily when they no longer serve your needs. If the ORM is no longer working for you, you can use SQLAlchemy or write raw SQL. Authentication no longer working for you? Write your own or use a 3rd party one. Et cetera. T…

I use Django daily, and it's great for a lot of stuff, but I would have to disagree with your "Django for anything larger". Maybe I'm just building things where Django isn't appropriate, but for large stuff that need to integrate with legacy stuff, I would like avoid Django in the future.

Also, getting started on a Flask application is a lot more work than Django, setting up logins, permissions, database stuff and so on takes longer compare to Django. I would pick Django for something that just needs to be up and running quickly and with an okay admin interface.

If you start picking of core bit of Django, I personally think it starts to lose part of what makes it a handy framework.

But in the end your right, the framework isn't important, it's the product. I try out frameworks every now and then and pick the one I feel comfortable and happy working with. Currently that's Flask, but previously I normally went for web.py.

Re: Ask HN: Best Python web framework

#96
post #85
post #83

Earlier quoted context omitted.

Yes, Brubeck is awesome. What irritates me is this benchmark. https://gist.github.com/882555 >Availability: 99.98 % >Failed transactions: 2 I am guessing Brubeck runs solid now. But that benchmark was done 5 months ago and it's still advertised on this page. http://brubeck.io/readme.html

I see. I will update. This test was also performed with Eventlet and I found Eventlet to occasionally fail requests. I have since switched over to Gevent and the performance is significantly better than Tornado now. I will update this test very soon to demonstrate.

Updated: https://gist.github.com/882555 - Same URL as on http://brubeck.io/readme.html, but with new data I just finished collecting.

Re: Ask HN: Best Python web framework

#97
post #61

Earlier quoted context omitted.

I've never encountered those flamewars before (I don't know web2py), but I searched a bit, here is the web2py dev discussing one particular criticism: https://groups.google.com/d/topic/web2py/dmN54cpMuXo/discuss... https://groups.google.com/d/topic/web2py/GQWCsNzwP28/discuss... Armin Ronacher's take: http://lucumr.pocoo.org/2011/2/1/exec-in-python/

Ta - sadly, I'm all too familiar with it. If I found myself talking to someone who had used web2py, I'd be very interested in their critique, but sadly in every case so far, it's been second hand. Going back to the original discussions about this, and discounting the unnecessarily intemperate language used, it seems to boil down to web2py's conscious design decisions being discounted as "Pythonic heresy" - fair enoug…

> If I found myself talking to someone who had used web2py, I'd be very interested in their critique, but sadly in every case so far, it's been second hand.

In two years of active mailing list participation, I've never seen any actual users complain about these problems. They are hypothetical concerns that simply do not arise in real world usage.

Re: Ask HN: Best Python web framework

#98

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…

> web2py appears both bad and unpopular to me.

Regarding popularity, for some time now the web2py Google Group has had more postings than the Django group, and the web2py group membership has been growing at a much faster rate than Django. Overall, Django is still more widely used, but web2py is certainly popular and growing rapidly.

Regarding whether web2py is "bad", that's obviously your opinion, but it is notable that you did not provide any argument or evidence whatsoever to support it.

Re: Ask HN: Best Python web framework

#99

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…

[deleted]

Re: Ask HN: Best Python web framework

#100

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…

[deleted]
Post reply on HN