Skip to main content

A library for collecting baseball statistics from Baseball Reference

Project description

brlib

Tests PyPI Latest Release Python Versions Code style: black Imports: isort

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.3.0.tar.gz (278.5 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.3.0-py3-none-any.whl (77.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for brlib-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6d31eeb3f1176da5e3084b29066b9c86ea2a95b25d5841d14ff96041927d561b
MD5 ae765405193001913c2c1f6bc89142ad
BLAKE2b-256 7e504d43277b1031217685731f80a5fadc12be21740aee620bf61767c99ef8f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for brlib-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: brlib-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 77.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9795e1a7fb1448efef623059aacf377ea9968a9a74ae4ba74fc46e567ef3f7df
MD5 93b0ad940be91253377627547b4d6dcc
BLAKE2b-256 31d2be692b64fc8572ad22c1d19251488e36a59015da35db327cdbf1eed5c80f

See more details on using hashes here.

Provenance

The following attestation bundles were made for brlib-0.3.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