Skip to content

Instantly share code, notes, and snippets.

@jennielees
Created June 9, 2015 20:35
Show Gist options
  • Save jennielees/cebac0ac3f11c3c85040 to your computer and use it in GitHub Desktop.
Save jennielees/cebac0ac3f11c3c85040 to your computer and use it in GitHub Desktop.
Static API
from flask import Flask, jsonify
app = Flask(__name__)
SIMPLE_DICTIONARY = {
"Lannisters": ["Cersei", "Jaime", "Tyrion"],
"Baratheons": ["Robert", "Renly", "Stannis"]
}
@app.route('/')
def index():
return jsonify(SIMPLE_DICTIONARY)
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