Skip to main content

Unofficial Python wrapper for the Brawl Stars API.

Project description

NovaBrawlStarsApi

A Python library to easily interact with the Brawl Stars API and fetch player information.

Features

  • Retrieve detailed player information
  • Supports multiple player tags
  • Easy Python integration
  • Secure API key management with .env

Installation

You can install NovaBrawlStarsApi via pip:

pip install NovaBrawlStarsApi

Or clone the repo and installation dependencies manually:

git clone https://github.com/NovaFenice/NovaBrawlStarsApi.git
cd NovaBrawlStarsApi

Usage

How to get players info

from novabrawlstars import NovaBrawlStars
import os
from dotenv import load_dotenv

load_dotenv()

api_bs = os.getenv("api_bs") # Your Brawl Stars API token
tag_p1 = os.getenv("tag_p1") # Brawl Stars Player tag (es. #12345678 or 12345678)
tag_p2 = os.getenv("tag_p2") # Brawl Stars Player tag (es. #12345678 or 12345678)

nb = NovaBrawlStars(api_bs) # Initialize the Brawl Stars API client

player_1 = nb.get_player(tag_p1) # Get a Player object from the API
player_2 = nb.get_player(tag_p2) # Get a Player object from the API

print(player_1)
print(player_2)

How to get battlelog info

from novabrawlstars import NovaBrawlStars
import os
from dotenv import load_dotenv

load_dotenv()

api_bs = os.getenv("api_bs") # Your Brawl Stars API token
tag_p1 = os.getenv("tag_p1") # Brawl Stars Player tag (es. #12345678 or 12345678)
tag_p2 = os.getenv("tag_p2") # Brawl Stars Player tag (es. #12345678 or 12345678)

nb = NovaBrawlStars(api_bs) # Initialize the Brawl Stars API client

player_1 = nb.get_battlelog(tag_p1) # Get a BattleLogListType object from the API
player_2 = nb.get_battlelog(tag_p2) # Get a BattleLogListType object from the API

print(player_1)
print(player_2)

Notes

  • Make sure to replace the player tags and API token.
  • Supports both numeric and #-prefixed tags.

Donate Me 💖

If you like this project and want to support its development, you can donate:

Every contribution helps me maintain and improve the library! Thank you for your support! 🙏

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

novabrawlstars-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

novabrawlstars-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: novabrawlstars-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for novabrawlstars-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d95600d96a508ce29ef7985a495f0f446d186fe9d7eee22c4a24391dbdc75c52
MD5 3da21d568cf54a4a2bf60d69321e3697
BLAKE2b-256 532e246623a6b0d99497636c52998be55ebd4e28bf2b5b1975ef2a9229944d1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: novabrawlstars-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for novabrawlstars-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84edd04c921fa94e7acb7bac463586eae88bc13144b0c8776781404ea67953d4
MD5 03bb3f3bd5b90c1d08581cd98f6553d3
BLAKE2b-256 9d6837470769eb6904346d119350d6629205311c11a6889c4b483e16821d18a2

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