Metadata-Version: 2.4
Name: brlib
Version: 0.2.0
Summary: A library for collecting baseball statistics from Baseball Reference
Project-URL: Homepage, https://github.com/john-bieren/brlib
Project-URL: Documentation, https://github.com/john-bieren/brlib/wiki
Project-URL: Repository, https://github.com/john-bieren/brlib.git
Project-URL: Issues, https://github.com/john-bieren/brlib/issues
Author-email: John Bieren <jbieren64@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: baseball,baseball reference,baseball stats,mlb
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: beautifulsoup4<5.0.0,>=4.14.0
Requires-Dist: curl-cffi<1.0.0,>=0.13.0
Requires-Dist: lxml<7.0.0,>=6.0.2
Requires-Dist: pandas<3.0.0,>=2.3.0
Requires-Dist: platformdirs<5.0.0,>=4.5.0
Requires-Dist: tqdm<5.0.0,>=4.67.1
Provides-Extra: dev
Requires-Dist: pytest>=9.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# brlib

[![Tests](https://github.com/john-bieren/brlib/actions/workflows/test.yml/badge.svg)](https://github.com/john-bieren/brlib/actions/workflows/test.yml)
[![PyPI Latest Release](https://img.shields.io/pypi/v/brlib?label=PyPI&logo=pypi&logoColor=ffe873&color=0073b7)](https://pypi.org/project/brlib)

A library for collecting baseball statistics from [Baseball Reference](https://www.baseball-reference.com).

> [!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](https://www.sports-reference.com/429.html).

Learn more by reading the documentation on the [wiki](https://github.com/john-bieren/brlib/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:

```python
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](https://www.sports-reference.com/data_use.html).
