tf2-utilities


Nametf2-utilities JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://github.com/j0hnnyblack/python-tf2-utilities
SummaryGet information about TF2 items, effects, skins and more
upload_time2024-03-21 06:12:24
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/31/3e/cb3de0e055eb1b9e3fcd02f8b13fd5b85121e8dc01d5ecf9b69b0e16bbfd/tf2-utilities-2.2.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.2.0",
    "project_urls": {
        "Homepage": "https://github.com/j0hnnyblack/python-tf2-utilities"
    },
    "split_keywords": [
        "tf2",
        " teamfortress2",
        " steam",
        " trade",
        " trading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c891c653a6cc0c1c388cc36d2b360d24e1c43cb51dc35307071c62fa70b65ec1",
                "md5": "bca29acc36e9f5cb32a29d7898175950",
                "sha256": "96be64a56afcfcf2ac1317b11248601de0850c2e19e12c6aca8fef4cc464c89a"
            },
            "downloads": -1,
            "filename": "tf2_utilities-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bca29acc36e9f5cb32a29d7898175950",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18631,
            "upload_time": "2024-03-21T06:12:22",
            "upload_time_iso_8601": "2024-03-21T06:12:22.642912Z",
            "url": "https://files.pythonhosted.org/packages/c8/91/c653a6cc0c1c388cc36d2b360d24e1c43cb51dc35307071c62fa70b65ec1/tf2_utilities-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "313ecb3de0e055eb1b9e3fcd02f8b13fd5b85121e8dc01d5ecf9b69b0e16bbfd",
                "md5": "4bae3f52ac023df5a2074d6a6cb1fffe",
                "sha256": "065fad516bc91c3da914fd776188cf5b8ee81e32b00202ea6b1a9045a0646d7c"
            },
            "downloads": -1,
            "filename": "tf2-utilities-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4bae3f52ac023df5a2074d6a6cb1fffe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17720,
            "upload_time": "2024-03-21T06:12:24",
            "upload_time_iso_8601": "2024-03-21T06:12:24.773902Z",
            "url": "https://files.pythonhosted.org/packages/31/3e/cb3de0e055eb1b9e3fcd02f8b13fd5b85121e8dc01d5ecf9b69b0e16bbfd/tf2-utilities-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-21 06:12:24",
    "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.21976s