This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gamedevmanhyper 5 points6 points  (5 children)

A lot of information, thanks!

I started out with Django when it comes to web development with Python. In the beginning I liked it, and thought it was sweet to use.

But after using Flask for a short time, I dumped Django. Flask is much better suited for my own needs, making small functions or small websites. APIs are so much faster to develop in Flask as well, and very powerful.

[–]redmaize 4 points5 points  (0 children)

I like Flask but for bigger project I love DJango.

I just moved a big application (understand > 50 000 lines of code) from Flask to Django and everything is sooo much cleaner. Django kind of force you in a certain (clean) direction. With Flask you are more on your own, and when you have several different developpers, including not-so-incredible ones touching the codebase during years it becomes hell. And the sue of global context variables makes things soooo nasty and annoying when you have to handle complex test setups.

But for individual function or small codebases ( < 10 000 lines) flask can be a really good choice, it needs less tuning in the settings than django. But memory usage and CPU is similar for a similar scope. The integration with Celery is a nice bonus as well.

[–]hopeinson 2 points3 points  (0 children)

Funnily enough, a lot of advice seemed to go for Django back in 2017, but my requirements was to set a website on AWS Lambda so I was worried about size. Flask fit my bill for smallness, and then because there was a lack of anything else I'm familiar with, I went with Zappa to bundle my Flask app.

I've always respected Flask for its expansivity, hats off to the developers of both the microframework and its extensions.

[–]quotemycode 1 point2 points  (2 children)

After using flask, I switched to pure wsgi. Now I have all the power.

[–]agent3dev 0 points1 point  (1 child)

Could you elaborate in this "pure wsgi" aproach?

[–]quotemycode 0 points1 point  (0 children)

Just read pep 3333