def set_password(username, password): redis.hset('user:passwords', slug(username), generate_password_hash(password))
def create_invite(email): h = hashlib.new('md5') h.update(os.urandom(128)) key = h.hexdigest() redis.hset('user:keys', key, email) return key
def set_type_template(slug, key, value): if value: redis.hset("t:%s" % key, slug, value)
def get_email(username, email): redis.hset('user:emails', slug(username))
def set(id, value): if value: redis.hset(REDIS_SESSION, id, value) else: redis.hdel(REDIS_SESSION, id)