Skip to main content

wpybl

A (work-in-progress) 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.)

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.1.tar.gz (9.3 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.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wpybl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fcfa1036b6153e3bf5dfcaf171153e24d17849f28c7c5f61d28551dfab41e261
MD5 dacf675f36cf97a6b5d92c0a58f153ab
BLAKE2b-256 2a7eb6ee4743c391c19010b8c0083fbb70ea43c50f8079ef6300fbcfed175e05

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wpybl-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14dc280d8c7b2de8b6a20d281dd8832fc7a2d6f1e10aca55718524eebf72470f
MD5 9d984f1a9d7cc59ec7fbd1dcc5b4a53f
BLAKE2b-256 81669e5b0e04e4b930f797e46a1f0854d539bb266d80b986106071a2f99962d6

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 Pingdom Monitoring Sentry Error logging StatusPage Status page