Skip to content

Instantly share code, notes, and snippets.

@rtkilian
Last active October 19, 2021 20:33
Show Gist options
  • Select an option

  • Save rtkilian/3982fd483d83ad3a8cd4d5bbb44b066c to your computer and use it in GitHub Desktop.

Select an option

Save rtkilian/3982fd483d83ad3a8cd4d5bbb44b066c to your computer and use it in GitHub Desktop.
A simple 'hello world' application in Flask
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment