HoopStats
hoopstats can be accessed here on PyPi.
This project serves as a proof of concept (POC) for web scraping NBA data from Basketball Reference. The primary motivation is to explore the intersection of data science and software engineering by building a reliable NBA-focused Python package. The long-term objective of this project is to evolve into the backend of a full-stack application, providing users with seamless access to NBA statistics through an intuitive and user-friendly interface.
Table of Contents
Features
- Scrape NBA player statistics from Basketball Reference
- Access detailed game logs and player splits
- Convenient API for querying player and game data
Installation
To install HoopStats, you can use pip:
pip install hoopstats
Usage
Here's a basic example of how to use HoopStats:
from hoopstats import PlayerScraper
# Initialize the scraper with player names
player_scraper = PlayerScraper(first_name="Lonzo", last_name="Ball")
# Access the player's data
print(player_scraper.url)
# Access the player's game log stats, based on a given year
print(player_scraper.get_game_log_by_year(2024))
To review full functionality of the code, look under the services folder.
Testing
To run the tests for HoopStats, use the following command:
pytest --cov=.
Make sure to add tests for any new features or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
Author: Calvin Min (2024)
Metadata
Release files for hoopstats 0.1.5
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 |
|---|---|---|---|---|
| hoopstats-0.1.5.tar.gz | 8.3 kB | Without provenance | Details for hoopstats-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hoopstats-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for hoopstats-0.1.5-py3-none-any.whl |
Total release size: 19.1 kB
Release files / hoopstats-0.1.5.tar.gz
| Download URL | hoopstats-0.1.5.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2214debb12bc6c3d7857a8d6076d2132df449e3acfd1b9721dd0c736207545df
|
|
BLAKE2b-256 checksum How to use checksums |
ba3f9422757a13b3515e8d805bc677302003368a73e01cd2d1a3c8907caa82da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/23.6.0
|
Release files / hoopstats-0.1.5-py3-none-any.whl
| Download URL | hoopstats-0.1.5-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a39fe581e9260246d220191e36aacaf3cae7c72fd57da64b7c0452bebb6ca61
|
|
BLAKE2b-256 checksum How to use checksums |
a80fdc876127eb20478a2830893ef84c55ec197f3d4f8cb418819e2b4b3497d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/23.6.0
|
Security for hoopstats 0.1.5
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.