1. pip installation package flask
PIP the install flask
2. Use of basic flask
from flask import Flask # Import flask packet
app = Flask (__ name__) # instantiated objects flask, __name__ parameters
to create a view route #
@ app.route ( '/')
DEF the Hello ():
return "the Hello"
# editing program entry
IF __name__ == '__main__':
# operation creates a flask example App
app.run ()
3. recognize flask ----- start from the source
1. began to realize flask
Guess you like
Origin www.cnblogs.com/rockluoye/p/11914943.html
Recommended
Ranking