Skip to main content

Description

Project description

brawlapi

See the Exemples

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()

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

brawlapi-0.1.13.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

brawlapi-0.1.13-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file brawlapi-0.1.13.tar.gz.

File metadata

  • Download URL: brawlapi-0.1.13.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for brawlapi-0.1.13.tar.gz
Algorithm Hash digest
SHA256 a4a72a7f955a781d55c2911531b284440ac09c8b3fc017bfaae3c235caaf8394
MD5 b9ff14a6436e04eba4c6371d103128bf
BLAKE2b-256 b7a73d4cf2ddad3e101063c5eb020331dcc1f926604594b53b8a6a4f2f2083de

See more details on using hashes here.

File details

Details for the file brawlapi-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: brawlapi-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for brawlapi-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 a89ce401e4efc39f6cc819a219a02528cd2e30c275ed19166adf81c1191e886c
MD5 916a157a730b99bc5eec2a17004ea178
BLAKE2b-256 502ccad2081a8f326cf21c9d7b5d0e097838a8e2ae6fc2c04594e628cbb946d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page