# 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.
```{python}
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.
```{python}
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:
```{python}
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/aberghammer-analytics/NBAStatPy",
"name": "nbastatpy",
"maintainer": "Anthony Berghammer",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "aberghammer.analytics@gmail.com",
"keywords": "basketball, data, nba, sports, stats",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/42/b4/5abf5651869ad928a3932d06cdaf11252103661e285347c9d4d8042b7e12/nbastatpy-0.1.6.tar.gz",
"platform": null,
"description": "# NBAStatPy\n\n## Overview\n\nThis 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. \n\nThe 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:\n\n- `Game`\n- `Player`\n- `Season`\n- `Team`\n\n## Quickstart\n\nTo get started you can import the class that represents the data you're searching for.\n\n```{python}\nfrom nbastatpy.player import Player\n```\n\nThen 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.\n\n```{python}\nplayer = Player(\n \"Giannis\", \n season=\"2020\", \n playoffs=True,\n permode=\"PerGame\"\n)\n```\n\nOnce 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:\n\n```{python}\nplayer.get_awards()\n```\n\nThis returns a pandas dataframe with the awards won by the player each year.\n\nThere are a lot of endpoints and various arguments for more complex queries like tracking and synergy datasets.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "An easy-to-use wrapper for nba_api to easily find data for a player, game, team, or season",
"version": "0.1.6",
"project_urls": {
"Documentation": "https://github.com/aberghammer-analytics/NBAStatPy/blob/main/README.md",
"Homepage": "https://github.com/aberghammer-analytics/NBAStatPy",
"Repository": "https://github.com/aberghammer-analytics/NBAStatPy"
},
"split_keywords": [
"basketball",
" data",
" nba",
" sports",
" stats"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bdab789f9c71d226a3616b17a9b842ee77b573a1d5901574a31160d57fb1a5b5",
"md5": "97bc2883f16cee2d549c9a11716eb9dd",
"sha256": "a87d35ba85a8473527271d8f0c2747567a46a8705823faaf1bbd46b414531847"
},
"downloads": -1,
"filename": "nbastatpy-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "97bc2883f16cee2d549c9a11716eb9dd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 14046,
"upload_time": "2024-06-04T01:55:11",
"upload_time_iso_8601": "2024-06-04T01:55:11.636752Z",
"url": "https://files.pythonhosted.org/packages/bd/ab/789f9c71d226a3616b17a9b842ee77b573a1d5901574a31160d57fb1a5b5/nbastatpy-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42b45abf5651869ad928a3932d06cdaf11252103661e285347c9d4d8042b7e12",
"md5": "82a28d1f0a69953b50c8f19cf8954c22",
"sha256": "f13777acc560836d1358ec7ff2ae16bf9f8ce9e551b10ea35c2add54c6da2008"
},
"downloads": -1,
"filename": "nbastatpy-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "82a28d1f0a69953b50c8f19cf8954c22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 11758,
"upload_time": "2024-06-04T01:55:13",
"upload_time_iso_8601": "2024-06-04T01:55:13.990722Z",
"url": "https://files.pythonhosted.org/packages/42/b4/5abf5651869ad928a3932d06cdaf11252103661e285347c9d4d8042b7e12/nbastatpy-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-04 01:55:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aberghammer-analytics",
"github_project": "NBAStatPy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nbastatpy"
}