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.3.1.tar.gz (15.4 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.3.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wpybl-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a9356b53738bc9a4786e0a42210bffa0a327910a4c395acb5266dc32fbc5676c
MD5 0b51376080c7e4eae61835c1bf4ef22a
BLAKE2b-256 6c1fc129c40b3394d6e8d6bd868aaefe20f9aaa602904e55f6dbcea36809ba8c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wpybl-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4dd5345372013f2df5380b0257b0db2b6622c3a705b5c0c46413cbd71c8310cb
MD5 fcca47c30b02bde5d13005e843c0e75c
BLAKE2b-256 9a0bd8ad57a66d39295fb259bd9fccead913a39754dbd1501d8128f763618a53

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