def smembers(name): # return items in set c = getRedisClient() return c.smembers(name)
def hget(name, field, default=None): c = getRedisClient() v = c.hget(name, field) if v is None: return default return v
def sismember(name, value): # return items in set c = getRedisClient() return c.sismember(name, value)
def scard(name): # count items in set c = getRedisClient() return c.scard(name)
def sadd(name, *values): # add value to set c = getRedisClient() return c.sadd(name, *values)
def srem(name, *values): # remove value from set c = getRedisClient() return c.srem(name, *values)
def decr(key, amount=1): c = getRedisClient() return c.decr(key, amount)
def delete(key): c = getRedisClient() return c.delete(key)
def set(key, value): c = getRedisClient() return c.set(key, value)
def incr(key, amount=1): c = getRedisClient() return c.incr(key, amount)
def get(key, default=None): c = getRedisClient() v = c.get(key) if v is None: return default return v
def hincrby(name, field, inc=1): c = getRedisClient() return c.hincrby(name, field, inc)
def hdel(name, field): c = getRedisClient() return c.hdel(name, field)
def hset(name, field, value): c = getRedisClient() return c.hset(name, field, value)
def hgetall(name): c = getRedisClient() return c.hgetall(name)