Live data from Hacker News

Flask 1.0 Released

palletsprojects.com

51–60 of 184 posts

Re: Flask 1.0 Released

#51
post #50

https://github.com/hack4impact/flask-base is an incredible boilerplate for Flask, I use it for every projects ! Lots of basic web stuff included, user management, redis queue for asynchronous tasks etc..

Every non-trivial Flask projects aims to become Django.

Re: Flask 1.0 Released

#52
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…

> Flask has a stigma for not being that good when building larger apps

I've never heard that before. It's been the go-to backend server at the last few companies I've worked for, and it's the first Python web framework I reach for when I need to roll out a new service. I think its explicitness is hugely wonderful for maintenance: given a route, it's straightforward to figure out exactly what code is being called.

Re: Flask 1.0 Released

#53
post #48
post #31

Earlier quoted context omitted.

> Flask has a stigma for not being that good when building larger apps Not sure how to quantify that "large" but I've worked on some api backend services written in Flask with a quarter million lines of python code and not feeling "outgrowing" Flask. Granted, it took some good design and effort to make all piece s work together. These days, horizontally scale apps is the way to go.

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…

Django is great for building Django apps. That is, if you're starting a greenfield project and don't have to integration with an existing database schema, and you like the Django ORM, and you like Django templates, and your data model maps cleanly onto a relational DB, and you can use the admin site more or less as-is without having to customize much, then it's lovely! I'm not being sarcastic: it really is. We've successfully rolled out several CRUD apps so that our internal employees can tweak settings and update stuff without waiting for engineering to get around to it.

That said, I'd rather gnaw off my own ankle than develop a production, customer-facing website that breaks any of the preconditions I listed above. Every time I've needed to deviate from the Django Way of doing things, it's felt like I'm swimming upstream against a rapids. For those kinds of projects, I love Flask very, very much.

Re: Flask 1.0 Released

#55
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…

Flask _does_ scale really well with lines of codes. However the limitations of Python w.r.t. async log really start to show once you step beyond simple CRUD apps.

This was my experience. Just exited a startup that relied on Python heavily. Built a flask-restful based back end with SQL Alchemy.. Never had any issues with flask per say, but it made me happy I know languages with far better tooling and concurrency experience/performance :)

Re: Flask 1.0 Released

#56
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…

Flask _does_ scale really well with lines of codes. However the limitations of Python w.r.t. async log really start to show once you step beyond simple CRUD apps.

Just use sanic. It's a mostly drop in replacement for flask that is async first and runs on uvloop.

Re: Flask 1.0 Released

#57
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.

Re: Flask 1.0 Released

#58

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…

It is possible to register error handlers for exceptions in Flask. See http://flask.pocoo.org/docs/1.0/patterns/apierrors/ .

[deleted]

Re: Flask 1.0 Released

#59
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…

>Flask has a stigma for not being that good when building larger apps

If it has such a stigma, I've never heard or read about it.

Re: Flask 1.0 Released

#60

Love Flask in theory. My biggest complaint was trying to do user management with it. Flask-Security was good, but the developer skipped town a few years ago. Did they come back? :D Basically you are left to your own devices, which sounds great, but user+auth is pretty fundamental to be left to a random absentee third-party in my opinion.

Try farming out the auth to a middleware. That's what I do and it works really well.
Post reply on HN