ServingState

The ServingState dataclass encapsulates the serving team, player, receiver, and court side for the upcoming/next point in the match. It is exposed through the server property of the MatchScore.

Properties

  • Name
    team
    Type
    TeamId
    Description

    The TeamId about to serve the upcoming/next point (TeamId.A or TeamId.B).

  • Name
    player
    Type
    Player | None
    Description

    The specific Player about to serve the upcoming/next point, or None if player details are not configured.

  • Name
    receiver
    Type
    Player | None
    Description

    The specific Player about to receive the upcoming/next serve, or None if team details are not configured.

  • Name
    court_side
    Type
    'left' | 'right' | None
    Description

    The side of the court from which the serve is executed ("left" or "right"), or None.


Initialization

Creates a new instance of a ServingState.

Keyword Arguments

  • Name
    team
    Type
    TeamId
    Description

    The TeamId about to serve the upcoming/next point (TeamId.A or TeamId.B).

  • Name
    player
    Type
    Player | None
    Description

    The specific Player about to serve the upcoming/next point, or None if player details are not configured.

  • Name
    receiver
    Type
    Player | None
    Description

    The specific Player about to receive the upcoming/next serve, or None if player details are not configured.

  • Name
    court_side
    Type
    'left' | 'right' | None
    Description

    The side of the court from which the serve is executed ("left" or "right"), or None.

Instantiation

class
ServingState
from padelkit import ServingState, TeamId, Player

server_state = ServingState(
    team=TeamId.A,
    player=Player(name="A. Galán"),
    receiver=Player(name="F. Belasteguín"),
    court_side="right"
)

Output structure

ServingState(
  team=<TeamId.A: 'A'>,
  player=Player(name='A. Galán', ...),
  receiver=Player(name='F. Belasteguín', ...),
  court_side='right'
)

Was this page helpful?