Skip to content

Instantly share code, notes, and snippets.

@pokstad
pokstad / rediswebpy.py
Created September 7, 2011 23:02
Redis session store backend for web.py
import redis
import web
SESSION = 'SESSION:'
class RedisStore(web.session.Store):
"""Store for saving a session in redis:
import rediswebpy
session = web.session.Session(app, rediswebpy.RedisStore(), initializer={'count': 0})
@mazesoul87
mazesoul87 / weibo.py
Created January 6, 2012 02:35
weibo oauth
#encoding:utf-8
import logging
import time
import urllib
import mimetools
from tornado import httpclient
from tornado.httputil import HTTPHeaders
from tornado import escape
from tornado.auth import OAuthMixin,OAuth2Mixin