Skip to content

Instantly share code, notes, and snippets.

@swshan
Last active September 22, 2015 04:51
Show Gist options
  • Save swshan/7c230f46163e88f01d9a to your computer and use it in GitHub Desktop.
Save swshan/7c230f46163e88f01d9a to your computer and use it in GitHub Desktop.
import os
import redis
import urlparse
import random
from flask import Flask, request, url_for
app = Flask(__name__)
r = redis.Redis(host='localhost',port=6379)
@app.route('/')
def index():
data = r.get('key')
return data
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