#https://flask-restful.readthedocs.io/en/latest/quickstart.html
#pip install flask-restful
from flask import Flask
from flask_restful import Resource, Api

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)


发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code