tf2-sku
Parse TF2 items to SKU format with Python.
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
Release files for tf2-sku 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tf2_sku-2.1.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tf2_sku-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / tf2_sku-2.1.0.tar.gz
| Download URL | tf2_sku-2.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca960263c6129beb6ffd3f774d4dc48bfdaace65d69adaf896d2c0957e023413
|
|
BLAKE2b-256 checksum How to use checksums |
e12e08bcb0179afd538c79e9426a426ad6db9b2f9bf21bca31376ad1fb4f8fa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / tf2_sku-2.1.0-py3-none-any.whl
| Download URL | tf2_sku-2.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9cda64cb9118b650757b1cb8f8992d8d951bd28776ed6a63ae3e884bcad7cb8
|
|
BLAKE2b-256 checksum How to use checksums |
9cf013b0ef2d3dbffa6c0376289d49cea0ef388505a4aa3410ff3610203d9cf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|