Skip to main content

An easy to use API Wrapper for the Brawl Stars API

Project description

Brawl Stars Wrapper (BSWrapper) - v0.2.1

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.1

How to use BSWrapper

Example 1: Player Data:

from bswrapper import BSClient

bs = BSClient("API_TOKEN")

player = bs.getplayer("#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.getclub("#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.1.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.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bswrapper-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0661d3b6d7ca0a3a5435daaf87cff2d28292f863ece4386d45c291841e9695f8
MD5 07d6d8c2a39a68b28fb134af3330582f
BLAKE2b-256 2775ee6559b2e5d45a94d42526d53b400b58bb7ec2bf7155cb77a7b1f06e2654

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bswrapper-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27c86f91c3b78c393f44b785d04ab1d747de49100c07a50aaf86be6d1980b1b2
MD5 333cee33bc76512483f5d478ea66acc6
BLAKE2b-256 0f6ace7f740b76a28de322f455089c963375fc68412e5867c8c5b010ce6b6710

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