Parse TF2 items to SKU format
Project description
tf2-sku
Parse TF2 items to SKU format with Python.
[!TIP] Use tf2-utils to get SKUs directly from inventories or offers.
Donate
- BTC:
bc1q9gmh5x2g9s0pw3282a5ypr6ms8qvuxh3fd7afh - Steam Trade Offer
Usage
>>> from tf2_sku import to_sku, from_sku
>>> to_sku({"defindex": 5021, "quality": 6})
"5021;6"
# https://marketplace.tf/items/tf2/5021;6
>>> from_sku("161;3;kt-3")
{
"defindex": 161,
"quality": 3,
"effect": -1,
"australium": False,
"craftable": True,
"wear": -1,
"skin": -1,
"strange": False,
"killstreak_tier": 3,
"sheen": -1,
"killstreaker": -1,
"target_defindex": -1,
"festivized": False,
"craft_number": -1,
"crate_number": -1,
"output_defindex": -1,
"output_quality": -1,
}
# https://marketplace.tf/items/tf2/161;3;kt-3
>>> to_sku({
... "defindex": 199,
... "quality": 5,
... "effect": 702,
... "wear": 3,
... "skin": 292,
... "strange": True,
... "killstreak_tier": 3
... })
"199;5;u702;w3;pk292;strange;kt-3"
# https://marketplace.tf/items/tf2/199;5;u702;w3;pk292;strange;kt-3
Setup
Install
pip install tf2-sku
# or
python -m pip install tf2-sku
Upgrade
pip install --upgrade tf2-sku
# or
python -m pip install --upgrade tf2-sku
Testing
# tf2-sku/
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tf2_sku-2.1.0.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tf2_sku-2.1.0.tar.gz.
File metadata
- Download URL: tf2_sku-2.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca960263c6129beb6ffd3f774d4dc48bfdaace65d69adaf896d2c0957e023413
|
|
| MD5 |
06017d706b082da56cbedd28c2ac152b
|
|
| BLAKE2b-256 |
e12e08bcb0179afd538c79e9426a426ad6db9b2f9bf21bca31376ad1fb4f8fa8
|
File details
Details for the file tf2_sku-2.1.0-py3-none-any.whl.
File metadata
- Download URL: tf2_sku-2.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9cda64cb9118b650757b1cb8f8992d8d951bd28776ed6a63ae3e884bcad7cb8
|
|
| MD5 |
1c8c93933a909196b9d065cc314f282a
|
|
| BLAKE2b-256 |
9cf013b0ef2d3dbffa6c0376289d49cea0ef388505a4aa3410ff3610203d9cf3
|