Live data from Hacker News

Flask 1.0 Released

palletsprojects.com

101–110 of 184 posts

Re: Flask 1.0 Released

#101
post #21

Earlier quoted context omitted.

I've never seen Falcon, thanks. Flask is still one of the most approachable frameworks I've used. It's great for getting something hacked out really quickly, but for asynchronous requests Tornado is where it's at. That being said, when I really want performance I usually reach for Golang.

Check out Sanic if you want an async python framework with a similar API to flask

Its pretty hard to beat Tornado's api, IMHO. Its a really rich api for how simple and quick it is to learn. Flask is a definite downgrade to me, when it comes to the api.

But Flask wins hands down on the richness of its ecosystem.

Re: Flask 1.0 Released

#102
post #75
post #48

Earlier quoted context omitted.

In my experience, Django is less suitable for large projects than Flask. The nature of Django encourages tight coupling between unrelated parts of the system - Models intertwine database operations and business logic, ModelViews intertwine db operations, business logic and the interface layer. This is manageable in the small, but when you hit scale, this tight coupling adds a whole bunch of unnecessary complexity to…

I was about to post something similar, but this nicely summarizes my feelings. Even with DRF (for REST APIs) the extreme coupling at all layers makes things painful, though it's possible to reduce that pain a little with some carefully enforced rules. (I would like to see a way of disabling QuerySet traversing, so that if you try to access something that you didn't already prefetch_related/select_related then you jus…

Your should look into the django-seal package which enforces this sort of constraint that you're asking for

Re: Flask 1.0 Released

#103
post #11
post #6

This is epic. In theory now from V1 onwards it should be easier to convince people at big serious corps to use Flask as it cuts down a lot of Django bloat especially for smaller applications, microservices and other nimble backends.

Hopefully! There's a bad attitude I've noticed about Flask, people don't take it seriously and treat it like a learning tool or a library for quick and dirty hack projects. All because it's simple to learn and free of bullshit and Just Works™. Should lead to the opposite attitude, but nope. People apparently enjoy extra complexity.

There is a similar feeling towards SQLite

Re: Flask 1.0 Released

#104

Is there a good "zero config" application server for Flask that is considered standard now? I absolutely loved building an app with Flask but I rememeber deployment being a pain.

PythonAnywhere isn't zero config, but pretty easy in my experience: https://help.pythonanywhere.com/pages/Flask/

Re: Flask 1.0 Released

#105
post #10

I don't understand why use Flask instead of Django, I usually work with a lot of crud systems, I think that Django is the best option to do it. I think that Django is better because it has an autogenerated admin site and this is really helpful when you work with the customers, they can easily populate the database while you work in the logic

Django is pretty good at that! I think we usually try to compare frameworks to an extreme when partly it boils down to the type problem and the developer preferences.

Re: Flask 1.0 Released

#107
post #28

Flask has a stigma for not being that good when building larger apps, but honestly Flask scales really well for that type of use case (coming from a development / maintenance point of view). I have some pretty large Flask apps with dozens of top level dependencies and models spanning across many thousands of lines of code. Even if I don't touch the code base for a few months, it's easy to jump back into it. I'm also…

How do other users of Flask handle async calls to third party APIs? I use celery which works okay but it still feels quite clunky.

Re: Flask 1.0 Released

#108
post #28

Flask has a stigma for not being that good when building larger apps, but honestly Flask scales really well for that type of use case (coming from a development / maintenance point of view). I have some pretty large Flask apps with dozens of top level dependencies and models spanning across many thousands of lines of code. Even if I don't touch the code base for a few months, it's easy to jump back into it. I'm also…

My employer made me switch from Flask to Django providing non-scalability reason. I asked around on a few online forums and they told me that flask has no such issues. There was an article where somebody from DISQUS explained how they were able to use flask in production without much hassel and there's no reason to switch to django. My employer told me to not use flask as it is not production grade. The problem was t…

Disqus is built with Django, isn't it? I've always read that and I've seen articles about it last year. Or do they use a chimera between Django and Flask? It's easy to find Django's "csrfmiddlewaretoken" input hidden in some of their forms, such as the authentication ones.

Re: Flask 1.0 Released

#109
post #37

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

Another interesting API framework from the DRF author: https://github.com/encode/apistar Uses Python3 type annotations to do serialization. Not sure it's ready for production, but it has some very interesting new concepts. Also worth mentioning Sanic which is fast and I believe dispenses with Flask warts like the thread-local Request object (though it does bill itself as "Flask-like").

Yeah, Apistar has an interesting approach, but that's just more unpredictable magic.

Re: Flask 1.0 Released

#110
post #83
post #68

Earlier quoted context omitted.

I think that's more because Flask is a micro web framework whereas Rails is a macro web framework. Sinatra, Express, and Compojure are micro frameworks in the same vein as Flask, and they encourage simplicity of mental model over batteries-included comprehensiveness of features that you find in Rails, Sails, and Django. In general I prefer some kind of a middle ground but I don't think there's middle-ground framework…

It's bizarre there are few or no offerings in that elusive middle ground. Rails & Django seems a little heavy. Flask & Express a little lite. I've never written an app that did not need user management, sessions, admin, db access, form processing, views/templating. Web2py is the best I've found (python).

Will the needs not be satisfied with flask ext, approved or not[0]? For example: user management, sessions, admin(flask-admin), db access(SQLAlchemy), form processing(wtforms), views/templating(jinja).

[0]: http://flask.pocoo.org/extensions/

Post reply on HN