Skip to content

Instantly share code, notes, and snippets.

Avatar
😅
what's up?

Mendelson Gusmão mendelgusmao

😅
what's up?
  • São Paulo, Brazil
View GitHub Profile
@mendelgusmao
mendelgusmao / redis_sessions.py
Created Jul 6, 2012 — forked from junkafarian/redis_sessions.py
Redis session management using a dictionary-like API for session objects
View redis_sessions.py
import redis
from zope.interface import Interface, implements
try: #pragma NO COVERAGE
import simplejson as json
except ImportError: #pragma NO COVERAGE
import json
class RedisSession(dict):
""" Provides a lazy interface for presenting data stored in a redis DB as a