Get information about TF2 items, effects, skins and more
Project description
python-tf2-utilities
Get information about TF2 items, effects, skins and more. Inspired by TF2autobot's node-tf2-schema and TF2autobot's node-tf2-sku.
Installation
pip install tf2-utilities
Examples
from tf2utilities.main import TF2
x = TF2("apiKey", autoUpdate, updateTime)
# autoUpdate - Automatic update schema (True/False). (Default: False)
# updateTime - Seconds between updates. (Default: 86400 seconds)
# Convert SKU to name
name = x.schema.getNameFromSku(sku)
# Convert name to SKU
sku = x.schema.getSkuFromName(name)
from tf2utilities.sku import SKU
# Item object example
itemObject = {
"defindex": 0,
"quality": 0,
"craftable": True,
"tradable": True,
"killstreak": 0,
"australium": False,
"effect": None,
"festive": False,
"paintkit": None,
"wear": None,
"quality2": None,
"craftnumber": None,
"crateseries": None,
"target": None,
"output": None,
"outputQuality": None,
"paint": None
}
# Convert SKU to item object
itemObject = SKU.fromString(sku)
# Convert item object to SKU
sku = SKU.fromObject(itemObject)
Questions/Bugs?
Feel free to contact me if you encounter any issues or have any questions. Discord (Johnny Black#6363) / Steam
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tf2-utilities-0.2.1.tar.gz
(15.2 kB
view hashes)
Built Distribution
Close
Hashes for tf2_utilities-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77fcd3fb39fd80c25b0e30a421b3b4656ee6e1f1913b8556d70e0735de3a430e |
|
MD5 | d0db6cc66b2c7f9e31725c539b62fece |
|
BLAKE2b-256 | 7adea7bb279c103bbae40df04a57f8650057fa8f4072e8876050f6a2646a4491 |