Skip to main content

pypi python version license

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)

Source distribution for BRScraper 1.0.3
File Size Uploaded
brscraper-1.0.3.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BRScraper 1.0.3
File Interpreter ABI Platform
BRScraper-1.0.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page