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.3.tar.gz (25.3 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.3-py3-none-any.whl (48.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: battlenet_client-5.0.3.tar.gz
  • Upload date:
  • Size: 25.3 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.3.tar.gz
Algorithm Hash digest
SHA256 64ca97491fdc5d4e3b39af2dc360166b1acc3dd33bb59ee19a9ff8051a77cf04
MD5 112ea7ee2bfa3b0af7dd33a41415d110
BLAKE2b-256 1bef632e117a29ac3572fddc79b941cc3f532f13c1a22b6d348993d55b3f5e9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for battlenet_client-5.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c73b6ef651f27edc0055afafe570c829fb41a6fbc79d83571d437620528e6ac0
MD5 edfa0c00f7e319346acaf4900b56f85c
BLAKE2b-256 92216b22b51dab72e4a220cc3ce4f5b2b9c1b0e8ff5bf0089756371abeec7404

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