1、安装Flask
pip install Flask
from flask import Flask
app = Flask(__name__)
@app.route("/index1")
def hello():
return "hello world!"
@app.route("/python")
def python():
return "hello python!"
if __name__ == "__main__":
app.run()
2、request 调用
x=requests.get('http://127.0.0.1:5000/index1')标签:__,return,Flask,app,python,例子,简单,hello From: https://www.cnblogs.com/seven7777/p/17079569.html
print(x.text)