Skip to content

Instantly share code, notes, and snippets.

@Squab
Created April 25, 2015 22:21
Show Gist options
  • Save Squab/1391b8605c1175253af6 to your computer and use it in GitHub Desktop.
Save Squab/1391b8605c1175253af6 to your computer and use it in GitHub Desktop.
Simple JSON API mock
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/')
def hello_world():
return jsonify({'text': 'Hello World!', 'name': 'Tim'})
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment