Package provides easy access to Blizzard Game APIs
Project description
Battlenet Client
Introduction
While this package can be used as a standalone, it works better when coupled with one of the API packages:
- Diablo III Battlenet API
- Hearthstone Battlenet API
- Overwatch League Battlenet API
- Starcraft II Battlenet API
- World of Warcraft Battlenet API
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file battlenet_client-5.0.5.tar.gz.
File metadata
- Download URL: battlenet_client-5.0.5.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
978cc46e0cc9608a0e06b05a0c5a59a6fa531da169c44973cee97ad826972508
|
|
| MD5 |
08b5e687922c86a3941028bb81c92f9c
|
|
| BLAKE2b-256 |
f7a3172b56823bfa56a3dd8197072b63ab8129820fa4c5aca088496c2af767b5
|
File details
Details for the file battlenet_client-5.0.5-py3-none-any.whl.
File metadata
- Download URL: battlenet_client-5.0.5-py3-none-any.whl
- Upload date:
- Size: 48.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cb1b1f7e27158772217dcd4b03ba78435358a21d4fdaf4bc3ff5b7b53a45b12
|
|
| MD5 |
31b2ae57f6d25b4716683abfef79c7fb
|
|
| BLAKE2b-256 |
3d49a56ea9b58cb38ee3a05fbd095783502dff889252d8facefc9469259cd17e
|