acbart

Untitled

Sep 12th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import corgis.earthquakes
  2.  
  3. from flask import Flask, jsonify
  4. app = Flask(__name__)
  5.  
  6. @app.route("/get_earthquakes/<time>/")
  7. def get_earthquakes(time):
  8.     return jsonify(earthquakes.get(time).to_dict())
  9.  
  10. if __name__ == "__main__":
  11.     app.run()
Advertisement
Add Comment
Please, Sign In to add comment