Team¶
-
class
alliancepy.team.
Team
(team_number: int, headers: dict)¶ Bases:
object
This is the class used to access an existing FTC team. Do not create instances of this class yourself. Instead use the “team” method provided by your client object.
- region
The key of the team’s according region.
- league
The key of the team’s league.
- short_name
The short team name.
- long_name
The long team name.
- robot_name
The name of the team’s robot.
- location
The team’s location, in “City, State/Province, Country, Zipcode” format.
- rookie_year
The year in which the team was a rookie team.
- last_active
The season key of the season in which the team participated in their most recent match.
- website
The URL of the team’s website, if they have any
-
events
(season: alliancepy.season.Season)¶ Every event the team has participated in, in a particular season.
-
property
wins
¶ The total amount of times the team has won a match.
- Returns
The number of wins.
- Return type
int
-
property
losses
¶ The total amount of times the team has lost a match. :return: The number of losses. :rtype: int
-
property
ties
¶ The total amount of times the team has tied in a match.
- Returns
The number of ties.
- Return type
int
-
season_wins
(season: alliancepy.season.Season)¶ The amount of times a team has won a match in a particular season.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The number of wins in the specified season
- Return type
int
-
season_losses
(season: alliancepy.season.Season)¶ The amount of times a team has lost a match in a particular season.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The number of losses in the specified season
- Return type
int
-
season_ties
(season: alliancepy.season.Season)¶ The amount of times a team has tied in a match in a particular season.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The number of ties in the specified season
- Return type
int
-
opr
(season: alliancepy.season.Season)¶ OPR stands for Offensive Power Rating, which is a system to attempt to deduce the average point contribution of a team to an alliance. Penalties are also factored in.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The team’s OPR in the specified season
- Return type
float
-
np_opr
(season: alliancepy.season.Season)¶ NP_OPR is just OPR, but penalties are not factored in.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The team’s NP_OPR (OPR without penalties) in the specified season
- Return type
float
-
tiebreaker_points
(season: alliancepy.season.Season)¶ Tiebreaker points are the pre-penalty score of the losing alliance for each match. This function returns the total tiebreaker points of a team in one season.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The team’s tiebreaker points in the specified season
- Return type
float
-
ranking_points
(season: alliancepy.season.Season)¶ Ranking points are the number of points scored by the losing alliance in a qualification match. If you win the match, then the RP awarded to you is the score of your opponent alliance (which lost). If you lose the match, then the RP awarded to you is your own alliance’s score.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The team’s ranking points in the specified season
- Return type
float
-
qualifying_points
(season: alliancepy.season.Season)¶ Winning teams of a qualifying match eatch receive 2 QP. Losing teams receive 0. If a match ends in a tie, all four teams receive 1 QP.
- Parameters
season (
Season
) – An alliancepy Season object- Returns
The team’s qualifying points in the specified season
- Return type
int