Skip to main content

python-blizzardapi is a client library for Blizzard's APIs.

Project description

python-blizzardapi

Python package codecov GitHub PyPI PyPI - Python Version

python-blizzardapi is a client library for Blizzard's APIs.

Current supported features include:

  • Battle.net User
  • Wow Profile
  • Wow Game Data
  • Wow Classic Game Data
  • Diablo 3 Community
  • Diablo 3 Game Data
  • Hearthstone Game Data

To gain access to Blizzard's API please register here to obtain a client id and client secret.

For more information on Blizzard's API visit:

Official Documentation
Official API Forum

Requirements

Python (3.6, 3.7, 3.8, 3.9)

Installing

pip install python-blizzardapi

Example

main.py

from blizzardapi import BlizzardApi

api_client = BlizzardApi("client_id", "client_secret")

# Unprotected API endpoint
categories_index = api_client.wow.game_data.get_achievement_categories_index("us", "en_US")

# Protected API endpoint
summary = api_client.wow.profile.get_account_profile_summary("us", "en_US", "access_token")

# Wow Classic endpoint
connected_realms_index = api_client.wow.game_data.get_connected_realms_index("us", "en_US", is_classic=True)

Access token vs Client ID/Client Secret

You can pass in a client_id and client_secret and use almost any endpoint except for a few that require an access_token obtained via OAuth authorization code flow. You can find more information at https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow.

Here is the list of endpoints, specified by Blizzard, that require an OAuth token.

GET /oauth/userinfo
GET /profile/user/wow
GET /profile/user/wow/protected-character/{realm-id}-{character-id}
GET /profile/user/wow/collections
GET /profile/user/wow/collections/pets
GET /profile/user/wow/collections/mounts

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

python-blizzardapi-1.1.4.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

python_blizzardapi-1.1.4-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file python-blizzardapi-1.1.4.tar.gz.

File metadata

  • Download URL: python-blizzardapi-1.1.4.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for python-blizzardapi-1.1.4.tar.gz
Algorithm Hash digest
SHA256 99f941088d8d70b8491d4cb098e267acaedea2e1d47c8240477a0a627a60195c
MD5 cdede4fd0b3cec40c3a16f52f0a1f3c6
BLAKE2b-256 24d047e1ba04c328738b70d6e8f5dc7bb3d1c12dcb894c41dbaf084d779742fd

See more details on using hashes here.

File details

Details for the file python_blizzardapi-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: python_blizzardapi-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for python_blizzardapi-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 da6dbea4cbe153dafc37bd8ce159dbf82d93110cfb9e9b387804fce080f207db
MD5 8d79b3f5b1b1626ea242ea4fe7c1b465
BLAKE2b-256 c8666399074bec6089ee7bd7367412d665784f7037ac7966ec88484b708fa669

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