Skip to main content

Tanki

Tanki is an API wrapper for Tanki Online's rating API. Allows you to easily search for users and get information about them. To get started, create a new Profile object using tanki.Profile('username')

Notes

  • raw_time_played returns time in milliseconds
  • If you don't own the grade of a hull, module, or turret, it'll return None for all attributes

Quick Start

import tanki

# initialize a object
profile = tanki.Profile('walker38552')

# get kills and deaths
print(f'Kills: {profile.kills}, Deaths: {profile.deaths}')

# get k/d ratio
print(f'K/D: {profile.kd}')

# get rank
print(profile.get_rank())
print(profile.get_rank().rank_name)

# get drone data
for drone in profile.get_drones_played():
    print(drone.name, drone.score_earned, drone.time_played_hours)

# get hull data
for hull in profile.get_hulls_played():
    print(hull.name, hull.time_played_hours)
    # show statistics for each grade of the hull
    print(hull.grades.mk1.score_earned)
    print(hull.grades.mk2.score_earned)
    print(hull.grades.mk3.score_earned)
    print(hull.grades.mk4.score_earned)
    print(hull.grades.mk5.score_earned)
    print(hull.grades.mk6.score_earned)
    print(hull.grades.mk7.score_earned)

Release files for Tanki 1.0.0

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

Source distribution (sdist)

Source distribution for Tanki 1.0.0
File Size Uploaded
Tanki-1.0.0.tar.gz 4.4 kB Details

Release files / Tanki-1.0.0.tar.gz

Download URL Tanki-1.0.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8b56c9729e294e3ba5bd977b81949c1075c42ff32733e3cd004a5b6011d7a43e
BLAKE2b-256 checksum
How to use checksums
73da338f071b5d1334524fa3073b9314fd8ef4b4680f4eedb22df40e494d721f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

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