Skip to content

Instantly share code, notes, and snippets.

@dtcarls
Last active December 23, 2025 13:58
Show Gist options
  • Select an option

  • Save dtcarls/decff6ab5603d6a85ef85518870a2469 to your computer and use it in GitHub Desktop.

Select an option

Save dtcarls/decff6ab5603d6a85ef85518870a2469 to your computer and use it in GitHub Desktop.
most playoff points
from espn_api.football import League
#Palmetto
league_id = 164483
# chs
# league_id = 205018
league = League(league_id=league_id, year=2025)
playoff_start = league.settings.reg_season_count+1
playoffs_end = len(league.settings.matchup_periods)
totals={}
while playoff_start <= playoffs_end:
box_scores = league.box_scores(week=playoff_start)
for i in box_scores:
totals[i.home_team.team_name]=int(totals.get(i.home_team.team_name) or 0)+i.home_score
if i.away_team:
totals[i.away_team.team_name]=int(totals.get(i.away_team.team_name) or 0)+i.away_score
playoff_start += 1
totals = sorted(totals.items(), key=lambda tup: tup[1], reverse=True)
for idx, (team, pts) in enumerate(totals, start=1):
print(f"{idx:2}. {float(pts):.1f} - {team}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment