Skip to main content

Downloads MIT license codecov

World of Tanks - Replay data extract

1. Description

The package can extract only the metrics data from World of Tanks replays. It does not access any data such as tank positions or chat.

Data can be extracted only from replays in which the player has waited until the end of the battle. If the player has quit the battle after dying and the battle was not ended, then only the battle metadata is available (which does not contain any battle performance / credits / xp data).

The replays should be set to be "all" collected and not "last" one recorded.

All data extracted can be saved to a local sqlite database.

2. Usage

pip install wotreplay

The package provides the possibility of exploring the data contained within one replay or process all replays in a directory and store the data in a local database.

from wotreplay import ReplayData
replay = ReplayData(file_path='path_to_replay/replay_file.wotreplay',
                     db_path='', db_name='', load=False)

print(replay.battle_metadata)
print(replay.battle_performance)
print(replay.common)
print(replay.battle_frags)
print(replay.battle_economy)
print(replay.battle_xp)

Process all the replay files and store the results in the database

from wotreplay import ProcessReplays

ProcessReplays.process_all(replay_dir='/path/to/replay/dir', 
                           db_path='path/where/to/save/the/database', 
                           db_name='wotreplay')

This will process the replays sequentially.

Note: Once a replay has been processed and added to the database, it will not be processed again to avoid data duplication.

3. Compatibility

The replays from the following client versions have been tested.

Client Version Passed
0.9.21 True
0.9.22 True
1.0.0 True
1.0.1 True
1.0.2 True
1.1.0 True
1.2.0 True
1.3.0 True
1.4.0 True
1.4.1 True
1.5.0 True
1.5.1 True
1.6.1 True
1.7.0 True
1.7.1 True
1.8.0 True
1.9.0 True

No replays before 0.9.21 have been tested due to lack of replays available.

4. Data Taxonomy

Examples of data retrieved:

5.Access and rights

If you are using this on any online tools please give the appropriate credit.

6.To Do

The extraction of data from replays is more or less complete. There are a few features to be created in the future to create the aliases of tank names and maps.

7. Development

5. Development

To further develop this package please follow the instructions below

# Install the virtual environments and packages
python3 -m virtualenv .venv
source .venv/bin/activate
pip3 install -r requirements.txt

# Run test suite
# Tests contain unittests, coverage and linting
tox

Metadata

Release files for wotreplay 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wotreplay 1.0.2
File Size Uploaded
wotreplay-1.0.2.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wotreplay 1.0.2
File Interpreter ABI Platform
wotreplay-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 33.5 kB

Release files / wotreplay-1.0.2.tar.gz

Download URL wotreplay-1.0.2.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ec7570221cdea4d666d92a82cbe28497f2e07d9bdf04d6321d47620d5812c90d
BLAKE2b-256 checksum
How to use checksums
1f89bc51795c1756e2ee717c00ff7a1b8b97c71278ad3df7184bd844b3e700f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / wotreplay-1.0.2-py2.py3-none-any.whl

Download URL wotreplay-1.0.2-py2.py3-none-any.whl
Size 17.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
78f8cba22a5a37ce4d452c6dbfde261dfe16bfb23348b58f2188caef1b1188f9
BLAKE2b-256 checksum
How to use checksums
7b335d9f57a320f50a628f4c1ad9e5508a4939d95f713c87bf6af9177aafea4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page