Skip to main content

Package provides easy access to Blizzard Game APIs

Project description

Battlenet Client

Pipeline Status Release coverage

Introduction

While this package can be used as a standalone, it works better when coupled with one of the API packages:

Installation

Base Install

pip install battlenet-client

Optional Installs

  • Developement Install: pip install battlenet-client[dev]
  • Full Client Install: pip install battlenet-client[client]
  • MongoDB Backend: pip install battlenet-client[mongo]
  • PostgreSQL Backend: pip install battlenet-client[postgresql]
  • MySQL or MariaDB Backend: pip install battlenet-client[mysql]

Usage:

To use the client crediential workflow

from battlenet_client.client import BattlenetClient
client = BattlenetClient.client_credentials(<region abbreviation>, <client id>, <client secret>)

To use the authorization workflow and Open ID Connect, you will need a webserver that will handle the callback

from battlenet_client.client import BattlenetClient
client = BattlenetClient.authorization_code(<region abbreviation>, <client id>, <client secret>, <redirect uri>
                                            <scope>)
redirect(client.get_authorization_url()

User logs into Battl.net with user name and password. After successful login, the user is redirected to "<redirect_uri>" As part of the example code uses a Flask app to perform the role of the web server.

@app.route(<redirect uri>)
def callback():
    client.callback(request.args.get("code"), request.args.get("state"))
    ...

The webserver then processes and save the new token for the user

See the instructions for the specific module for further details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

battlenet_client-5.0.2.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

battlenet_client-5.0.2-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

Details for the file battlenet_client-5.0.2.tar.gz.

File metadata

  • Download URL: battlenet_client-5.0.2.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for battlenet_client-5.0.2.tar.gz
Algorithm Hash digest
SHA256 459011fea431bf592cc6afd19a57b4b8bfe5bff75ce3481f1c23c8da826059bb
MD5 8946557c44a4757fbc6370da3ed2f3f9
BLAKE2b-256 7e60039ae2af670773b1d9868313fe9d86610baa6b5dcd8ccc9d2b4844b680d5

See more details on using hashes here.

File details

Details for the file battlenet_client-5.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for battlenet_client-5.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b409c06f3eaf3c70a7097344481be20f3435e3184ca2c1a2091c9f805a261226
MD5 74e77679b1725b2f98cebafa39611b74
BLAKE2b-256 25a56a049049578dfa6fcc09d15fb414da570095ad77b99e4e6d8f3f8bf461da

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