4 ms·
It’s not all roses! In my experience at three separate organizations, Flask apps tend to become horrific to maintain beyond a certain size, unless the original
by mplanchard 7y ago
It’s not all roses! In my experience at three separate organizations, Flask apps tend to become horrific to maintain beyond a certain size, unless the original developers really know what they’re doing and are disciplined about it.
A lot of it is due to the standard patterns for small Flask apps (e.g. instantiating your app directly at the module level rather than in a factory function, putting all of your business logic into ORM classes) causing increased complexity and unintended side effects down the line. Flask apps also struggle quite a bit with performance, and the only way to do things asynchronously is with something like celery.
For Python, aiohttp is also a really interesting web framework, and the asynchronicity should be easy to grok for JS devs.
Personally, as someone who has worked with Python/Flask professionally for years, I’d pick TypeScript and any JS web framework any day!
- merlincorey 7y ago> Flask apps also struggle quite a bit with performance, and the only way to do things asynchronously is with something like celery. I present to you, Quart[0], a flask-like web framework using Python 3.7's asyncio framework. It works pretty well in the single production application I have tested it in. [0] https://pgjones.gitlab.io/quart/ https://pgjones.gitlab.io/quart/
- mplanchard 7y agoNeat! I hadn’t seen this before. I’ll have to take it a spin for a side project at some point. Thanks for the recommendation!