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 stat tables and other information.
  • Aggregate these into GameSet, PlayerSet, or TeamSet classes, which have similar attributes, for easy analysis of larger samples.
  • Easily search for games, players, and teams, and gather their stats.
  • Quickly collect data 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 by cloning this repo:

pip install -e .

If you've cloned the repo, you can also install the development dependencies:

pip install --group 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.6.0.tar.gz (393.6 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.6.0-py3-none-any.whl (80.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for brlib-0.6.0.tar.gz
Algorithm Hash digest
SHA256 09e560b58d11ef7bf004644680d0df65513811fe0c3c2514895cd70556b4d0f8
MD5 331b975da372caeb47f0c39ef9bbafd3
BLAKE2b-256 f37a89da469d789611443b2cf71e4f1335b58cd2e74ff254e38064693f518eb3

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for brlib-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a10650a5b5d28cdb3ad74e7213fb4f7ab1133079b5bada1adc4ef47b52b425
MD5 247cb54d16aecde2c464a6a3e3be75a9
BLAKE2b-256 b2e9d710321e98d41d338ea80ebe0e3cb164c9447eb1e1bff9c1714ed8ac8cae

See more details on using hashes here.

Provenance

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