Flask web dev: Embrace SQLite

Flask web development tip number 3

18 Jun '16 — last updated 30 Jun '16

Flask is a web microframework for Python. It’s small, but because it’s so easy to understand it’s also extremely extensible. No more bloat.

I’m hoping to share some tips from developing and deploying several large Flask applications, some which aren’t obvious from the documentation.

Tip 3: Embrace SQLite

SQLite is ubiquitous. It’s zero-configuration. There’s no server to get hacked.

You don’t need a big SQL server (e.g. PostgreSQL, MySQL) until you’re big. And since you’re using SQLAlchemy (right?), migrating to something bigger isn’t an issue. What are you waiting for? 100k more users? Just use SQLite.

Update: It has been put to me that you should use the same database in production and development. In principle, I think this is a good idea. However, if this isn’t possible, your integration tests should catch any issues, right?


Good luck with Flask!

Python, Flask, SQLAlchemy

Newer Older