A basic API wrapper for Brawl Stars.
Project description
Requirements
This module requires the following modules:
Installation
Python 3.8 or higher is required.
To install the stable version, do the following:
# Unix / macOS
python3 -m pip install "brawlstars.py"
# Windows
py -m pip install "brawlstars.py"
To install the development version, do the following:
$ git clone https://github.com/Infiniticity/brawlstars.py
Quick Example
import brawlstars as bs
client = bs.Client("token")
player = client.get_player("#9PPUP2CJ")
print(player.trophies)
print(player.team_victories)
club = client.get_club(player.club.tag)
if club is not None:
members = client.get_club_members(club.tag)
best_player = max(members, key = lambda member: member.trophies)
print(best_player.name, f"- best_player.trophies 🏆")
player_rankings = client.get_player_rankings("global", limit = 5)
for player in player_ranking:
print(f"{player.rank}. {player.name}")
brawler_rankings = client.get_brawler_rankings(region = "us", limit = 10, brawler = "edgar")
for player in brawler_rankings:
print(f"{player.rank}. {player.name}")
battles = client.get_battle_logs("UL0GCC8")
print(battles[0].battle.mode)
More examples can be viewed in the examples folder.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brawlstars.py-1.0.0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for brawlstars.py-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba2d25f883d4a9fa4d004b2e6366dd96538e018d7dab3618bd6b49030350c699 |
|
MD5 | 631ab4fe0cedaafb7991bd88dfa9ff38 |
|
BLAKE2b-256 | fa2c21cd166ce32101b39297366eee0e1e2588d5045ebc00b7b50998e474db51 |