{"id":16535891,"url":"https://github.com/offish/tf2-sku","last_synced_at":"2025-08-07T14:41:02.063Z","repository":{"id":46154552,"uuid":"270094617","full_name":"offish/tf2-sku","owner":"offish","description":"Format items as strings or objects using Python 3.","archived":false,"fork":false,"pushed_at":"2023-09-27T10:25:07.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-12T23:47:56.655Z","etag":null,"topics":["backpacktf","marketplacetf","pricestf","sku","steam","steamcommunity","team-fortress-2","tf2","tf2-items","tf2-trading-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-06-06T20:21:37.000Z","updated_at":"2023-10-13T17:00:33.000Z","dependencies_parsed_at":"2023-08-28T22:02:01.622Z","dependency_job_id":"ae105c7c-a359-482f-9223-39717189fe15","html_url":"https://github.com/offish/tf2-sku","commit_stats":null,"previous_names":["offish/tf2-sku"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offish%2Ftf2-sku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offish%2Ftf2-sku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offish%2Ftf2-sku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offish%2Ftf2-sku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offish","download_url":"https://codeload.github.com/offish/tf2-sku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859544,"owners_count":16556035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backpacktf","marketplacetf","pricestf","sku","steam","steamcommunity","team-fortress-2","tf2","tf2-items","tf2-trading-bot"],"created_at":"2024-10-11T18:29:10.888Z","updated_at":"2024-10-11T18:29:10.946Z","avatar_url":"https://github.com/offish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf2-sku\r\n[![License](https://img.shields.io/github/license/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/blob/master/LICENSE)\r\n[![Stars](https://img.shields.io/github/stars/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/stargazers)\r\n[![Issues](https://img.shields.io/github/issues/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku/issues)\r\n[![Size](https://img.shields.io/github/repo-size/offish/tf2-sku.svg)](https://github.com/offish/tf2-sku)\r\n[![Discord](https://img.shields.io/discord/467040686982692865?color=7289da\u0026label=Discord\u0026logo=discord)](https://discord.gg/t8nHSvA)\r\n[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\r\n\r\nParse TF2 items to SKU format with Python.\r\n\r\ntf2-sku is a dependency in [tf2-utils](https://github.com/offish/tf2-utils), which can get item SKUs directly from inventory/offers. \r\n\r\n## Donate\r\n- BTC: `bc1qntlxs7v76j0zpgkwm62f6z0spsvyezhcmsp0z2`\r\n- [Steam Trade Offer](https://steamcommunity.com/tradeoffer/new/?partner=293059984\u0026token=0-l_idZR)\r\n\r\n## Usage\r\n```python\r\n\u003e\u003e\u003e from tf2_sku import to_sku, from_sku\r\n\r\n\u003e\u003e\u003e to_sku({\"defindex\": 5021, \"quality\": 6})\r\n\"5021;6\"\r\n# https://marketplace.tf/items/tf2/5021;6\r\n\r\n\u003e\u003e\u003e from_sku(\"161;3;kt-3\")\r\n{\r\n    \"defindex\": 161,\r\n    \"quality\": 3,\r\n    \"effect\": -1,\r\n    \"australium\": False,\r\n    \"craftable\": True,\r\n    \"wear\": -1,\r\n    \"skin\": -1,\r\n    \"strange\": False,\r\n    \"killstreak_tier\": 3,\r\n    \"target_defindex\": -1,\r\n    \"festivized\": False,\r\n    \"craft_number\": -1,\r\n    \"crate_number\": -1,\r\n    \"output_defindex\": -1,\r\n    \"output_quality\": -1,\r\n}\r\n# https://marketplace.tf/items/tf2/161;3;kt-3\r\n\r\n\u003e\u003e\u003e to_sku({\r\n...    \"defindex\": 199,\r\n...    \"quality\": 5,\r\n...    \"effect\": 702,\r\n...    \"wear\": 3,\r\n...    \"skin\": 292,\r\n...    \"strange\": True,\r\n...    \"killstreak_tier\": 3\r\n... })\r\n\"199;5;u702;w3;pk292;strange;kt-3\"\r\n# https://marketplace.tf/items/tf2/199;5;u702;w3;pk292;strange;kt-3\r\n```\r\n\r\n## Setup\r\n### Install\r\n```bash\r\npip install tf2-sku\r\n# or \r\npython -m pip install tf2-sku\r\n```\r\n\r\n### Upgrade\r\n```bash\r\npip upgrade tf2-sku\r\n# or \r\npython -m pip upgrade tf2-sku\r\n```\r\n\r\n## Testing\r\n```bash\r\n# tf2-sku/\r\npython -m unittest\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffish%2Ftf2-sku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffish%2Ftf2-sku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffish%2Ftf2-sku/lists"}