Skip to content

Installation

retrosheetpy is available on PyPI and requires Python 3.11 or higher. It is packaged with pre-compiled wheels for Windows, macOS, and Linux, meaning no C compiler or build tools are required.


Basic Installation

Install the base package with pip or uv:

uv add retrosheetpy
pip install retrosheetpy

Optional Backend Extras

retrosheetpy is designed to be lean by default. You can install optional dependencies depending on your workflow:

Extra Command Included Functionality
polars pip install "retrosheetpy[polars]" Native conversion to Polars DataFrames (backend="polars").
pandas pip install "retrosheetpy[pandas]" Native conversion to pandas DataFrames (backend="pandas").
dlt pip install "retrosheetpy[dlt]" Data Load Tool integration for streaming into Postgres, Snowflake, BigQuery, etc.
all pip install "retrosheetpy[all]" Installs all optional backends and connectors.
# Install with Polars and dlt
uv add "retrosheetpy[polars,dlt]"

# Or install everything
uv add "retrosheetpy[all]"
pip install "retrosheetpy[all]"

Verification

After installation, verify that the CLI and Python package are functional:

retrosheetpy --version

Or from Python:

import retrosheetpy as rs

print(rs.__version__)