Flask Web Development – Introduction
Web development is the practice of creating interactive web applications. Web applications are dynamic applications and can be accessed through in a web browser. Flask Web development is done using Flask, a Python based Web Application Framework. A development framework provides a foundation to create an application with minimal resources. Such a framework is extensible to implement from a simple to a complex web application by choosing the required framework extensions.
Flask is a repository of libraries and modules for implementing various tasks expected in a web application. These libraries free the developers from the tedious tasks of coding from scratch. It is done with the help of available functionalities like protocols, session management, thread management and other low level details.
What is Flask?
Flask is a micro framework written in Python. The coding of a web application in Flask involves Python programming along with basic HTML/CSS designing for web application interface, defining routes etc. Flask uses Werkzeug WSGI toolkit and Jinja2 template engine.
The core of the application remains simple and the application can be created by installing and importing the required libraries. Flask chooses template system for an application but database, form validation or designing decisions have to be taken by the developer.
A whole range of Flask extensions are available which are created and contributed by Flask Community. These extensions can be integrated into a Flask Web Development project to create a robust, secure and extensible web application.
Web Server Gateway Interface (WSGI) is the standard for Python web application development. Flask implements WSGI as the interface between the web server and a web application.
Werkzeug is WSGI based toolkit. It implements requests and response objects along with other utility functions. With the help of the Werkzeug toolkit, web framework is built as the top layer that makes the final web application. Werkzeug becomes the foundation of the application upon which the other modules can be added to complete application functionality.
Jinja2 is the templating engine for Python used in Flask Web Development. Templating is an important aspect of web development to create standardized look and behavior of a website. A template is a layout that accepts data from a data source and replaces the dynamic elements with provided data. This way the dynamic web pages are created with the help of template.
Refer to the Flask Documentation for more details