flask_restful用法1
from flask import Flask
from flask_restful import Api,Resource
app = Flask(__name__)
api = Api(app)
class HelloWorld(Resource):
def get(self):
return {'hello': 'world'}
api.add_resource(HelloWorld, '/')
if __name__ == '__main__':
app.run(debug=True)
写入自己的博客中才能记得长久