Skip to main content

A wrapper around the NHL’s JSON API.

Project description

statsapiclient: A client for the NHL stats API

CircleCI

Purpose

To provide a Python client to access the NHL's JSON API including game, play, and player data.

Installation

pip install statsapiclient

Modules

Schedule

get_games

Returns a list of games contained within the instantiated date or date range.

Games

game

get_box_score

get_line_score

get_play_by_play

Teams

get_active

Returns a list of all active teams.

get_active_by_conference

Returns a list of all active teams in a given conference.

get_active_by_division

Returns a list of all active teams in a given division.

Examples

Games from date:

from statsapiclient.schedule import Schedule


s = Schedule('2019-01-01')
games = s.get_games()

print(games[0]['gamePk'])    # 2018020612

Game data:

from statsapiclient.games.game import Game

g = Game('2018020612')

box_score = g.get_box_score()
line_score = g.get_line_score()
play_by_play = g.get_play_by_play()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statsapiclient-0.1.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

statsapiclient-0.1.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file statsapiclient-0.1.3.tar.gz.

File metadata

  • Download URL: statsapiclient-0.1.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Darwin/19.2.0

File hashes

Hashes for statsapiclient-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a15752788f7ce0d5e69a1b6086a7772e60549ac8ce9395db2664a5d9ef31bdea
MD5 1b7f7f81ee99f49cc22f2b44a0c548d9
BLAKE2b-256 f802bc50b6e1ecbc8c4a1a1a85f39245d47b7d78bc5035b4085d1abec76a8e56

See more details on using hashes here.

File details

Details for the file statsapiclient-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: statsapiclient-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Darwin/19.2.0

File hashes

Hashes for statsapiclient-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef0069ed544f7e3c8c395805076244e5cf8988662cfd0157dc50a9ae9fb0dc17
MD5 60a389d72b1e3d63b8e2525fa5f3178c
BLAKE2b-256 c2eb5ae34a2d2cd6ea4f4888537dfa3babe5289893c97a8a1ae6297782232452

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page