BRScraper
Python package for easy access to basketball data through scraping of Basketball Reference website.
This allows users to obtain statistics, standings, and scores for various seasons and phases of the following tournaments:
- NBA
- G League
- International Tournaments (Olympics, EuroLeague, EuroCup and international leagues from: Spain, Australia, China, France, Greece, Israel, Italy, Turkey, Russia and ABA)
Installing
Via pip
This library was written as an exercise for creating my first PyPi package. Hopefully you will find it valuable! Install with the following command:
pip install BRScraper
Documentation
For documentation about the API methods refer to the documentation.
Example of use
from BRScraper import nba
# All players stats per game regular season
nba.get_stats(2023, info='per_game', playoffs=False, rename=False).head()
Output:
| Player | Pos | Age | Tm | G | GS | ... | STL | BLK | TOV | PF | PTS | Season | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Precious Achiuwa | C | 23 | TOR | 55 | 12 | ... | 0.6 | 0.5 | 1.1 | 1.9 | 9.2 | 2022-23 |
| 1 | Steven Adams | C | 29 | MEM | 42 | 42 | ... | 0.9 | 1.1 | 1.9 | 2.3 | 8.6 | 2022-23 |
| 2 | Bam Adebayo | C | 25 | MIA | 75 | 75 | ... | 1.2 | 0.8 | 2.5 | 2.8 | 20.4 | 2022-23 |
| 3 | Ochai Agbaji | SG | 22 | UTA | 59 | 22 | ... | 0.3 | 0.3 | 0.7 | 1.7 | 7.9 | 2022-23 |
| 4 | Santi Aldama | SF | 22 | MEM | 77 | 20 | ... | 0.6 | 0.6 | 0.8 | 1.9 | 9.0 | 2022-23 |
More examples in the files.
Use it wisely!
Metadata
Release files for BRScraper 1.0.3
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 |
|---|---|---|---|---|
| brscraper-1.0.3.tar.gz | 9.0 kB | Without provenance | Details for brscraper-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| BRScraper-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for BRScraper-1.0.3-py3-none-any.whl |
Total release size: 28.5 kB
Release files / brscraper-1.0.3.tar.gz
| Download URL | brscraper-1.0.3.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ad0de77ebe4faf4ef9c8e3ae356cb2667b5fa5c4de074859844c2262e7efbb2
|
|
BLAKE2b-256 checksum How to use checksums |
1d4ad2119fc63fe23fca56a7b4c45a5ad63fa0f74d6a51c4de3460ad2cc5f8f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Release files / BRScraper-1.0.3-py3-none-any.whl
| Download URL | BRScraper-1.0.3-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c75a5fb189446f92c323f6082f917d49d152378ec2b8d174f857afc88576619f
|
|
BLAKE2b-256 checksum How to use checksums |
eaacf3c8add08a3a55b7fc9f909b96be7b6273ae980f23bbbd27ebeb08c13d7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Security for BRScraper 1.0.3
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.