Team
The Team dataclass groups two players together and specifies team-level attributes.
Properties
- Name
id- Type
- TeamId
- Description
Identifier for the team (
TeamId.AorTeamId.B).
- Name
player1- Type
- Player
- Description
The first
Player.
- Name
player2- Type
- Player
- Description
The second
Player.
- Name
serve_formation- Type
- Literal['standard', 'australian']
- Description
The serve formation used by the team.
- Name
name- Type
- str | None
- Description
An optional custom name for the team (e.g., "The Pros"). If omitted, the team will be displayed as "Player1 / Player2".
Initialization
Creates a new instance of a Team.
Keyword Arguments
- Name
id- Type
- TeamId
- Description
Identifier for the team (
TeamId.AorTeamId.B).
- Name
player1- Type
- Player
- Description
The first
Player.
- Name
player2- Type
- Player
- Description
The second
Player.
- Name
serve_formation- Type
- Literal['standard', 'australian']
- Description
The serve formation used by the team.
- Name
name- Type
- str | None
- Description
An optional custom name for the team (e.g., "The Pros"). If omitted, the team will be displayed as "Player1 / Player2".
Instantiation
class
Teamfrom padelkit import Team, TeamId, Player
team = Team(
id=TeamId.A,
player1=Player(name="A. Galán"),
player2=Player(name="J. Lebrón"),
serve_formation="australian"
)
Output structure
Team(
id=<TeamId.A: 1>,
player1=Player(name='A. Galán', ...),
player2=Player(name='J. Lebrón', ...),
serve_formation='australian',
name=None
)