batru
Official Python client for batru.gg — real, calibrated win-rate predictions and pick recommendations across three games (Dota 2, Deadlock, Marvel Rivals), served by production models trained on 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 for LLMs lives separately.
Install
pip install batru
Use
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]
Deadlock & Marvel Rivals
Deadlock and Marvel Rivals use full 6v6 drafts keyed by integer hero ids
(map names to ids with the *_heroes() rosters):
import batru
# Rosters: [{"id": int, "name": str}, ...]
batru.deadlock_heroes()
batru.marvel_heroes()
# Meta content (dicts, returned as-is):
batru.deadlock_tier_list() # or marvel_tier_list()
batru.deadlock_counters() # worst matchups per hero
batru.deadlock_synergy() # best teammates per hero
# Calibrated comp-only draft win probability (6 ids per team) — this models
# the hero composition, not player skill:
batru.deadlock_predict_draft([1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12])
# {'win_prob_team0': 0.53}
batru.marvel_predict_draft([1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12])
Probabilities are calibrated: a reported 60% corresponds to an empirically observed ~60% win rate on holdout data — see the methodology.
Read-only, no key required. Please keep request volume reasonable.
Analysis only, no betting.
License
MIT © Batru (batru.gg)
Metadata
Release files for batru 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| batru-0.2.1.tar.gz | 6.0 kB | Without provenance | Details for batru-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| batru-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for batru-0.2.1-py3-none-any.whl |
Total release size: 13.0 kB
Release files / batru-0.2.1.tar.gz
| Download URL | batru-0.2.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17f80f917a2f8fa5ff1fa935d3bffdca9786db96fa981bf926bf442ec5347ef9
|
|
BLAKE2b-256 checksum How to use checksums |
98bc8b67e46f144cf23f7344df9c14e72efa88bfec2870e6be0450727307e582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / batru-0.2.1-py3-none-any.whl
| Download URL | batru-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fdcc073d6ab8643590518f6d1b7a671039494aa833078ccd00a2a77382a32d5
|
|
BLAKE2b-256 checksum How to use checksums |
eca5e8f0900d8f8157c0e73ba917ecfd671e04db066523fe7c8a09b0f863825f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for batru 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.