Skip to main content

Extract data from the World of Tanks PC API

Project description

pipeline status pipeline status MIT license PyPI - Downloads

World of Tanks - API (PC)

1. Description

This package will extract data from the Wargaming World of Tanks API.
Currently, this works only for the PC version with the rest of the platforms to be implemented in future iterations.

The package will require the following from the official World of Tanks Developer API page.

  • application id
  • account id
  • access token

All data extracted will be written to a local sqlite database ready to be accessed. The database is automatically created at the location where the script is executed.
The name of the database is world_of_tanks.db of type sqlite.

2. Install

pip install WotAPI

3. Usage

from worldoftanks import WotAPI

wot = WotAPI(application_id='############',
# Extract Account Data

# Extract Tankopedia Data

# Extract Player Vehicles Data

All data from the Tankopedia part of the API needs to be loaded only once in the database, otherwise this will be duplicated. For ease, the argument load_once is by default set to True.

The data can be accessed from the wot objects for further development. The response is a list of dictionaries.

achievements = wot.player_achivements(load_once=True)

'name': 'medalBobAmway921', 
'outdated': True, 
'section': 'action', 
'section_order': 6, 
'image_big': '', 
'hero_info': None, 
'name_i18n': None, 
'order': 1443, 
'type': 'single', 
'image': '', 
'condition': 'None', 
'description': None
} ... 

To not load data in the database add the load_to_db=False argument to the WotAPI class parameters. To give a specific location for the database to be created and populated set up the following arguments in the main class.

from worldoftanks import WotAPI

wot = WotAPI(application_id='####',

4. Left To Do

API Part Name Date Completed Version
Accounts Player Personal Data 2020-04-24 0.0.1
Accounts Player Vehicles 2020-04-24 0.0.1
Accounts Player Achievements 2020-04-24 0.0.1
Tankopedia Vehicles 2020-04-25 0.0.2
Tankopedia Achievements 2020-04-25 0.0.2
Tankopedia Tankopedia Information 2020-04-25 0.0.2
Tankopedia Maps 2020-04-25 0.0.2
Tankopedia Badges 2020-04-28 0.4.22
Tankopedia Vehicle characteristics
Tankopedia Engines Deprecated
Tankopedia Turrets Deprecated
Tankopedia Radios Deprecated
Tankopedia Suspensions Deprecated
Tankopedia Guns Deprecated
Tankopedia Equipment and Consumables
Tankopedia Personal Missions
Tankopedia Personal Reserves
Tankopedia Vehicle Configurations
Tankopedia Modules
Tankopedia Crew Qualifications
Tankopedia Crew Skills
Vehicles Vehicle statistics 2020-04-27 0.3.2
Vehicles Vehicle achievements 2020-04-27 0.3.2
Clans Clans
Clans Clan Details
Clans Clan Member Details
Clans Clan Glossary
Clans Message Board
Clans Player Clan History
Clan ratings Types of Ratings
Clan ratings Dates with available r.
Clan ratings Clan Ratings
Clan ratings Adj Positions In Clan R.
Clan ratings Top Clans
Global Map

5. Development


For development purposes, the unittests can be executed via:

python3 -m unittest discover -v worldoftanks/tests
Coverage Tests
coverage run --source=worldoftanks -m unittest discover -s worldoftanks/tests
coverage report -m

Project details

Download files

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

Files for wotapi, version 0.4.4
Filename, size File type Python version Upload date Hashes
Filename, size wotapi-0.4.4-py2.py3-none-any.whl (22.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size wotapi-0.4.4.tar.gz (14.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page