Package: power-of-10
power-of-10: A UK Athletics APIThis library intends to provide simplicity when accessing and parsing data fromPower of 10, a UK-based site that provides a comprehensive collection of athete performances and rankings.InstallationInstall the package:pip install setup.pyInstall dependencies:pip install -r requirements.txtUsageThe package has a variety of functions.1. Search Athletessearch_athletes(firstname=None, surname=None, club=None)Returns a list of athletes given search criteria.Parameters:firstname(str): Optional first name agrumentsurname(str): Optional surname argumentclub(str): Optional club agrumentReturns:list_of_athletes(arr): List of athlete data in dictfirstname(str): First name of athletesurname(str): Surname of athletetrack(str): Age group for athlete on trackroad(str): Age group for athlete on roadsex(str): Gender of athleteclub(str): Athletics club of altheteathlete_id(int): Reference id of athlete (used by PowerOf10)2. Get Athleteget_athlete(athlete_id)Returns a dictionary of information relating to a specific athlete or coach.Parameters:athlete_id(int): reference id of athlete (used by PowerOf10)Returns:athletes(dict): Dictionary of athlete dataclub(str): Club of the athletegender(str): Gender of athlete (M or F)age_group(str): Age group division of athletecounty(str): County that athlete competes forregion(Str): Region that athlete competes fornation(str): Nation that athlete competes forlead coach(str): Athlete coach (usually used for notable coaches)about(str): Description of athlete (usually used for notable athletes)pb(arr): List of personal bestsevent(str): Event namevalue(float): Personal best in given eventperformances(arr): List of athlete performancesevent(str): Event namevalue(float): Performance in given eventposition(arr): 2x1 list containing [position, race identifier]venue(str): Location of eventmeeting(str): Meeting titledate(str): Date of eventrankings(arr): List of notable ranks of athletesevent(str): Event nameage_group(str): Age group division at time of rankyear(int): Year that rank was achievedrank(int): Rank of athletecoaching(arr): List of coaching experiencesname(str): Nmae of athlete coachedclub(str): Club of athlete coachedage_group(str): Age group division of athlete coachedsex(str): Gender of athlete coachedbest_event(str): Best event of athlete coachedrank(int): Rank of athlete coached for their best eventage_group_rank(str): Age group that rank was achievedyear(int): Year that rank was achievedperformance(float): Performance that achieved rank3. Find Coachessearch_coaches(firstname=None, surname=None, club=None)Returns a list of coaches with the inputted firstname, surname or club.Parameters:firstname(str): Optional first name of coach argumentsurname(str): Optiona surname of coach argumentclub(str): Optional club of coach argumentReturns:coaches(arr): List of coach data in dictfirstname(str): First name of coachsurname(str): Surname of coachsex(str): Gender of coachclub(str): Club of coachathlete_id(int): reference id of athlete (used by PowerOf10)4. Get Rankingsget_rankings()Returns a list of ranks for given year, region, gender, age group and event.Parameters:year(int): Year of event rankingsregion(str): Region for event rankings (see below for available regions)gender(str): Gender for event rankingsage_group(str): Optional age group of event rankingsevent(str): Event for rankingsReturns:rankings(arr): list of ranksrank(int): Rank of athleteperformance(float): Performance of athlete for given rankpb(float): Personal best of athlete at time of rankname(str): Full name of athleteyear(int): Year that performance occurredcoach(str): Name of coach of athleteclub(str): Name of club of athletevenue(str): Name of venue that performance occurreddate(str): Date that performance occurredathlete_id(int): Reference id of athlete (used by PowerOf10)meeting_id(int): Reference id of event (used by PowerOf10)Table of Parameters:RegionAge GroupeastLeave blank for anyeast midlandsU20englandU17londonU15north eastU13north irelandnorth westscotlandsouth eastsouth westwaleswest midlandsyorkshire5. Search Eventsearch_event(event=None, meeting=None, venue=None, date_from=None, year=None, date_to=None, meeting_type=None, terrain=None)Returns a dict of events that correspond to the query parametersParameters:event(str): Optional event namemeeting(str): Optional meeting namevenue(str): Optional venue namedate_from(str): Optional date to search from (to be used withdate_to)date_to(str): Optional date to search to (to be used withdate_from)year(int): Optional year to search withinmeeting_type(str): Optional type of meeting (See below for available meeting types)terrain(str): Optional type of terrain event was onReturns:results(arr): List of results corresponding to event parametersdate(str): Date of eventmeeting(str): Meeting namevenue(str): Venue name of meetingtype(str): Type of terrain it was held onmeeting_id(int): Reference id of meeting (used by PowerOf10)Table of Parameters:Terrain TypesMeeting TypesanyUK CalendarvirtualWorld CalendardisabilityBMCwalksNALmountainYDLfellSALroad/multi/xcNELroad/multiMJL5k/10k/hm/marxcmultiindoorroadtracktrack/10k/hm/mar/xc6. Get Resultsget_results(meeting_id)Returns a dict of information for a particular meetingParameters:meeting_id(int): Reference id of meeting (used by PowerOf10)Returns:meeting(arr):title(str): Name of meetinglocation(str): Location of meetingdate(str): Date of meetingresults(arr): List of results for each event at meetingevent(str): Event nameage_group(str): Age group that for eventrace(int): Race numberresults(arr): List of results for eventpos(int): Position of athleteperf(float): Performance of athletename(str): Name of athleteathlete_id(int): Reference id of athlete (used by PowerOf10)age_group(str): Age group division of athletesex(str): Gender of athleteyear(str): Athlete year in age groupcoach(str): Name of coachclub(str): Name of clubsb(float): Seasons bestpb(float): Personal best