mirror of
https://github.com/Dannecron/netology-devops-gitlab.git
synced 2025-12-25 23:32:34 +03:00
initial: add code and requirements
This commit is contained in:
15
src/python-api.py
Normal file
15
src/python-api.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from flask import Flask
|
||||
from flask_restful import Resource, Api
|
||||
from json import dumps
|
||||
|
||||
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')
|
||||
2
src/requirements.txt
Normal file
2
src/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
flask
|
||||
flask_restful
|
||||
Reference in New Issue
Block a user