Flask is a lightweight web application framework written in Python. Based on Werkzeug WSGI (Python Web Server Gateway Interface (WSGI) is an interface between a Python application or framework and a Web server. It has been widely accepted, and it has basically achieved its portability. The goal) toolbox and Jinja2 template engine. Flask uses BSD authorization. Flask is also called "microframework" because it uses a simple core and uses extensions to add other functions. Flask does not have a default database or form verification tool. However, Flask retains the flexibility of expansion, and Flask-extension can be used to add these functions: ORM, form verification tools, file uploads, and various open authentication technologies.
From blogging applications to cloning a facebook or twitter, in theory you can do anything with Flask. There are many libraries that can be used directly, such as flask-sockets, flask-google-maps, etc., and the Flask framework supports MySQL, Postgresql, MongoDB and many other databases.
Django and Flask are the two Python web frameworks with the largest number of stars on GitHub. There are also many articles on the Internet that analyze and compare these two web frameworks, such as:
Quora: Should I learn Flask or Django?
Django vs Flask vs Pyramid: Choosing a Python Web Framework
Most websites use database software to store data, and databases are crucial to any application.
Although Flask is directly connected to the database to access data, there is no problem, but it will make the application and the database tightly coupled, which is not conducive to expansion, and will increase the workload of maintaining code logic. Using the database abstraction layer will simplify the logic of Flask's interaction with the database, and transfer the logic of Flask's interaction with the database to the database abstraction layer to make business logic clearer and more focused on development. Since Flask is a Micro Framework, there is no database abstraction layer itself, and there are many database abstraction layers available under the Python ecosystem. For Flask, there are many options. Developers can choose the best or most familiar database abstraction layer. Applied to development.
Database abstraction layer for relational databases
The database abstraction layer and ORM (Object Relation Mapping) applicable to relational databases, applicable to Flask include:
Database abstraction layer for NoSQL databases
There are many NoSQL databases. MongoDB is one of the document-based NoSQL databases. Since MongoDB is born to serve the Internet, I have only used Flask + MongoDB for development. Only the abstraction layer of MongoDB is listed below:
In this guide, we will be installing Flask and running a sample application on Alibaba Cloud ECS with Ubuntu 16.04.
Flask is a Python-based light-weight Web framework. This topic describes how to use Flask to create an application and deploy the application in Web+.
How Can Your Business Reach Customers Worldwide Quickly and Reliably with An SMS Campaign?
634 posts | 114 followersFollow
Alibaba Clouder - March 12, 2019
Alibaba Clouder - October 11, 2018
Alibaba Clouder - April 28, 2021
Alex - August 26, 2019
Alibaba Clouder - February 26, 2019
Alibaba Clouder - April 12, 2019
634 posts | 114 followersFollow
An online computing service that offers elastic and secure virtual cloud servers to cater all your cloud hosting needs.Learn More
Over 20 million domain, free WHOIS privacy protection.Learn More
More Posts by Alibaba Cloud Community