brawlapi
import matplotlib.image as img
import matplotlib.pyplot as plt
import brawlapi as api
with api.DataBase('<path-to-db>') as db:
jm = api.Player("jm", db)
print(jm)
# Each day is stored in the database with a unique key
# The key consists in the first 8 chars of the ISO-formated date string (yyyymmdd)
print(f"{len(jm.keys)} days: {jm.keys}")
# Get all the games of the day 0
print(jm[0])
# or
print(jm.get_battles(jm.keys[0]))
# Or with a generator
for matchs in jm.battles:
print(matchs)
break
# Infos on all battles for a player
for m in jm.battles:
for g in m:
print(f"{g.battle.mode} : {g.start} + {g.duration} = {g.end}")
print("BRAWLERS")
brawlers = db.brawlers
print(brawlers)
nita = db.get_brawler(brawlers[1])
print(nita.keys)
# print(nita.invocs)
print(nita.stats)
nita.dwnl_image("test.png")
im = img.imread("test.png")
plt.imshow(im)
plt.show()
Metadata
Release files for brawlapi 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brawlapi-0.1.13.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brawlapi-0.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / brawlapi-0.1.13.tar.gz
| Download URL | brawlapi-0.1.13.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4a72a7f955a781d55c2911531b284440ac09c8b3fc017bfaae3c235caaf8394
|
|
BLAKE2b-256 checksum How to use checksums |
b7a73d4cf2ddad3e101063c5eb020331dcc1f926604594b53b8a6a4f2f2083de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Release files / brawlapi-0.1.13-py3-none-any.whl
| Download URL | brawlapi-0.1.13-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a89ce401e4efc39f6cc819a219a02528cd2e30c275ed19166adf81c1191e886c
|
|
BLAKE2b-256 checksum How to use checksums |
502ccad2081a8f326cf21c9d7b5d0e097838a8e2ae6fc2c04594e628cbb946d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|