def main(): api = CodeforcesAPI() handles = ['soon', 'DmitriyH', 'Fefer_Ivan'] users = api.user_info(handles) for u in users: print('{}, rank: {}'.format(u.handle, u.rank))
def main(): api = CodeforcesAPI() ranklist = api.contest_standings(613, count=10000) ranklist_rows = list(ranklist['rows']) users = {u.handle: u for u in api.user_info(list(get_all_user_handles(ranklist_rows)))} print("Users from Ural FU:") for row in filter_by_organization(ranklist_rows, users, "Ural FU"): print(' {party}, points: {points}'.format(party=row.party, points=row.points)) print() print("Users from Mexico:") for row in filter_by_country(ranklist_rows, users, "Mexico"): print(' {party}, points: {points}'.format(party=row.party, points=row.points))