Skip to main content

An easy to use API Wrapper for the Brawl Stars API

Project description

Brawl Stars Wrapper (BSWrapper) - v0.1.0

FYI: I can write README's for shit so if you can do better, make a PR or Issue on Github.

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

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.0.tar.gz (4.3 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.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bswrapper-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 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.0.tar.gz
Algorithm Hash digest
SHA256 633167d5b61fba9a502d27da02889e49f8c55da16320dac9390bc74b68373b6b
MD5 73e6227b41114d31ba814e6f615fe479
BLAKE2b-256 6b6a6ab5b6fa9cd7a4095e35a116817da815e77ac4b973651bfceea5b1791068

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bswrapper-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76d776b37cdbed600dd5a8dc1ea73773e7e2e1505a1f2a875483c11f6e181c18
MD5 222c084ab79ff67dea91edc70a6ac2a3
BLAKE2b-256 05dfd03507c372efdeecea488600865e4130123aa39e1d4652286ea6863bf2d8

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