Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »


Building a REST API using Python and Flask | Flask-RESTful


https://flask-restful.readthedocs.io/en/latest/




https://flask-restful.readthedocs.io/en/latest/quickstart.html#a-minimal-api

basic Restful API server
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)












  • No labels