Recently I learned the flask framework stage, which is divided into two parts, one is the basic knowledge part, the other part is the actual project part, which is definitely suitable for flask.

A virtual environment

To explain why you want to create virtual environments, if you want to develop multiple projects on a single computer, you need to use different versions of the same package, install or update them in the same directory, the new version will overwrite the previous version, and the other projects will not run. At this point, you need to create a virtual environment so that the running environment of a single project is independent of other projects.

Creating a Virtual Environment


The resulting project structure is an empty folder


In this case, you need to install the Flask toolkit in the virtual environment. Here, the Flask version is 0.10.1


After the successful installation, the next open is the international convention, hello World program writing.


Start running, the following figure shows that the operation is successful


The request is then made in the browser, and the image below shows that the first Flask project request was successful