Models¶
Pydantic data models exposed by lptk.
Team & player¶
- class lptk.Player¶
Bases:
BaseModelA tournament participant/player.
- player_id¶
Internal start.gg participant ID.
- player_tag¶
Player’s in-game name/gamertag.
- player_country¶
ISO 3166-1 alpha-2 country code (lowercase, e.g., “fr”, “us”).
- class lptk.Team¶
Bases:
BaseModelA tournament team/entrant with placement and roster.
- placement¶
Current standing/placement in the tournament (1 = winner).
- team_name¶
Display name of the team (None for empty placeholders).
- members¶
List of players on the team roster.
- entrant_id¶
Internal start.gg entrant ID for API lookups.
- elimination_set_id¶
ID of the set where the team was eliminated.
- bracket_group¶
Bracket group identifier (e.g., “B1”, “B2”).
- bracket_identifier¶
Match identifier within the bracket (e.g., “AL”, “AM”).
- source_phase¶
Name of the phase this team was collected from.
- phase_type¶
Type of phase (finals, playoffs, swiss, pools).
- pool_group¶
Pool/group identifier for earlier stages.
- pool_placement¶
Placement within the pool/group.
- pool_number¶
Numeric pool identifier for sorting.
Tournament structure¶
- class lptk.Phase¶
Bases:
BaseModelA tournament phase (stage) containing one or more phase groups.
- id¶
Internal start.gg phase ID.
- name¶
Display name of the phase (e.g., “Day 2”, “Playoffs”).
- state¶
Phase state (1=CREATED, 2=ACTIVE, 3=COMPLETED).
- num_seeds¶
Total number of entrants in this phase.
- groups¶
List of phase groups within this phase.
- groups: list[PhaseGroup]¶
- class lptk.PhaseGroup¶
Bases:
BaseModelA phase group (bracket/pool) within a tournament phase.
- id¶
Internal start.gg phase group ID.
- identifier¶
Display identifier (e.g., “B1”, “Pool A”).
- state¶
Phase group state (1=CREATED, 2=ACTIVE, 3=COMPLETED).
- num_seeds¶
Number of entrants seeded into this group.
- class lptk.SetSlot¶
Bases:
BaseModelA participant slot in a match/set.
- entrant_id¶
Internal start.gg entrant ID.
- entrant_name¶
Display name of the entrant.
- score¶
Game score for this entrant in the set.
- class lptk.SetDetails¶
Bases:
BaseModelDetails of a completed match/set.
- set_id¶
Internal start.gg set ID.
- identifier¶
Match identifier within the bracket (e.g., “AL”, “B1 AM”).
- winner_id¶
Entrant ID of the winner.
- winner_name¶
Display name of the winner.
- loser_name¶
Display name of the loser.
- winner_score¶
Winner’s game score.
- loser_score¶
Loser’s game score.
- property bracket_group: str | None¶
Extract bracket group from identifier (e.g., ‘B1’ from ‘B1 AL’).
- format_score()¶
Format score for display, handling forfeits.
- Return type:
- Returns:
Formatted score string (e.g., “3-2”, “W-FF”, “FF-W”).