Skip to main content

Official Python SDK for the MLBB Public Data API

Project description

OpenMLBB Python SDK

OpenMLBB is the official Python SDK for https://mlbb.rone.dev/api.

  • API base: https://mlbb.rone.dev/api
  • Docs: https://mlbb.rone.dev/openmlbb
  • Groups: academy, mlbb, user, addon

Install

pip install OpenMLBB

Quick Start

from OpenMLBB import OpenMLBB

client = OpenMLBB()

heroes = client.mlbb.heroes(size=5, index=1, order="desc", lang="en")
academy_roles = client.academy.roles(lang="en")
win_rate = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)

print(heroes)
print(academy_roles)
print(win_rate)

Every SDK method returns API JSON as a Python dictionary.

Endpoint Coverage

OpenMLBB follows the same route coverage as API routers:

  • academy: version, heroes, roles, equipment, spells, emblems, ranks, recommendations, ratings
  • mlbb: heroes list, rank, positions, details, stats, combos, trends, relations, counters, compatibility
  • user: auth, profile, stats, privacy, season, matches, hero matches, friends
  • addon: win-rate calculator, IP lookup

See the interactive SDK docs at https://mlbb.rone.dev/openmlbb for endpoint-by-endpoint usage examples.

Common Examples

from OpenMLBB import OpenMLBB

client = OpenMLBB()

# academy
academy_version = client.academy.meta_version(size=20, index=1, order="desc", lang="en")

# mlbb
hero_list = client.mlbb.heroes(size=10, index=1, order="desc", lang="en")

# addon
wr_calc = client.addon.win_rate_calculator(match_now=100, wr_now=50, wr_future=60)

print(academy_version)
print(hero_list)
print(wr_calc)

User-Agent

The default User-Agent is:

RoneAI-OpenMLBB-Python-SDK

You can override it by passing user_agent= to OpenMLBB(...).

TypeScript Alternative

If your project is using TypeScript or JavaScript, an alternative SDK is available on npm:

npm install mlbb-sdk

Package page: https://www.npmjs.com/package/mlbb-sdk

Project details


Download files

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

Source Distribution

openmlbb-4.0.9.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

openmlbb-4.0.9-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file openmlbb-4.0.9.tar.gz.

File metadata

  • Download URL: openmlbb-4.0.9.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmlbb-4.0.9.tar.gz
Algorithm Hash digest
SHA256 daf0d6ef401821865e2075b8c0c3d9c14ef67945aba29f90b482c5a404989417
MD5 94b57f75422d7c6e9e8e97829ab7798b
BLAKE2b-256 5ff3941abb70b6b462e1985a4a3f208abac52cb99a8b387241b309fb2647db5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmlbb-4.0.9.tar.gz:

Publisher: python-publish.yml on ridwaanhall/api-mobilelegends

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openmlbb-4.0.9-py3-none-any.whl.

File metadata

  • Download URL: openmlbb-4.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openmlbb-4.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a04df8acea9726494cd9558e1e1151c2c061c58f0f05ae7a63deeddbfe498961
MD5 7aeba59b8c50f0f53620bd417594b259
BLAKE2b-256 7e0dc84f764958393c69e4f6d943db9b70a1bcc69e29091d190cee8db1807505

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmlbb-4.0.9-py3-none-any.whl:

Publisher: python-publish.yml on ridwaanhall/api-mobilelegends

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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