NelsonLabs
Flask/What is Flask?

What is Flask?

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 vs Django β€” when to use each

FlaskDjango
SizeMicro β€” start tiny, add what you needFull-featured β€” everything included
Learning curveLower β€” fewer concepts upfrontHigher β€” more to understand at once
FlexibilityHigh β€” you make all decisionsOpinionated β€” Django's way is the default
Best forAPIs, microservices, small-medium appsLarge apps, content sites, rapid CRUD
ORMNot included β€” add SQLAlchemyBuilt in β€” Django ORM