tf2-utilities


Nametf2-utilities JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/j0hnnyblack/python-tf2-utilities
SummaryGet information about TF2 items, effects, skins and more
upload_time2024-08-13 10:12:51
maintainerNone
docs_urlNone
authorJohnny Black
requires_pythonNone
licenseMIT
keywords tf2 teamfortress2 steam trade trading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-tf2-utilities
Get information about TF2 items, effects, skins and more. 
Inspired by [TF2autobot's node-tf2-schema](https://github.com/TF2Autobot/node-tf2-schema) and [TF2autobot's node-tf2-sku](https://github.com/TF2Autobot/node-tf2-sku).

## Installation
```py
pip install tf2-utilities
```

## Examples
```py
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()
```

```py
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](https://steamcommunity.com/profiles/76561198076771380/)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/j0hnnyblack/python-tf2-utilities",
    "name": "tf2-utilities",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "tf2, teamfortress2, steam, trade, trading",
    "author": "Johnny Black",
    "author_email": "lokedixon@hotmail.my",
    "download_url": "https://files.pythonhosted.org/packages/6c/2c/2cb2d8f30257880e74c5fd206b51d75c13ada56356fd002d28be1683d32c/tf2-utilities-2.3.0.tar.gz",
    "platform": null,
    "description": "# python-tf2-utilities\nGet information about TF2 items, effects, skins and more. \nInspired by [TF2autobot's node-tf2-schema](https://github.com/TF2Autobot/node-tf2-schema) and [TF2autobot's node-tf2-sku](https://github.com/TF2Autobot/node-tf2-sku).\n\n## Installation\n```py\npip install tf2-utilities\n```\n\n## Examples\n```py\nfrom tf2utilities.main import TF2\n\ntf2 = TF2(\"apiKey\", autoUpdate, updateTime, lite).schema\n# autoUpdate - Automatic update schema (True/False). (Default: False)\n# updateTime - Seconds between updates. (Default: 86400 seconds)\n# lite - Lite mode. (Default: False)\n\n# Convert SKU to name\nname = tf2.getNameFromSku(sku)\n\n# Convert name to SKU\nsku = tf2.getSkuFromName(name)\n\n# Get TF2 schema as json\nschema = tf2.toJSON()\n```\n\n```py\nfrom tf2utilities.sku import SKU\n\n# Item object example\nitemObject = {\n    \"defindex\": 0,\n    \"quality\": 0,\n    \"craftable\": True,\n    \"tradable\": True,\n    \"killstreak\": 0,\n    \"australium\": False,\n    \"effect\": None,\n    \"festive\": False,\n    \"paintkit\": None,\n    \"wear\": None,\n    \"quality2\": None,\n    \"craftnumber\": None,\n    \"crateseries\": None,\n    \"target\": None,\n    \"output\": None,\n    \"outputQuality\": None,\n    \"paint\": None\n}\n\n# Convert SKU to item object\nitemObject = SKU.fromString(sku)\n\n# Convert item object to SKU\nsku = SKU.fromObject(itemObject)\n\n# Convert item data from Steam Web API to SKU\nsku = SKU.fromAPI(itemData)\n```\n\n## Questions/Bugs?\nFeel free to contact me if you encounter any issues or have any questions.\nDiscord (Johnny Black#6363) / [Steam](https://steamcommunity.com/profiles/76561198076771380/)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Get information about TF2 items, effects, skins and more",
    "version": "2.3.0",
    "project_urls": {
        "Homepage": "https://github.com/j0hnnyblack/python-tf2-utilities"
    },
    "split_keywords": [
        "tf2",
        " teamfortress2",
        " steam",
        " trade",
        " trading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5219b5fccc53c179ce07a8f0d28e3e4b3c1e99e44eb104ce14ee82d6e1ae2906",
                "md5": "5a24f4f334ca3ecf33bb5f9cb13b8d40",
                "sha256": "6997c6e08d3379ac0621a63c7eeec087647fb6e7d1eb29e1f572f0e7d4763de2"
            },
            "downloads": -1,
            "filename": "tf2_utilities-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a24f4f334ca3ecf33bb5f9cb13b8d40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18792,
            "upload_time": "2024-08-13T10:12:50",
            "upload_time_iso_8601": "2024-08-13T10:12:50.025402Z",
            "url": "https://files.pythonhosted.org/packages/52/19/b5fccc53c179ce07a8f0d28e3e4b3c1e99e44eb104ce14ee82d6e1ae2906/tf2_utilities-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c2c2cb2d8f30257880e74c5fd206b51d75c13ada56356fd002d28be1683d32c",
                "md5": "2c11559d9fc3a65780b4567baad3c1e4",
                "sha256": "d02e8f204fd834c145d7203e9bcc0a6256a38f151d9eb92917516ae3db78cce3"
            },
            "downloads": -1,
            "filename": "tf2-utilities-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2c11559d9fc3a65780b4567baad3c1e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17740,
            "upload_time": "2024-08-13T10:12:51",
            "upload_time_iso_8601": "2024-08-13T10:12:51.550389Z",
            "url": "https://files.pythonhosted.org/packages/6c/2c/2cb2d8f30257880e74c5fd206b51d75c13ada56356fd002d28be1683d32c/tf2-utilities-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 10:12:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "j0hnnyblack",
    "github_project": "python-tf2-utilities",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tf2-utilities"
}
        
Elapsed time: 0.34612s