SlaPyShot
A clean Python wrapper for the SportRadar NHL API.
SlaPyShot turns raw SportRadar JSON into tidy Polars DataFrames with one line of code. No wrestling with nested dicts, no manual pagination, no rate-limit headaches — just hockey data, ready to analyze.
from slapyshot import NHLClient
client = NHLClient()
# Get every NHL team
teams = client.teams.get_all_teams()
# Today's schedule
schedule = client.schedule.get_daily_schedule(2026, 3, 22)
# Live boxscore
boxscore = client.games.get_game_boxscore(game_id)
# Player career stats
profile = client.players.get_player_profile(player_id)
Why SlaPyShot?
| Feature | Detail |
|---|---|
| Polars-native | Every endpoint returns a pl.DataFrame — filter, sort, join with zero boilerplate |
| Rate limiting built in | Automatic 1-second delay between calls keeps you inside the free tier |
| Simple auth | Drop your API key in a .env file and forget about it |
| Typed & documented | Every method has full docstrings with column descriptions and examples |
1. Install SlaPyShot
Quick Setup
- Get a free API key from SportRadar
- Add it to a
.envfile in your project root:
- Start querying:
What's Available
-
Teams & Rosters
Get all 32 NHL teams with conference and division info, or pull the full roster for any team.
-
Schedules
Fetch the schedule for any single day or pull the full season schedule at once.
-
Game Data
Boxscores, player summaries, and full play-by-play for any game.
-
Player Stats
Career profiles and full team season statistics for any player or team.