Python Hockey Data Scraper
Project description
EdgingHockeyScraper
https://pypi.python.org/pypi/edginghockeyscraper
Install
pip install edginghockeyscraper
Python Hockey Data Scraper
- Free software: MIT license
- Documentation: https://edginghockeyscraper.readthedocs.io.
Features
-
Python Hockey Data Scraper with following features:
- Caching Requests to quickly fetch data
- Parallel Processing to speed up data fetch from NHL API
-
Get League schedule for year - Usage
schedule = edginghockeyscraper.get_league_schedule(2024) -
Get Game boxscore
boxscore = edginghockeyscraper.get_boxscore(2024020345)
-
Get Game playByPlay
playByPlay = edginghockeyscraper.get_play_by_play(2024020345)
-
Get Season boxscores
boxscoreSeason = edginghockeyscraper.get_boxscore_season(2024)
-
Get Season playByPlay
playByPlaySeason = edginghockeyscraper.get_play_by_play_season(2024)
Filter Season data by PreSeason, Regular, PostSeason gametypes
- e.g.
games = edginghockeyscraper.get_league_schedule(2024, {GameType.REG})boxscoreSeason = edginghockeyscraper.get_boxscore_season(2024, {GameType.REG})
Utilize requests-cache for fast repeated request calls
-
First Call:
%%time edginghockeyscraper.get_boxscore_season(2024, cache= True)CPU times: user 583 ms, sys: 318 ms, total: 901 ms Wall time: 1min 18s -
Second Call:
CPU times: user 374 ms, sys: 141 ms, total: 515 ms Wall time: 1.31 s
A 60x speedup!
Utilize multiprocessing to improve request speed
Benchmark using 2024 Macbook Air Apple M3 16GB
-
No Parallel getBoxscoreSeason:
CPU times: user 15.6 s, sys: 3.55 s, total: 19.1 s Wall time: 8min 49s -
Parallel getBoxscoreSeason:
CPU times: user 583 ms, sys: 318 ms, total: 901 ms Wall time: 1min 18sA ~7x Speedup! (this is an 8-core CPU - you can expect roughly a <# cpu-cores> speedup)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edginghockeyscraper-0.1.5.tar.gz.
File metadata
- Download URL: edginghockeyscraper-0.1.5.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b995d20cebd5bb1f461d0e4863d2fbabbdebb286a03567d3109746288dda8ce
|
|
| MD5 |
a1607661aa81bf8912e3457d3bf76863
|
|
| BLAKE2b-256 |
b12f6cd12b3fea227caeaeedfd023ef160cbd6c40204012f839c70e8d74f34f8
|
Provenance
The following attestation bundles were made for edginghockeyscraper-0.1.5.tar.gz:
Publisher:
python-publish.yml on austinegri/edginghockeyscraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edginghockeyscraper-0.1.5.tar.gz -
Subject digest:
7b995d20cebd5bb1f461d0e4863d2fbabbdebb286a03567d3109746288dda8ce - Sigstore transparency entry: 153158292
- Sigstore integration time:
-
Permalink:
austinegri/edginghockeyscraper@cf27424f45fdcd40c018e3e7ea3b432a5da0ee07 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/austinegri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cf27424f45fdcd40c018e3e7ea3b432a5da0ee07 -
Trigger Event:
release
-
Statement type:
File details
Details for the file edginghockeyscraper-0.1.5-py3-none-any.whl.
File metadata
- Download URL: edginghockeyscraper-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdb766927f09af4900cce2d3fbebbb90cdc24c74ab1748d2c3b9d35597b28163
|
|
| MD5 |
8c92a2197685a9bea993bd360cccc8a0
|
|
| BLAKE2b-256 |
e82a3f7304400ea66dea7548f04f641d7c510d3927061ec6210b47937467aa49
|
Provenance
The following attestation bundles were made for edginghockeyscraper-0.1.5-py3-none-any.whl:
Publisher:
python-publish.yml on austinegri/edginghockeyscraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edginghockeyscraper-0.1.5-py3-none-any.whl -
Subject digest:
fdb766927f09af4900cce2d3fbebbb90cdc24c74ab1748d2c3b9d35597b28163 - Sigstore transparency entry: 153158293
- Sigstore integration time:
-
Permalink:
austinegri/edginghockeyscraper@cf27424f45fdcd40c018e3e7ea3b432a5da0ee07 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/austinegri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cf27424f45fdcd40c018e3e7ea3b432a5da0ee07 -
Trigger Event:
release
-
Statement type: