100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Python

What Is Flask?

Flask is a lightweight WSGI micro web framework for Python that provides routing, request handling, and templating while leaving choices like ORM and auth up to the developer.

Flask FoundationsBeginner7 min readJul 10, 2026
Analogies

What Is Flask?

Flask is a lightweight WSGI micro web framework for Python, created by Armin Ronacher, that gives you routing, request/response handling, and templating out of the box while leaving choices like ORM, auth, and project layout up to you.

🏏

Cricket analogy: Flask is like a school cricket team that hands you a bat, ball, and stumps but lets you decide your own batting order and field placements, unlike a franchise like Mumbai Indians with a full backroom staff dictating every strategy.

Why Choose Flask?

Developers choose Flask because it has a small, understandable core (a single module you can read in an afternoon), minimal boilerplate to get a server running, and an extension ecosystem (Flask-SQLAlchemy, Flask-Login, Flask-Migrate) that lets you add exactly the capabilities a project needs without bundling unused features.

🏏

Cricket analogy: Choosing Flask over a heavier framework is like Rahul Dravid choosing a lightweight bat suited to his technical, get-in-get-out style rather than the heavy blade a power hitter like Andre Russell prefers for six-hitting.

Flask vs Other Frameworks

Compared to Django, which ships with an admin panel, ORM, and authentication system baked in, Flask is unopinionated: you assemble your own stack, which suits small APIs, prototypes, and services where a full-featured framework would be overkill; FastAPI, by contrast, targets async, type-hinted APIs with automatic OpenAPI docs, whereas Flask remains synchronous-first (though it supports async views since 2.0) and prioritizes simplicity over built-in validation.

🏏

Cricket analogy: Flask versus Django is like choosing a nimble T20 specialist squad versus a full Test-match setup with specialist coaches for every discipline — Django, like an IPL franchise, arrives fully staffed, while Flask lets you build the XI yourself.

python
from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello, Flask!"

if __name__ == "__main__":
    app.run(debug=True)

Flask is built on top of Werkzeug (a WSGI toolkit) and Jinja2 (a templating engine) — two libraries also created by Armin Ronacher's Pocoo team, which is why Flask's routing and templating feel so cohesive.

  • Flask is a micro web framework for Python built on Werkzeug and Jinja2.
  • It ships with routing, request/response handling, and templating, but leaves ORM, auth, and structure to the developer.
  • Extensions like Flask-SQLAlchemy and Flask-Login add functionality without bloating the core.
  • Django is a full-stack, batteries-included alternative; FastAPI targets async, type-hinted APIs.
  • Flask supports async views since version 2.0 but remains synchronous-first.
  • Its small, readable codebase makes it easy to understand exactly what's happening under the hood.

Practice what you learned

Was this page helpful?

Topics covered

#Python#FlaskStudyNotes#WebDevelopment#WhatIsFlask#Flask#Choose#Frameworks#StudyNotes#SkillVeris#ExamPrep