Skip to content

Instantly share code, notes, and snippets.

@marcelcaraciolo
Created June 5, 2012 04:10
Show Gist options
  • Save marcelcaraciolo/2872583 to your computer and use it in GitHub Desktop.
Save marcelcaraciolo/2872583 to your computer and use it in GitHub Desktop.
webflask.py
from flask import jsonify
from flask import Flask
from correios import obter_rastreamento
app = Flask(__name__)
@app.route('/track/<trackid>', methods = ['GET'])
def api_tracking(trackid):
resp = jsonify(obter_rastreamento(trackid))
resp.status_code = 200
return resp
if __name__ == '__main__':
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment