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.0.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.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wpybl-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b291c28a1343539df95a40c6f3e83e4d9b26e7cb7d0f65b29095e34adc641148
MD5 af68c9558d9b7d7de784d960d6ed2025
BLAKE2b-256 5acf79fd0c820b633402db00f72b7063708c53308fb97e88c7f2bae2ed95c024

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wpybl-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 143057d98bdaedc7c82f0a3eff25f6894faa1b201e34b36c9d312e6908938de9
MD5 0f91a2dbf7534016ac3c1a181cc31f42
BLAKE2b-256 0babf1c5b2269db56cb2d762cb882c72d27659bb57c25344b28eeaaee817f1a5

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