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
tf2 = TF2("apiKey", autoUpdate, updateTime, lite).schema
# autoUpdate - Automatic update schema (True/False). (Default: False)
# updateTime - Seconds between updates. (Default: 86400 seconds)
# lite - Lite mode. (Default: False)
# Convert SKU to name
name = tf2.getNameFromSku(sku)
# Convert name to SKU
sku = tf2.getSkuFromName(name)
# Get TF2 schema as json
schema = tf2.toJSON()
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)
# Convert item data from Steam Web API to SKU
sku = SKU.fromAPI(itemData)
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-2.0.1.tar.gz
(16.5 kB
view details)
Built Distribution
File details
Details for the file tf2-utilities-2.0.1.tar.gz
.
File metadata
- Download URL: tf2-utilities-2.0.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 656f279b93218677b97ca7510ff8aa96cb0546e93102b38d70cd7b4d04c0978c |
|
MD5 | 8df38c6084fc5178793c8bdbac64b8ad |
|
BLAKE2b-256 | a5388057c39ef19b5dde5c76d48c2677a7f9717b3328635a79df63ac1b23e287 |
File details
Details for the file tf2_utilities-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: tf2_utilities-2.0.1-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf996cce0f6f15a56d36c1c9f2443e995a0869374607ca4e068617181770d86 |
|
MD5 | f7f743e0531c161aebede8474dfa6fee |
|
BLAKE2b-256 | 383318c724be039a7f658a9bf4e0bd19b09ce304e89d56bb6a309f515e57ded1 |