Skip to main content

Flask Tutorial

Flask is a web application framework written in Python. Armin Ronacher, who leads an international group of Python enthusiasts named Pocco, develops it. Flask is based on Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects.

Flask – Overview

What is Web Framework? Web Application Framework or simply Web Framework represents a collection...

Flask – Environment

Prerequisite Python 2.6 or higher is usually required for installation of Flask. Although Flask ...

Flask – Application

In order to test Flask installation, type the following code in the editor as Hello.py from flas...

Flask – Routing

Modern web frameworks use the routing technique to help a user remember application URLs. It is u...

Flask – Variable Rules

It is possible to build a URL dynamically, by adding variable parts to the rule parameter. This v...

Flask – URL Building

The url_for() function is very useful for dynamically building a URL for a specific function. The...

Flask – HTTP methods

Http protocol is the foundation of data communication in world wide web. Different methods of dat...

Flask – Templates

It is possible to return the output of a function bound to a certain URL in the form of HTML. For...

Flask – Static Files

A web application often requires a static file such as a javascript file or a CSS file supporting...

Flask – Request Object

The data from a client’s web page is sent to the server as a global request object. In order to p...

Flask – Sending Form Data to Template

We have already seen that the http method can be specified in URL rule. The Form data received by...

Flask – Cookies

A cookie is stored on a client’s computer in the form of a text file. Its purpose is to remember ...

Flask – Sessions

Like Cookie, Session data is stored on client. Session is the time interval when a client logs in...

Flask – Redirect & Errors

Flask class has a redirect() function. When called, it returns a response object and redirects th...

Flask – Message Flashing

A good GUI based application provides feedback to a user about the interaction. For example, the ...

Flask – File Uploading

Handling file upload in Flask is very easy. It needs an HTML form with its enctype attribute set ...

Flask – Extensions

Flask is often referred to as a micro framework, because a core functionality includes WSGI and r...

Flask – Mail

A web based application is often required to have a feature of sending mail to the users/clients....

Flask – WTF

One of the essential aspects of a web application is to present a user interface for the user. HT...

Flask – SQLite

Python has an in-built support for SQlite. SQlite3 module is shipped with Python distribution. Fo...

Flask – SQLAlchemy

Using raw SQL in Flask web applications to perform CRUD operations on database can be tedious. In...

Flask – Sijax

Sijax stands for ‘Simple Ajax’ and it is a Python/jQuery library designed to help you easily brin...

Flask – Deployment

Externally Visible Server A Flask application on the development server is accessible only on th...

Flask – FastCGI

FastCGI is another deployment option for Flask application on web servers like nginix, lighttpd, ...