1 2 3 4 5 6
try: from redis import StrictRedis as Redis except ImportError: from redis import Redis redis = Redis()