A wrapper around the NHL’s JSON API.
Project description
statsapiclient: A client for the NHL stats API
Purpose
To provide a Python client to access the NHL's JSON API including game, play, and player data.
Installation
pip install -i https://test.pypi.org/simple/ 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()
For more: Jupyter notebook
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file statsapiclient-0.0.3.tar.gz.
File metadata
- Download URL: statsapiclient-0.0.3.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/19.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd9602bf4f45b53f4ad8ce151c2f954e05b24b4cc94298a20c183f1764256fea
|
|
| MD5 |
c5a2322f76c06512738965310dae3f39
|
|
| BLAKE2b-256 |
52bd0a105edfc333b700a6f1c94056a3f2fbfc74451e871a86d1c81ffb465086
|
File details
Details for the file statsapiclient-0.0.3-py3-none-any.whl.
File metadata
- Download URL: statsapiclient-0.0.3-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/19.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
008cc9ff3399a0eb7faa7dfb7a47bef82df7e1fbbcbe84ed54fb1107a01b3891
|
|
| MD5 |
9461dc7a8b9940d6c777b57ff4f3857b
|
|
| BLAKE2b-256 |
bf40011b18dde03f361ae97da6c26543477fb9efdfe81d31fe14116b8341bbd1
|