Skip to main content

An easy to use API Wrapper for the Brawl Stars API

Project description

Brawl Stars Wrapper (BSWrapper) - v0.1.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.1.2

How to use BSWrapper

Example 1: Player Data:

from bswrapper import BSWrapper

bs = BSWrapper("API_TOKEN")

player = bs.getplayer("#TAG")

print(player.name)
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 BSWrapper

bs = BSWrapper("API_TOKEN")

club = bs.getclub("#TAG")

print(club.name)
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.1.2.tar.gz (4.4 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.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bswrapper-0.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bswrapper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 17f980dc16c4c4b13e4e1b719741241bea370ec0247e75a09084c21779390150
MD5 e44cb06e3368cf0ac597030fd35c4216
BLAKE2b-256 fe4dbf9d8a24e50f7f5aaf023f7fe7be560e1971537e6e5926023fd6a5271178

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bswrapper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bswrapper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 267b49028034ecda07075b89dc2043fc3cfcee1e82bd272bf085f0832c14c032
MD5 2d69ac451e7e38b41d740d845c1bd9e0
BLAKE2b-256 bc92be141a006f86b850e3f4c8e1deffcb14188fc9ede2d053a4a9434f3ab2f8

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