Chapter 1 of 10
Flask is a micro-framework for Python. 'Micro' doesn't mean small β it means minimal by design. Flask gives you routing and request/response handling. Everything else β database, auth, form validation β you add only when you need it.
ANALOGY
Django is a hotel, Flask is a plot of land. Django is a fully-furnished hotel β everything is provided and arranged. Flask is a plot of land in a good location β you decide what to build, how big, and in what style. More work, but complete control. Flask is ideal when you need an API, a microservice, or a lightweight app without Django's full overhead.
| Flask | Django | |
|---|---|---|
| Size | Micro β start tiny, add what you need | Full-featured β everything included |
| Learning curve | Lower β fewer concepts upfront | Higher β more to understand at once |
| Flexibility | High β you make all decisions | Opinionated β Django's way is the default |
| Best for | APIs, microservices, small-medium apps | Large apps, content sites, rapid CRUD |
| ORM | Not included β add SQLAlchemy | Built in β Django ORM |