4 ms·
To extend this a bit, I would consider Flask if I didn't have a relational database. Without a relational DB, you lose the ORM and most of the ecosystem that's
by thraxil 9y ago
To extend this a bit, I would consider Flask if I didn't have a relational database. Without a relational DB, you lose the ORM and most of the ecosystem that's tied to it. At that point, something lightweight and simple is appealing.
In practice though, when I've been in that situation, I've found it more compelling to just drop Python and use Go instead. I guess with a use case that relied on NumPy, Pandas, Tensorflow or something Python-specific but that didn't have a UI, I might still go with Flask.
- flavio81 9y ago>To extend this a bit, I would consider Flask if I didn't have a relational database. Use the Flask-SQLAlchemy plugin. It works beautifully. SQLAlchemy is a very good ORM.
- thraxil 9y agoDid you read my original comment? My point was that if you're using Flask, you are responsible for pulling in all of those components and making sure they work together, not that there weren't good components available for Flask. I'd rather use Django if I need all of those things and want them to work together. If you don't have a relational database, Django's ecosystem advantage (much of which hinges on the ORM) isn't as strong and Flask becomes worth looking at again.
- philipov 9y agoEcosystem aside, who do you think has better ORM concepts: Django or SQLAlchemy?
- thraxil 9y agoI haven't really used SQLAlchemy in anger since about 2009. I remember it being fine but I can't really say much else about it. That said, I haven't run into any limitations of the Django ORM that have driven me to look at other ones.
- flavio81 9y agoThe "Flask-sqlalchemy" plugin, as its name implies, makes Flask and SQLAlchemy work together just fine.