Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. from flask import Flask, request
  2. from flask_restful import Resource, Api
  3. from json import dumps
  4. from flask import jsonify
  5. from consulta import rows
  6.  
  7. app = Flask(__name__)
  8. api = Api(app)
  9.  
  10.  
  11. class Employees_Name(Resource):
  12.     def get(self, anuncio_id):
  13.         result = rows
  14.         return jsonify(result)
  15.        
  16. api.add_resource(Employees_Name, '/anuncio/<anuncio_id>')
  17.  
  18.  
  19. if __name__ == '__main__':
  20.     app.run(debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement