An easy-to-use wrapper for nba_api to easily find data for a player, game, team, or season
Project description
NBAStatPy
Overview
This is an easy-to-use wrapper for the nba_api
package. The goal is to be able to easily access and find data for a player, game, team, or season.
The data is accessed through a class based on how you're searching for it. A quickstart example is shown below. Currently there are 4 classes:
Game
Player
Season
Team
Quickstart
To get started you can import the class that represents the data you're searching for.
from nbastatpy.player import Player
Then you build a player using either an ID from stats.nba.com or the player's name. When you're building the player object you can add additional search data like season, data format, or playoffs vs. regular season.
player = Player(
"Giannis",
season="2020",
playoffs=True,
permode="PerGame"
)
Once you have the player object, you can get different datasets based on the criteria. For instance, you can get the awards the player has won by doing the following:
player.get_awards()
This returns a pandas dataframe with the awards won by the player each year.
There are a lot of endpoints and various arguments for more complex queries like tracking and synergy datasets.
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
File details
Details for the file nbastatpy-0.1.6.tar.gz
.
File metadata
- Download URL: nbastatpy-0.1.6.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f13777acc560836d1358ec7ff2ae16bf9f8ce9e551b10ea35c2add54c6da2008 |
|
MD5 | 82a28d1f0a69953b50c8f19cf8954c22 |
|
BLAKE2b-256 | 42b45abf5651869ad928a3932d06cdaf11252103661e285347c9d4d8042b7e12 |
File details
Details for the file nbastatpy-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: nbastatpy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87d35ba85a8473527271d8f0c2747567a46a8705823faaf1bbd46b414531847 |
|
MD5 | 97bc2883f16cee2d549c9a11716eb9dd |
|
BLAKE2b-256 | bdab789f9c71d226a3616b17a9b842ee77b573a1d5901574a31160d57fb1a5b5 |