You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
337 B
15 lines
337 B
# app.py - a minimal flask api using 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, host='0.0.0.0')
|