tf2-sku


Nametf2-sku JSON
Version 2.0.1 PyPI version JSON
download
home_page
SummaryParse TF2 items to SKU format
upload_time2023-09-26 17:23:12
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords tf2 sku
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tf2-sku
[![License](https://img.shields.io/github/license/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/stargazers)
[![Issues](https://img.shields.io/github/issues/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/issues)
[![Size](https://img.shields.io/github/repo-size/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku)
[![Discord](https://img.shields.io/discord/467040686982692865?color=7289da&label=Discord&logo=discord)](https://discord.gg/t8nHSvA)
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Parse TF2 items to SKU format with Python.

## Donate
- BTC: `bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2`
- [Steam Trade Offer](https://steamcommunity.com/tradeoffer/new/?partner=293059984&token=0-l_idZR)

## Usage
```python
>>> 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,
    "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
```bash
pip install tf2-sku
# or 
python -m pip install tf2-sku
```

### Upgrade
```bash
pip upgrade tf2-sku
# or 
python -m pip upgrade tf2-sku
```

## Testing
```bash
# tf2-sku/
python -m unittest
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tf2-sku",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "tf2,sku",
    "author": "",
    "author_email": "offish <overutilization@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0a/67/3288f5aba9ead4802414c8601bd809717f4ffec7da0ea60259bc2baf19dc/tf2-sku-2.0.1.tar.gz",
    "platform": null,
    "description": "# tf2-sku\n[![License](https://img.shields.io/github/license/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/blob/master/LICENSE)\n[![Stars](https://img.shields.io/github/stars/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/stargazers)\n[![Issues](https://img.shields.io/github/issues/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/issues)\n[![Size](https://img.shields.io/github/repo-size/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku)\n[![Discord](https://img.shields.io/discord/467040686982692865?color=7289da&label=Discord&logo=discord)](https://discord.gg/t8nHSvA)\n[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nParse TF2 items to SKU format with Python.\n\n## Donate\n- BTC: `bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2`\n- [Steam Trade Offer](https://steamcommunity.com/tradeoffer/new/?partner=293059984&token=0-l_idZR)\n\n## Usage\n```python\n>>> from tf2_sku import to_sku, from_sku\n\n>>> to_sku({\"defindex\": 5021, \"quality\": 6})\n\"5021;6\"\n# https://marketplace.tf/items/tf2/5021;6\n\n>>> from_sku(\"161;3;kt-3\")\n{\n    \"defindex\": 161,\n    \"quality\": 3,\n    \"effect\": -1,\n    \"australium\": False,\n    \"craftable\": True,\n    \"wear\": -1,\n    \"skin\": -1,\n    \"strange\": False,\n    \"killstreak_tier\": 3,\n    \"target_defindex\": -1,\n    \"festivized\": False,\n    \"craft_number\": -1,\n    \"crate_number\": -1,\n    \"output_defindex\": -1,\n    \"output_quality\": -1,\n}\n# https://marketplace.tf/items/tf2/161;3;kt-3\n\n>>> to_sku({\n...    \"defindex\": 199,\n...    \"quality\": 5,\n...    \"effect\": 702,\n...    \"wear\": 3,\n...    \"skin\": 292,\n...    \"strange\": True,\n...    \"killstreak_tier\": 3\n... })\n\"199;5;u702;w3;pk292;strange;kt-3\"\n# https://marketplace.tf/items/tf2/199;5;u702;w3;pk292;strange;kt-3\n```\n\n## Setup\n### Install\n```bash\npip install tf2-sku\n# or \npython -m pip install tf2-sku\n```\n\n### Upgrade\n```bash\npip upgrade tf2-sku\n# or \npython -m pip upgrade tf2-sku\n```\n\n## Testing\n```bash\n# tf2-sku/\npython -m unittest\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Parse TF2 items to SKU format",
    "version": "2.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/offish/tf2-sku/issues",
        "Homepage": "https://github.com/offish/tf2-sku"
    },
    "split_keywords": [
        "tf2",
        "sku"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa98f1f7a543d5648e1670f0f803d8c048ba72f69467384868f8921b9b500f87",
                "md5": "bcf66f3b874defd9d42be650a91d34ec",
                "sha256": "664d599a004d3971c43fddee4a0152d697f1130c4ea2b6128d69ad22648b2f7b"
            },
            "downloads": -1,
            "filename": "tf2_sku-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcf66f3b874defd9d42be650a91d34ec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4819,
            "upload_time": "2023-09-26T17:23:11",
            "upload_time_iso_8601": "2023-09-26T17:23:11.173660Z",
            "url": "https://files.pythonhosted.org/packages/fa/98/f1f7a543d5648e1670f0f803d8c048ba72f69467384868f8921b9b500f87/tf2_sku-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a673288f5aba9ead4802414c8601bd809717f4ffec7da0ea60259bc2baf19dc",
                "md5": "806e3bcee097135f9aaf435a56218897",
                "sha256": "4b9784e01af0d7d54a9bab8a09912ceb44ea56a5d6800c458de3a01f7b5e0038"
            },
            "downloads": -1,
            "filename": "tf2-sku-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "806e3bcee097135f9aaf435a56218897",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5267,
            "upload_time": "2023-09-26T17:23:12",
            "upload_time_iso_8601": "2023-09-26T17:23:12.705503Z",
            "url": "https://files.pythonhosted.org/packages/0a/67/3288f5aba9ead4802414c8601bd809717f4ffec7da0ea60259bc2baf19dc/tf2-sku-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-26 17:23:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "offish",
    "github_project": "tf2-sku",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tf2-sku"
}
        
Elapsed time: 0.23069s