pysoccer package¶
Subpackages¶
- pysoccer.algorithms package
- pysoccer.serializers package
- Subpackages
- pysoccer.serializers.WyscoutSerializer package
- Submodules
- pysoccer.serializers.WyscoutSerializer.eventSerializer module
- pysoccer.serializers.WyscoutSerializer.matchSerializer module
- pysoccer.serializers.WyscoutSerializer.phaseDetection module
- pysoccer.serializers.WyscoutSerializer.phaseFeatures module
- pysoccer.serializers.WyscoutSerializer.wyscoutAttributes module
- Module contents
- pysoccer.serializers.WyscoutSerializer package
- Module contents
- Subpackages
Submodules¶
pysoccer.attributes module¶
-
class
pysoccer.attributes.Formation(lineup: List[pysoccer.attributes.Player], bench: List[pysoccer.attributes.Player])¶ Bases:
objectClass defining the formation of a given team in a match.
-
bench: List[pysoccer.attributes.Player]¶
-
lineup: List[pysoccer.attributes.Player]¶
-
-
class
pysoccer.attributes.Player(player_id: int, shirt_number: int, played_minutes: int, yellow_cards: int, red_cards: int, own_goals: int, goals: int)¶ Bases:
objectClass defining a soccer player.
-
goals: int¶
-
own_goals: int¶
-
played_minutes: int¶
-
player_id: int¶
-
red_cards: int¶
-
shirt_number: int¶
-
yellow_cards: int¶
-
-
class
pysoccer.attributes.Point(x: float, y: float)¶ Bases:
objectClass defining a point on the pitch.
-
x: float¶
-
y: float¶
-
-
class
pysoccer.attributes.ResultType(value)¶ Bases:
enum.EnumClass defining the possible results of an event.
-
FAILURE= 'FAILURE'¶
-
NEUTRAL= 'NEUTRAL'¶
-
SUCCESS= 'SUCCESS'¶
-
UNDEFINED= 'UNDEFINED'¶
-
-
class
pysoccer.attributes.Substitution(player_in: int, player_out: int, timestamp: float)¶ Bases:
objectClass defining a substitution during a match.
-
player_in: int¶
-
player_out: int¶
-
timestamp: float¶
-
-
class
pysoccer.attributes.Team(team_id: int, coach_id: int, score: int, formation: pysoccer.attributes.Formation, substitutions: List[pysoccer.attributes.Substitution])¶ Bases:
objectClass defining a soccer team.
-
coach_id: int¶
-
formation: pysoccer.attributes.Formation¶
-
score: int¶
-
substitutions: List[pysoccer.attributes.Substitution]¶
-
team_id: int¶
-
pysoccer.base module¶
pysoccer.event module¶
-
class
pysoccer.event.Event(event_id: int, team_id: int, player_id: int, match_id: int, period: str, timestamp: float, start_position: pysoccer.attributes.Point, end_position: pysoccer.attributes.Point, outcome: pysoccer.attributes.ResultType, label: str, tags: List[str], phase_id: int, phase_end: str, phase_possessing_team: int)¶ Bases:
objectClass defining a standardized event.
-
end_position: pysoccer.attributes.Point¶
-
event_id: int¶
-
get_position(pitch_length: int, pitch_width: int, pitch_side: str)¶ Function that computes a player’s position on the field.
- Parameters
pitch_length – the pitch’s length
pitch_width – the pitch’s width
pitch_side – the pitch’s side of the player’s team
-
label: str¶
-
match_id: int¶
-
outcome: pysoccer.attributes.ResultType¶
-
period: str¶
-
phase_end: str¶
-
phase_id: int¶
-
phase_possessing_team: int¶
-
player_id: int¶
-
start_position: pysoccer.attributes.Point¶
-
team_id: int¶
-
timestamp: float¶
-
to_dict()¶
-
-
class
pysoccer.event.NotPossessionEvent(event_id: int, team_id: int, player_id: int, match_id: int, period: str, timestamp: float, start_position: pysoccer.attributes.Point, end_position: pysoccer.attributes.Point, outcome: pysoccer.attributes.ResultType, label: str, tags: List[str], phase_id: int, phase_end: str, phase_possessing_team: int, is_duel: bool = False, challenged_player: Optional[str] = None, is_foul: bool = False, card: Optional[str] = None)¶ Bases:
pysoccer.event.EventClass that specifies an event of a player of the not possessing team.
-
card: str = None¶
-
challenged_player: str = None¶
-
is_duel: bool = False¶
-
is_foul: bool = False¶
-
-
class
pysoccer.event.PossessionEvent(event_id: int, team_id: int, player_id: int, match_id: int, period: str, timestamp: float, start_position: pysoccer.attributes.Point, end_position: pysoccer.attributes.Point, outcome: pysoccer.attributes.ResultType, label: str, tags: List[str], phase_id: int, phase_end: str, phase_possessing_team: int, is_duel: bool = False, challenged_player: Optional[str] = None, is_shot: bool = False, goal_position: Optional[str] = None, is_goal: bool = False, is_pass: bool = False, receiver_player_id: Optional[int] = None, is_assist: bool = False, is_keypass: bool = False)¶ Bases:
pysoccer.event.EventClass that specifies an event of a player of the possessing team.
-
challenged_player: str = None¶
-
goal_position: str = None¶
-
is_assist: bool = False¶
-
is_duel: bool = False¶
-
is_goal: bool = False¶
-
is_keypass: bool = False¶
-
is_pass: bool = False¶
-
is_shot: bool = False¶
-
receiver_player_id: int = None¶
-
pysoccer.match module¶
-
class
pysoccer.match.Match(competition_id: int, round_id: int, season_id: int, date_utc: str, match_id: int, label: str, home_team: pysoccer.attributes.Team, away_team: pysoccer.attributes.Team, additional_attributes: ])¶ Bases:
objectClass defining a match.
-
additional_attributes: ]¶
-
away_team: pysoccer.attributes.Team¶
-
competition_id: int¶
-
date_utc: str¶
-
home_team: pysoccer.attributes.Team¶
-
label: str¶
-
match_id: int¶
-
round_id: int¶
-
season_id: int¶
-