Metadata-Version: 2.4
Name: brlib
Version: 0.4.0
Summary: A library for collecting baseball statistics from Baseball Reference
Project-URL: Documentation, https://github.com/john-bieren/brlib/wiki
Project-URL: GitHub, https://github.com/john-bieren/brlib
Project-URL: Issues, https://github.com/john-bieren/brlib/issues
Project-URL: Release Notes, https://github.com/john-bieren/brlib/releases
Author-email: John Bieren <jbieren64@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: baseball,baseball reference,baseball stats,mlb,mlb stats
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4<4.15.0,>=4.12.0
Requires-Dist: curl-cffi<0.15.0,>=0.11.1
Requires-Dist: lxml<7.0.0,>=5.0.0
Requires-Dist: pandas<3.0.0,>=2.2.0
Requires-Dist: platformdirs<5.0.0,>=4.0.0
Requires-Dist: tqdm<5.0.0,>=4.66.0
Provides-Extra: dev
Requires-Dist: black==26.3.0; extra == 'dev'
Requires-Dist: isort==8.0.1; extra == 'dev'
Requires-Dist: pytest<10.0.0,>=7.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)
[![Python Versions](https://img.shields.io/pypi/pyversions/brlib?label=Python%20Versions)](https://pypi.org/project/brlib)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

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 by cloning this repo, in which case you'll want to install the development dependencies as well:

```
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).
