Skip to main content

wpybl

PyPI Latest Release

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

(For more examples, see the examples directory.)

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.2.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wpybl-0.2.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file wpybl-0.2.1.tar.gz.

File metadata

  • Download URL: wpybl-0.2.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for wpybl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 473cb25cc47a976bc3fddc11599dce022af3b906786065f3de85111f2b431496
MD5 9efc3ae52fc07cecc2aa99583e176d42
BLAKE2b-256 7fb2d0ddd3cfbbffbdca9f206e93ff2d1cfb5dc4f1e6a9a892049d5494401cfd

See more details on using hashes here.

File details

Details for the file wpybl-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: wpybl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for wpybl-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eefe28c282133f533e67e6c292b855f299100422bba6ad22108af447ad70625
MD5 19727ef8f96b2e30e68dfdce7c645117
BLAKE2b-256 fa2228c6eeea12aad4a229e8fb7f90b0ec0a5ed0378bb3ac89e9e319fb3d6a97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page