ReadingFlask source code is a good thing. Before reading, I suggest you ask yourself the following questions:
Are you familiar with the main Flask of API? Do you know a Flask app complete workflow
Are you familiar with B/S this kind of framework, are you familiar with the relevant network protocols (HTTP,TCP), are you clear about the client sending a request, the server processing and responding to the request and its details
Are you familiar with the gateway interface protocol (Python web) developed by WSGI
If these are all clear, you can read Flask carefully before reading the werkzeug source code.
werkzeug is the foundation of the flask framework. Most of the above problems are implemented in the werkzeug library. FlaskIt is just a more advanced package and designed to be more suitable for developersAPI.
After you are familiar with werkzeug, and then look at Flask, you should not have any confusion about the configuration file.
PS: I am not a master, but I just finished reading the Flask source code recently.
When reading the flask source code, it is recommended to first read the code submitted by flask for the first time on github. It is just a flask.py file, but the basic concepts are already there.
Reading
Flask
source code is a good thing. Before reading, I suggest you ask yourself the following questions:Flask
ofAPI
? Do you know aFlask app
complete workflowB/S
this kind of framework, are you familiar with the relevant network protocols (HTTP,TCP
), are you clear about the client sending a request, the server processing and responding to the request and its detailsPython web
) developed byWSGI
If these are all clear, you can read
Flask
carefully before reading thewerkzeug
source code.werkzeug
is the foundation of theflask
framework. Most of the above problems are implemented in thewerkzeug
library.Flask
It is just a more advanced package and designed to be more suitable for developersAPI
.After you are familiar with
werkzeug
, and then look atFlask
, you should not have any confusion about the configuration file.PS: I am not a master, but I just finished reading the
Flask
source code recently.When reading the flask source code, it is recommended to first read the code submitted by flask for the first time on github. It is just a flask.py file, but the basic concepts are already there.