SKU¶
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.
- src.tf2_utils.sku.is_sku(item: str) bool¶
 
- src.tf2_utils.sku.is_key(sku: str) bool¶
 
- src.tf2_utils.sku.is_metal(sku: str) bool¶
 
- src.tf2_utils.sku.is_pure(sku: str) bool¶
 
- src.tf2_utils.sku.get_metal(sku: str) int¶
 
- src.tf2_utils.sku.get_properties(sku: str) list[str]¶
 
- src.tf2_utils.sku.get_property(sku: str, index: int) str¶
 
- src.tf2_utils.sku.get_property_by_key(sku: str, key: str) str | None¶
 
- src.tf2_utils.sku.sku_to_defindex(sku: str) int¶
 
- src.tf2_utils.sku.sku_to_quality(sku: str) int¶
 
- src.tf2_utils.sku.sku_to_quality_name(sku: str) str¶
 
- src.tf2_utils.sku.sku_to_color(sku: str) str¶
 
- src.tf2_utils.sku.sku_is_uncraftable(sku: str) bool¶
 
- src.tf2_utils.sku.sku_is_craftable(sku: str) bool¶
 
- src.tf2_utils.sku.strange_in_sku(sku: str) bool¶
 
- src.tf2_utils.sku.australium_in_sku(sku: str) bool¶
 
- src.tf2_utils.sku.festive_in_sku(sku: str) bool¶
 
- src.tf2_utils.sku.get_sku_killstreak(sku: str) int¶
 
- src.tf2_utils.sku.get_killstreak_name_from_sku(sku: str) str¶
 
- src.tf2_utils.sku.get_sku_effect(sku: str) int¶
 
- src.tf2_utils.sku.get_effect_name_from_sku(sku: str) str¶