brlib
A library for collecting baseball statistics from Baseball Reference.
Key Features
Game,Player, andTeamclasses give you easy access to all associated data in one place, with attributes for stat tables and other information.- Aggregate these into
GameSet,PlayerSet, orTeamSetclasses, which have similar attributes, for easy analysis of larger samples. - Search for games, players, and teams, and gather their stats.
- 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.
Metadata
Release files for brlib 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brlib-1.1.0.tar.gz | 340.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brlib-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 422.1 kB
Release files / brlib-1.1.0.tar.gz
| Download URL | brlib-1.1.0.tar.gz |
|---|---|
| Size | 340.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3cecb9c8778517d402444b564b37ff152a8d59e99c110ac9b3bbbb33ce7e33d
|
|
BLAKE2b-256 checksum How to use checksums |
d38a0af9952b6a18dca5aa7e2b8b17ab7dad7e16dd8c12edc773d2845747cdad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / brlib-1.1.0-py3-none-any.whl
| Download URL | brlib-1.1.0-py3-none-any.whl |
|---|---|
| Size | 81.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23347777316d9dbbc4ddf5a7982f5a67644619d9f5dce9e797d18eeb94151b4b
|
|
BLAKE2b-256 checksum How to use checksums |
dd1d72f3c9055ec0ec227e1783efeba0c86f244ced4800f8601b92d3a80183de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency log