pwhl_api
An API Client Package to Access the APIs of thepwhl.com
pwhl_api is a client for APIs used by thepwhl.com to retrieve statistics for PWHL league teams and personnel.
This client is based on the work done by Swar Patel and other contributors on nba_api, a similar package for endpoints on nba.com. Further, in the process of creating endpoints for this client, Isabelle Lefebvre's write-up regarding the https://lscluster.hockeytech.com/feed/ endpoints used on the PWHL site was used for identification and validation.
Getting Started
pwhl_api requires Python version 3.10 or higher, and can be installed through pip using the following command:
pip install pwhl_api
Getting Static Team Information
# Getting team information by id
from pwhl_api.static.teams import get_team, get_team_by_name
get_team("2")
Expected output:
{'id': '2',
'name': 'Minnesota Frost',
'nickname': 'Frost',
'team_code': 'MIN',
'division_id': '1',
'logo': 'https://assets.leaguestat.com/pwhl/logos/50x50/2.png'}
# Getting team information by name
get_team_by_name("Boston Fleet")
Expected output:
{'id': '1',
'name': 'Boston Fleet',
'nickname': 'Fleet',
'team_code': 'BOS',
'division_id': '1',
'logo': 'https://assets.leaguestat.com/pwhl/logos/50x50/1.png'}
Retrieving Team Rosters
from pwhl_api.endpoints.teamroster import TeamRoster
roster = TeamRoster(team_id="2", season="8") # team: Minnesota Frost, season: 2025-26 Regular
roster_dfs = roster.get_data_frames()
roster_dfs['Forwards'].head(5)
shoots hometown player_id birthdate tp_jersey_number position \
0 R Mississauga, ON 265 2001-03-02 3 F
1 R Amherst, NY 191 2001-01-16 6 F
2 R Andover, MN 102 1999-09-24 7 F
3 R Atlanta, GA 194 2001-09-20 11 F
4 R Plymouth, MN 23 1995-12-29 12 F
name
0 Alyssa Machado
1 Katy Knoll
2 Claire Butorac
3 Kaitlyn O'Donohoe
4 Kelly Pannek
Documentation
Metadata
Release files for pwhl-api 0.1.2
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 |
|---|---|---|---|---|
| pwhl_api-0.1.2.tar.gz | 22.5 kB | Without provenance | Details for pwhl_api-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pwhl_api-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pwhl_api-0.1.2-py3-none-any.whl |
Total release size: 47.2 kB
Release files / pwhl_api-0.1.2.tar.gz
| Download URL | pwhl_api-0.1.2.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1eaa0e9e8cc6caf1722062be3c074222e9d2bed777f15f19154f37df50c4f394
|
|
BLAKE2b-256 checksum How to use checksums |
5a804177ff92900a7f94fe02972ed1b7b0e52644affe24ba9f164792abb83781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.1
|
Release files / pwhl_api-0.1.2-py3-none-any.whl
| Download URL | pwhl_api-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
323180e8d423d6ac7cd0502caf4f8471da007604b841ed5603cd9852f1173200
|
|
BLAKE2b-256 checksum How to use checksums |
8639a074c0c2f4fb42d25856aeb7580fcfe1bb4852f34279f88af6deb3abf289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.1
|
Security for pwhl-api 0.1.2
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.