Item#

Usage#

from tf2_utils import Item

# A dictionary of item data from inventory or offer
item_dict = {
    "appid": 440,
    "classid": "313",
    "instanceid": "11040552",
    # and so on...
}

# Create an item object
item = Item(item_dict)

item.get_defindex()  # 263
item.is_craft_hat()  # True
item.is_uncraftable()  # False
item.get_paint()  # Australium Gold
item.is_unusual()  # False
item.is_unusual_cosmetic()  # False
item.get_effect()  # ""
# etc.
class src.tf2_utils.item.Item(item: dict)#
is_tf2() bool#
is_tradable() bool#
has_name(name: str) bool#
has_description(description: str, color: str = '756b5e', exact: bool = True) bool#
get_description(description: str, color: str = '756b5e') str#
get_description_and_replace(description: str, color: str = '756b5e') str#
has_tag(tag: str, exact: bool = True) bool#
has_quality(quality: str) bool#
has_strange_in_name() bool#
has_vintage_in_name() bool#
has_killstreak(killstreak: str) bool#
get_killstreak() str#
get_quality() str#
get_quality_id() int#
get_defindex() int#
get_effect() str#
get_paint() str#
get_killstreak_id() int#
get_exterior() str#
get_exterior_id() int#
is_genuine() bool#
is_vintage() bool#
is_unusual() bool#
is_unique() bool#
is_strange() bool#
is_haunted() bool#
is_collectors() bool#
is_decorated_weapon() bool#
is_craftable() bool#
is_uncraftable() bool#
is_non_craftable() bool#
is_painted() bool#
has_spell() bool#
is_special() bool#
is_festivized() bool#
is_halloween() bool#
is_craft_weapon() bool#
is_cosmetic() bool#
is_craft_hat() bool#
is_unusual_cosmetic() bool#
is_australium() bool#
is_pure() bool#
is_key() bool#
is_mann_co_key() bool#
is_killstreak() bool#
is_basic_killstreak() bool#
is_specialized_killstreak() bool#
is_professional_killstreak() bool#