wpybl
A Python library for working with Women's Professional Baseball League (WPBL) data. It aims to be equivalent to the pybaseball library. (This is fan-made and not affiliated with the WPBL.)
Installation
pip install wpybl
Modules
data: Downloads and loads game data from the WPBL API.raw: Data models to wrap the WPBL API's JSON responses.stats: Functions to calculate statistics from game data.
Example
from wpybl.data import GamesCollection
from wpybl.stats.batting import player_batting_rate_stats
from wpybl.stats.pitching import pitching_rate_stats
if __name__ == "__main__":
games = GamesCollection.all()
print(player_batting_rate_stats("Amanda Gianelloni", games))
# avg obp slg ops
# 0 0.455 0.538 0.727 1.266
print(pitching_rate_stats(games))
# era whip k/bb
# Alli Schroder 27.00 4.80 0.20
# Alyssa Zettlemoyer 0.00 1.80 0.00
# Andreanne Leblanc 0.00 1.00 1.00
# Ayami Sato 4.50 1.88 5.00
# ...
for game in games:
game.plays_to_csv(f"{game.game_id}.csv") # saves play-by-plays to a CSV file
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wpybl-0.0.2.tar.gz
(9.7 kB
view details)
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
wpybl-0.0.2-py3-none-any.whl
(14.0 kB
view details)
File details
Details for the file wpybl-0.0.2.tar.gz.
File metadata
- Download URL: wpybl-0.0.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f724f465342cbbba56ec92df1fd8d068ae13496b23dd89cad33a16aa74c50a3
|
|
| MD5 |
9d1c3cd3660d9529b1fa7b69450ae46f
|
|
| BLAKE2b-256 |
ee9837a04bdccffb4957bff25bac79436d85470b1b6db5d3f2e5c56f856bec58
|
File details
Details for the file wpybl-0.0.2-py3-none-any.whl.
File metadata
- Download URL: wpybl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e81bd9357e634095449b1fd98219f312b137827c78714ba886ce8183f1f89352
|
|
| MD5 |
9678eb20065a70e90673461eda21ee0f
|
|
| BLAKE2b-256 |
a55fcdf10e1e6f140b9f79316d260aa050fd7b22c32ef6e4442a9c073dc6f79f
|