Skip to main content

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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batru-0.2.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

batru-0.2.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file batru-0.2.1.tar.gz.

File metadata

  • Download URL: batru-0.2.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for batru-0.2.1.tar.gz
Algorithm Hash digest
SHA256 17f80f917a2f8fa5ff1fa935d3bffdca9786db96fa981bf926bf442ec5347ef9
MD5 c2c2ed064d9d8584b29e01273608a493
BLAKE2b-256 98bc8b67e46f144cf23f7344df9c14e72efa88bfec2870e6be0450727307e582

See more details on using hashes here.

File details

Details for the file batru-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: batru-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for batru-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fdcc073d6ab8643590518f6d1b7a671039494aa833078ccd00a2a77382a32d5
MD5 f87e8955f0293f3e99ef6ebea68eacfa
BLAKE2b-256 eca5e8f0900d8f8157c0e73ba917ecfd671e04db066523fe7c8a09b0f863825f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page