Skip to main content

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


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.3.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

tf2_utilities-0.3.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file tf2-utilities-0.3.1.tar.gz.

File metadata

  • Download URL: tf2-utilities-0.3.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.3

File hashes

Hashes for tf2-utilities-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b77fefce616edafc4ce8454b03399379aadf1a8ca4c88c9d6bebfd8021b26b62
MD5 9981eea275540e05be14c3d629c5f05d
BLAKE2b-256 13d2743b3aced7a7abfc39cd90d5065210068b52f13712ca650f41c7619a4a7c

See more details on using hashes here.

File details

Details for the file tf2_utilities-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tf2_utilities-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 408e0ac537a7c1f37fc14f8c4afcf4f44c364687df1966098fb669f75903b842
MD5 d3535c2314c1d5dcd003288b50d51c52
BLAKE2b-256 f185a6ca23e22a2062186dc087c3e29f97c30ff9b3407edb31adbb1826cd2aaa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page