Python Tutorial Data Types Interview Questions E
Flask Tutorial
Last Updated : 30 Jun, 2026
Flask is a lightweight web framework used to
build web applications and APIs. It follows a
minimal design and provides core features like
routing, request handling and template
rendering while allowing developers to add
extensions as needed. It is widely used for
building small to medium web applications
due to its simplicity and flexibility.
2/4
Microframework: Lightweight framework
with minimal dependencies, giving
developers full control over application
structure.
Werkzeug & Jinja2: Uses Werkzeug for
request/response handling and Jinja2 for
dynamic HTML templating.
Routing: Maps URLs to Python functions
using simple decorators.
Flexible Database Choice: No built-in
ORM, allowing use of tools like
SQLAlchemy or raw SQL.
API Development: Well-suited for
building RESTful APIs and backend
ser vices.
Development Server: Includes a built-in
ser ver for local testing during
development.
Introduction
This section introduces Flask, compares it with
Django and shows how to install it on
Windows to start building web applications.
Basics & Installation
Django vs Flask
Quick Start
Covers creating and running a basic Flask app,
understanding routes, HTTP methods,
variables, redirects and basic configurations.
First App
Running an App
Routes
Models
Python Flask - Request Object
HTTP Method
Variable Rules
Redirect and Errors
Change Port
Changing Host IP Address
Process Incoming Request Data
Templates and Static Files
Explains creating dynamic web pages using
templates and managing static files like CSS,
JavaScript and images.
Templates
Template Inheritance
Static Files
Form Handling
This section covers capturing user input, form
validation, file uploads and security features
like CSRF protection.
Flask-WTF
Handling File Uploads
CSFR Protection
Retrieving HTML Form data
Use Web Forms
Configuration
It explains how to manage application settings
such as debug mode, secret keys and
environment-based configurations.
App Configuration
Environment-Specific Configuration
Database
Flask supports multiple databases for storing
and managing data, including SQLite,
PostgreSQL, MySQL, MongoDB and also
allows using SQLAlchemy or executing raw
SQL queries.
SQLAlchemy
SQLite
MongoDB Database
PostgreSQL Database
Login & Registration Project MySQL
Filtering, Sorting, and Pagination in Flask
Execute Raw SQL in SQLAlchemy
Middlewares
This section covers how middleware
processes requests and responses for tasks
like logging, authentication and modifications.
Middlewares
WSGI Middleware
Authentication
Authentication is used to verify user identity
and manage secure access to applications. It
includes login systems, password hashing,
session management and permission control.
Adding Authentication
Display Current Username
[Link] asks for your consent
Password Hashing
to use with Bcrypt
your personal data to:
Store username and password
Personalised advertising and content,
Role-Based Access
advertising Control
and content measurement,
audience research and services development
Sessions to server Logout
JWT Store and/or access information on a device
Cookies
JSON Learn more
Response
Your personal data will be processed and information from
your device (cookies, unique identifiers, and other device
Rest APIs
data) may be stored by, accessed by and shared with 613
partners, or used specifically by this site. We and our
Flask makes
partners building
may use REST APIs
precise geolocation easy
data. List of by
partners.
handling requests like GET, POST, PUT and
Some vendors may process your personal data on the
DELETE. With Flask-RESTful, one can send
basis of legitimate interest, which you can object to by
andmanaging
receiveyour
JSON data,
options manage
below. Look for a authentication
link at the
bottom of this page or in the site menu to manage or
andwithdraw
secureconsent
the API.
in privacy and cookie settings.
Creating Rest APIs
Flask-CORS Consent
RESTful Extension
Serialization and Deserialization
Manage options
Advanced Topics
Introduces advanced concepts like
asynchronous programming, WebSockets and
modular app structure using blueprints.
Asynchronous Programming
Web Sockets
Blueprints
Deployment & Error Handling
After development, Flask apps must be
deployed and properly handle errors. This
section covers deployment methods and
techniques for managing application errors.
Subdomain
Handling 404 Error
Dockerization
Deploying App on Heroku
Deploying ML Model
Projects
This section includes practical Flask projects
that demonstrate real-world applications
such as portfolio websites, APIs, data
visualization and sentiment analysis tools.
Todo List App
Single Page Portfolio
Profile Application
Wikipedia Search App
Twitter Sentiment Analysis
Cricket Score API using Web Scraping
Adding Graphs to Flask Apps
Projects Archives
Additional Resources
This section provides helpful articles and
references to deepen understanding of Flask
and related topics.
Career Opportunities
Interview Questions and Answers
Comment K kar… 101
Article Tags:
Pytho n Pytho n Flas k Tuto rials
Explore
Python Fundamentals
Python Data Structures
Advanced Python
Data Science with Python
Web Development with Python
Python Practice
Python Courses
Corporate & Communications
Address:
A-143, 6th Floor, Sovereign
Corporate Tower, Sector- 136, Noida,
Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante
Apartment, Sector 137, Noida,
Gautam Buddh Nagar, Uttar Pradesh,
201305
Company
About Us
Legal
Privacy Policy
Contact Us
Advertise with us
GFG Corporate Solution
Campus Training Program
Explore
POTD
Job-A-Thon
Blogs
Nation Skill Up
Tutorials
Programming Languages
DSA
Web Technology
AI, ML & Data Science
DevOps
CS Core Subjects
Interview Preparation
Software and Tools
Courses
ML and Data Science
DSA and Placements
Web Development
Programming Languages
DevOps & Cloud
GATE
Trending Technologies
Videos
DSA
Python
Java
C++
Web Development
Data Science
CS Subjects
Preparation Corner
Interview Corner
Aptitude
Puzzles
GfG 160
System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All
rights reserved