def init_data(): for name, display_name, count in USERS: try: user = User.add(name=name, display_name=display_name, count=count) except IntegrityError: continue print 'User {0} is added'.format(user)
def load_user(id_): return User.get(id_)