NHL API Wrapper. For standings, team stats and outcomes.
Project description
NHL-py-api
NHL-py-api is a Python package that provides a simple wrapper around the NHL API, allowing you to easily access and retrieve NHL data in your Python applications.
Note: This is very early, I created this to help me with some machine learning projects around the NHL and the NHL data sets. Special thanks to https://github.com/erunion/sport-api-specifications/tree/master/nhl.
Installation
You can install NHL-py-api using pip:
pip install nhl-api-py
Usage
from nhlpy import NHLClient
client = NHLClient()
Available methods:
client.teams.all()
client.teams.get_by_id(id=1, roster=False)
client.teams.get_team_next_game(id=1)
client.teams.get_team_previous_game(id=1)
client.teams.get_team_stats(id=1)
# Standings
client.standings.get_standings(season="20222023", detailed_record=False)
client.standings.get_standing_types()
# Player Stats
client.players.get_player_stats(person_id=8477949, season="20222023", stat_type="statsSingleSeason")
client.players.get_player_stats(person_id=8477949, season="20222023", stat_type="goalsByGameSituation")
client.players.get_player_stats(person_id=8477949, season="20222023", stat_type="yearByYear")
Developers
poetry install --with dev
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
nhl_api_py-0.1.3.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for nhl_api_py-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ea12dd48a1ba6e39072bb8ddf124b1771a79129cd02e0340ffe0cd75db0fae |
|
MD5 | 29ed7b1de5633a8d514ac5faefa8e574 |
|
BLAKE2b-256 | 56ae741a2c8c7b45cc6e82f8185f00d04bd23e0ca65b55288d9368b808f19c93 |