Box scores¶
Job: NFL: Lions box scores — every 30 minutes.
Command: football_sync box_scores [--season YYYY], or --seasons 2010-2025 box_scores for history.
ESPN's game summary (/summary?event=<game id>) for each tracked team's game
that has kicked off, stored as a GameBoxScore beside the Game:
- team_stats — the two teams' totals side by side (first downs, third-down efficiency, total / passing / rushing yards, turnovers, penalties, possession time…);
- player_stats — every per-category table ESPN publishes for each team (passing, rushing, receiving, fumbles, defense, interceptions, returns, kicking, punting) with ESPN's column labels, each player's line and the team totals;
- scoring_plays, drives (summaries, no play-by-play), leaders, attendance, officials and weather.
A live game is re-fetched each run until ESPN marks it final; a final box
score is never fetched again unless --seasons replays it. On a day with no
game waiting, the job makes no request. The public game page
(/schedule/game/<id>/) renders the scoring summary, the team comparison,
both teams' player tables and the drive chart from this record.
Game logs¶
Each box score also writes a PlayerGameLog per tracked-team player per
category — the player's line in that game with ESPN's columns — so the
public player page shows a season game log (/roster/player/<id>/,
?season= to switch years) with no extra fetch. football_sync game_logs
--season YYYY (or --seasons …) rebuilds them from the stored box scores;
a player who appears in a box score but not in the player table is created
as a non-roster historical player. Staff pages at /football/game-logs/,
REST at /api/football/game-logs/?player=<id>&season=2026.