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
To install the latest version from PyPI:
pip install wpybl
To install the latest version from GitHub (ahead of the PyPI release):
git clone https://github.com/rockysnow7/wpybl.git
cd wpybl
uv build
pip install dist/wpybl-<version>-py3-none-any.whl
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.1.0.tar.gz
(10.4 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.1.0-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file wpybl-0.1.0.tar.gz.
File metadata
- Download URL: wpybl-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62c06d03c985cf79f9d176d05bc9efe43d9aefd569d308582354f42294b45518
|
|
| MD5 |
ab1421d2986086a0fd896348b31ffbf8
|
|
| BLAKE2b-256 |
668fe30071a2e9f6d959c421d6f79f5d0d3243b648b87140f2e9dab7a3fe1aa7
|
File details
Details for the file wpybl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wpybl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d875bb4b9343abb9afcbf9a79d00bc12bc3f18d381e3a7fbd7b93a1ce1862538
|
|
| MD5 |
df4ba2feaa1061162c5c2f9b7ba3cdb5
|
|
| BLAKE2b-256 |
9e1659833d0960dd8c38a8728b6173bac1f4da8821aa55fb959eff4deb3a057b
|