Metadata-Version: 2.4
Name: brlib
Version: 0.0.1
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/tree/master/docs
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)
[![PyPI Latest Release](https://img.shields.io/pypi/v/brlib.svg)](https://pypi.org/project/brlib)

A Python 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 `Games`, `Players`, or `Teams` classes, which contain 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/bot-traffic.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
```
