Skip to content

marcusmunch/ranktier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ranktier

Build Status PyPI PyPI PyPI

ranktier converts rank_tier numbers from APIs like OpenDota to human-readable ranks

Setup

ranktier can be installed from PyPi: pip install ranktier

It can also be installed by downloading the repo and running pip install .

Usage

>>> import ranktier
>>> r = ranktier.Rank(42)
>>> print(r)
Archon [2]
>>> p = ranktier.Player(86745912)
>>> print(p.rank)
Immortal rank 3

Rank.name can also be used, but returns the same as above.

rank has to be a two-digit number for ranktier to work. Ranktier works regardless of rank being a str-type or int-type variable.

As of 1.4, Player objects also have names:

>>> p.personaname
天鸽
>>> p.name
Arteezy

personaname refers to a profile's most recent alias, while name is the tag used by pros in-game.

About

ranktier converts "rank_tier" numbers from APIs like OpenDota to human-readable ranks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages