NBA Player Data into JSON
Installation
pip install nba-player
Usage
import datanba
Get All Players
data = datanba.player_stats.AllOfBasketball(arr)
arr is the years that you want in the normal year format for NBA (i.e ["2018-19"])
To get all player data into JSON
data = datanba.player_stats.AllOfBasketball(["2018-19"])
data.gather("players.json", exists=False)
Only use this if you have nothing in your players.json file or it does not exist at all.
However, since you will be polling a lot, you might have your connection work or the NBA stats API will limit you, so if scraping stops in the middle, you can change your code to:
data = datanba.player_stats.AllOfBasketball(["2018-19"])
data.gather("players.json", exists=True)
Then, scraping will continue from where it left off.
Use Player JSON data
After polling once, you can reuse the output form the JSON file as long as you would like(until the data that you have polled has become old), by using these commands.
import datanba.player_stats as datanba
data = datanba.AllOfBasketball(["2018-19"])
players = data.players_from_json('players.json')
Now you have all NBA players in your players variable.
Metadata
Release files for nba-player 0.6.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nba_player-0.6.8.tar.gz | 6.1 kB | Without provenance | Details for nba_player-0.6.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nba_player-0.6.8-py3-none-any.whl | Python 3 | none | any | Details for nba_player-0.6.8-py3-none-any.whl |
Total release size: 17.8 kB
Release files / nba_player-0.6.8.tar.gz
| Download URL | nba_player-0.6.8.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35eed9e1f103beabcc6e00cfa031866d1506387cecfbbbc953b1dccf04441570
|
|
BLAKE2b-256 checksum How to use checksums |
c01ecb014a576681ce52047361281e60d367d073c11a9c9e8d31af6c5f777fd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4
|
Release files / nba_player-0.6.8-py3-none-any.whl
| Download URL | nba_player-0.6.8-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
717e07e65590b890ac72c91cf1512ed513a7644afee35032e91d6c95a16b3138
|
|
BLAKE2b-256 checksum How to use checksums |
f50fc70e21cbffd45e4ffe326ccd60add2830c3944c218c133c5264b079da079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4
|
Security for nba-player 0.6.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.