def add_friend(self, email): user = User.load(email) if user: db_conn.sadd(self.friends_key, user.id) return True else: return False
def add_user_to_searched(self, user): db_conn.sadd(self.users_set_key, user)