What is Flask?
5 min read Quiz at the end
Overview of Flask as a Python micro-framework: Werkzeug, Jinja2, extensible design, and WSGI.
What is Flask? Flask is a lightweight Python web framework ("micro-framework"). Unlike Django, Flask gives you the core and lets you choose your own tools for databases, auth, and more.
Minimal core — no ORM, no admin by default Highly extensible via Flask extensions Great for microservices and REST APIs Uses Jinja2 for templating Werkzeug WSGI toolkit under the hood pip install flask
from flask import Flask
app = Flask(__name__)
@app.route("/")
def home():
return "Hello, Flask!"
if __name__ == "__main__":
app.run(debug=True)
Topic Quiz · 4 questions
Test your understanding before moving on
1. What is Flask classified as?
A. Full-stack framework
B. Micro-framework
C. ORM library
D. Template engine
💡 Flask is a micro-framework providing the core; you choose your own tools.
2. Which Python WSGI toolkit does Flask use internally?
A. Gunicorn
B. Uvicorn
C. Werkzeug
D. Twisted
💡 Flask is built on Werkzeug (WSGI toolkit) and Jinja2 (templates).
3. How do you define a route in Flask?
A. @app.route("/path")
B. @route("/path")
C. app.add_route("/path")
D. @flask.route("/path")
💡 The @app.route() decorator maps a URL to a Python function.
4. Which template engine does Flask use?
A. Mako
B. Django templates
C. Chameleon
D. Jinja2
💡 Flask uses Jinja2 for HTML templating.
Submit answers