Metadata-Version: 2.4
Name: batru
Version: 0.1.0
Summary: Official Python client for batru.gg — real, calibrated Dota 2 win-rate predictions and pick recommendations from a production model.
Project-URL: Homepage, https://batru.gg
Project-URL: Repository, https://github.com/batrugg/batru
Author-email: Batru <noreply@batru.gg>
License: MIT
License-File: LICENSE
Keywords: api-client,batru,dota2,esports,sdk,win-prediction
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.10
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# batru

Official Python client for [batru.gg](https://batru.gg) — real, **calibrated**
Dota 2 win-rate predictions and pick recommendations, served by a production
model trained on ~20M real matches.

> **Early preview (alpha).** The surface is intentionally tiny and may change.
> This package is the home of the official batru.gg SDK; the
> [MCP server](https://github.com/batrugg/batru-mcp) for LLMs lives separately.

## Install

```sh
pip install batru
```

## Use

```python
import batru

# Calibrated win probability for a (partial) draft — hero shortNames:
batru.winrate(radiant=["antimage", "axe"], dire=["lina", "tinker"])
# {'radiant_win_rate': 52.31, 'dire_win_rate': 47.69}

# Best next picks for our (Radiant) team:
batru.recommend(radiant=["antimage"], dire=["lina", "tinker"])

# Hero roster, to map display names to the shortNames used above:
[h["shortName"] for h in batru.heroes()][:3]
```

Probabilities are **calibrated**: a reported 60% corresponds to an empirically
observed ~60% win rate on holdout data — see the
[methodology](https://batru.gg/dota2/methodology).

Read-only, no key required. Please keep request volume reasonable.

Analysis only, no betting.

## License

MIT © Batru (batru.gg)
