Talk given to full stack cohort at Galvanize/Boulder on December 20, 2016 about building APIs with Python / Flask.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
372 B

  1. # -*- coding: utf-8 *-*
  2. from flask import Flask
  3. from flask import request
  4. import json
  5. app = Flask(__name__)
  6. @app.route("/status")
  7. def status_endpoint():
  8. data = {
  9. "appname": "My awesome app",
  10. "version": "0.1",
  11. "creator": "BigBird007"
  12. }
  13. return json.dumps(data)
  14. if __name__ == "__main__":
  15. app.run('127.0.0.1', port=5151, debug=True)