Skip to main content

A library for collecting baseball statistics from Baseball Reference

Project description

brlib

Tests PyPI Latest Release

A library for collecting baseball statistics from Baseball Reference.

[!IMPORTANT] brlib is in beta, breaking changes are possible until the release of version 1.

Key Features

  • Game, Player, and Team classes give you easy access to all associated data in one place, with attributes for stats tables, information, and more.
  • Aggregate these into GameSet, PlayerSet, or TeamSet classes, which have similar attributes, for easy analysis of larger samples.
  • Quickly search for games, players, and teams of interest, and gather their stats without violating the rate limit.

Learn more by reading the documentation on the wiki.

Install

brlib can be installed using pip:

pip install brlib

or from this repo, in which case you'll want to install the development dependencies as well:

git clone https://github.com/john-bieren/brlib.git
cd brlib
pip install -e .[dev]

Once installed, you can import brlib into your Python scripts:

import brlib as br

Data Use

Since brlib gathers data from Baseball Reference, your use of this data is subject to their data use policy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brlib-0.2.0.tar.gz (261.4 kB view details)

Uploaded Source

Built Distribution

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

brlib-0.2.0-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brlib-0.2.0.tar.gz
  • Upload date:
  • Size: 261.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brlib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 928742904a1bdd3a09bf19f21a33f352cd99d15bf09b84528a98348f75d8dc46
MD5 180d0072be8ba37ea872455783f09e75
BLAKE2b-256 e406f41d925f5301c751ad8604779aa46e27a7858cbfbe212d0945079beaf8bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for brlib-0.2.0.tar.gz:

Publisher: publish.yml on john-bieren/brlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: brlib-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 73.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brlib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd509cd304c0ddde7678b2e67b5018483069dc2ab4add6c03037cdfc5b0a06dd
MD5 5c09b36c607ad41cad4cb26c78ee8879
BLAKE2b-256 c565b39288e66914a7230a245283b3b5d8a1a790f655bd93c84d528f613d4d0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for brlib-0.2.0-py3-none-any.whl:

Publisher: publish.yml on john-bieren/brlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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