Skip to content

Getting Started

This guide will help you get up and running with the Griddy NFL SDK quickly.

Prerequisites

Before you begin, ensure you have:

  • Python 3.14+ or Node.js 18+
  • An NFL.com account for obtaining authentication tokens

Quick Installation

pip install griddy

For development with all dependencies:

pip install griddy[dev]
npm install griddy-sdk

Or with yarn:

yarn add griddy-sdk

Your First API Call

from griddy.nfl import GriddyNFL

# Initialize with your auth token
nfl = GriddyNFL(nfl_auth={"accessToken": "your_token"})

# Get games for a specific week
games = nfl.games.get_games(
    season=2024,
    season_type="REG",
    week=1
)

# Print game matchups
for game in games.games:
    home = game.home_team.abbreviation
    away = game.away_team.abbreviation
    print(f"{away} @ {home}")
import { GriddyNFL } from 'griddy-sdk';

// Initialize with your auth token
const nfl = new GriddyNFL({
  nflAuth: { accessToken: 'your_token' }
});

// Get games for a specific week
const games = await nfl.games.getGames(2024, 'REG', 1);

// Print game matchups
games.games?.forEach(game => {
  const home = game.homeTeam?.abbreviation;
  const away = game.awayTeam?.abbreviation;
  console.log(`${away} @ ${home}`);
});

// Clean up when done
nfl.close();

Next Steps