Skip to main content

An easy to use API Wrapper for the Brawl Stars API

Project description

Brawl Stars Wrapper (BSWrapper) - v0.2.2

What is BSWrapper?

BSWrapper is a user friendly API wraper for the Brawl Stars API. It aims to make pulling all information found in the API as easy as possibly without needing to use a 3rd party API.

Requirements

  • Python 3.12 or higher

How do I install it?

To install BSWrapper, simply run:

pip install bswrapper

or in your requirements.txt, enter it as:

bswrapper>=0.2.2

How to use BSWrapper

Example 1: Player Data:

from bswrapper import BSClient

bs = BSClient("API_TOKEN")

player = bs.get_player("#TAG")

print(player.name)
print(player.tag)
print(player.trophies) # current trophies
print(player.club.name) # if they are in a club, if not it just shows 'None'
print(player.club.tag) # if they are in a club, if not it just shows 'None'
print(player.highest) # highest trophies
print(player.explevel)
print(player.solo) # amount of solo victories

# NOTE: this is all of properties so far in the wrapper

Example 2: Club Data:

from bswrapper import BSClient

bs = BSClient("API_TOKEN")

club = bs.get_club("#TAG")

print(club.name)
print(club.tag)
print(club.trophies) # total trophies
print(club.required) # required trophies
print(club.type) # this will print either: open, inviteOnly, closed, unknown
print(club.description) # the club description/bio seen in the game

# NOTE: this is all of properties so far in the wrapper

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

bswrapper-0.2.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

bswrapper-0.2.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file bswrapper-0.2.2.tar.gz.

File metadata

  • Download URL: bswrapper-0.2.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bswrapper-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5c693b16fa44ff389c0a0aff98b2ad466c978ea6ebea8af25fa4b5ac7211d285
MD5 a1ffc5bdd086df00f95426a6de5ad2f7
BLAKE2b-256 412694b15df1d05567267a79ed3ef91bb35e88cc1aa9e605d3020e235729ccf4

See more details on using hashes here.

File details

Details for the file bswrapper-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: bswrapper-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bswrapper-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7130aea5a2a96cfc7ce4e9b2179b11639d480010954bb4340ccfe3f4ca73efb5
MD5 d3fb9959b9c79cc2eac2a56fa6c078d6
BLAKE2b-256 1b6b1024eb60e0c33074cadf744dc0434b9b13cec6ecc5c0aaa5fd15fbf88a66

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 Pingdom Monitoring Sentry Error logging StatusPage Status page