1、Anaconda安装Flask
cmd -> conda install Flask
2、导入
1 from flask import Flask 2 app = Flask(__name__) 3 ''' 4 引入Flask类,Flask类实现一个WSGI应用 5 app是Flask的实例,接收包或者模块的名字作为参数,但一般都是传递__name__ 6 ''' 7 8 @app.route('/') 9 def hello_world(): 10 return 'Hello World!' 11 12 if __nmae__ == '__main__' 13 app.run()