Metadata-Version: 2.4
Name: theoddsapi-client
Version: 1.0.0
Summary: Official Python client for TheOddsAPI: real-time sports odds from 50+ sportsbooks across 26 sports, plus player props, Pinnacle-anchored edges, fair odds, and historical snapshots.
Project-URL: Homepage, https://theoddsapi.com
Project-URL: Documentation, https://theoddsapi.com/docs/
Project-URL: Changelog, https://theoddsapi.com/changelog
License: MIT
Keywords: api,arbitrage,betting,odds,props,sports,sportsbook
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# theoddsapi

Official Python client for [TheOddsAPI](https://theoddsapi.com): real-time sports odds from 50+ sportsbooks across 26 sports, normalized into one JSON shape, plus player props, Pinnacle-anchored edge detection, fair odds, and historical snapshots.

Zero dependencies. Python 3.8+.

## Install

```
pip install theoddsapi
```

## Quick start

```python
from theoddsapi import TheOddsAPI

client = TheOddsAPI("YOUR_API_KEY")

for sport in client.sports()["data"]:
    print(sport)

odds = client.odds("baseball_mlb", oddsFormat="decimal")
```

Get a free key in minutes at [theoddsapi.com/start](https://theoddsapi.com/start). No credit card.

## Endpoints

Every endpoint is one method. Core data: `sports()`, `odds()`, `events()`, `best_lines()`. Business plan: `props()`, `edges()`, `fair_odds()`, `consensus()`, `arbitrage()`, `value_bets()`, `historical_odds()`, `historical_settlements()`. Account: `me()`.

```python
edges = client.edges("basketball_nba", min_edge=50)
history = client.historical_odds("baseball_mlb", bookmakers="pinnacle", limit=500)
```

## Errors

Non-2xx responses raise `TheOddsAPIError` with `.status` and `.detail`. Transient 5xx responses are retried with exponential backoff automatically.

```python
from theoddsapi import TheOddsAPI, TheOddsAPIError

try:
    client.props("baseball_mlb")
except TheOddsAPIError as e:
    if e.status == 403:
        print("Props require the Business plan:", e.detail)
```

## Links

Full reference: [theoddsapi.com/docs](https://theoddsapi.com/docs/) · Guides: [theoddsapi.com/guides](https://theoddsapi.com/guides/) · Free calculators: [theoddsapi.com/tools](https://theoddsapi.com/tools/)
