mirror of
https://github.com/opelly27/PythonAPI.git
synced 2026-05-20 01:47:36 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from flask import Flask
|
||||
from flask_restful import Api, Resource
|
||||
|
||||
app = Flask(__name__)
|
||||
api = Api(app)
|
||||
|
||||
class HelloWorld(Resource):
|
||||
|
||||
def get(self):
|
||||
return {"data": "hello world"}
|
||||
|
||||
api.add_resource(HelloWorld, "/helloworld")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
Reference in New Issue
Block a user