1. Introduction
Flask is a tiny Python-developed web framework designed to keep the core functions simple and easy to extend. A pure flask framework only has the basic core functions of the web framework, and other functions need to be extended by the developer.
Two, installation
1. Install flask
Open the windows command line:
pip install flask
I installed it in the terminal of pycharm, as shown in the figure below:
Verify whether the installation is successful, as shown in the figure below:
When there is no error when importing the flask package, it means that the flask has been installed successfully.
2. Install flask-sqlalchemy package
flask-sqlalchemy package is an extension of SQLAlchemy support added to Flask application.
SQLAlchemy is an open source software under the Python programming language. Provides SQL toolkit and object-relational mapping (ORM) tools. SQLAlchmy uses a data mapping model similar to Hibernate in Java. After its release in 2006, it became one of the most widely used ORM tools in the Python community, no less than Django's ORM framework .
1) Install sqlalchemy first, and open the windows command line:
pip install sqlalchemy
2) Then install flask-sqlalchemy
pip install flask-sqlalchemy
3) Verify that flask-sqlalchemy is installed successfully.
If there is no error when importing the package, the installation is successful