Last active
October 19, 2021 20:33
-
-
Save rtkilian/3982fd483d83ad3a8cd4d5bbb44b066c to your computer and use it in GitHub Desktop.
A simple 'hello world' application in Flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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