Skip to content

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

pip install git+https://github.com/Calebpeterson22/SlaPyShot.git@main
uv pip install git+https://github.com/Calebpeterson22/SlaPyShot.git@main
uv sync

Quick Setup

  1. Get a free API key from SportRadar
  2. Add it to a .env file in your project root:
SPORTRADAR_API_KEY=your_key_here
  1. Start querying:
from slapyshot import NHLClient
client = NHLClient()
print(client.teams.get_all_teams())

What's Available

  • Teams & Rosters


    Get all 32 NHL teams with conference and division info, or pull the full roster for any team.

    Teams vignette

  • Schedules


    Fetch the schedule for any single day or pull the full season schedule at once.

    Schedules vignette

  • Game Data


    Boxscores, player summaries, and full play-by-play for any game.

    Game data vignette

  • Player Stats


    Career profiles and full team season statistics for any player or team.

    Player stats vignette