mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-26 07:42:36 +03:00
homework 9.6: complete all tasks
This commit is contained in:
16
src/homework/09-ci/9.6/repository/python-api.py
Normal file
16
src/homework/09-ci/9.6/repository/python-api.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from flask import Flask, request
|
||||
from flask_restful import Resource, Api
|
||||
from json import dumps
|
||||
from flask_jsonpify import jsonify
|
||||
|
||||
app = Flask(__name__)
|
||||
api = Api(app)
|
||||
|
||||
class Info(Resource):
|
||||
def get(self):
|
||||
return {'version': 3, 'method': 'GET', 'message': 'Already started'}
|
||||
|
||||
api.add_resource(Info, '/get_info')
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port='5290')
|
||||
Reference in New Issue
Block a user