tf2-sku-to-name 1.0.7__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: tf2-sku-to-name
3
+ Version: 2.0.0
4
+ Summary: A python library that parses TF2 item SKU to the item's name and vice versa.
5
+ Home-page: https://github.com/purplebarber/tf2-sku
6
+ Author: Purple Barber
7
+ License: MIT
8
+ Keywords: tf2,tf2-sku,team fortress 2,sku,parser
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.6
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.6
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: requests
22
+ Dynamic: author
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: keywords
28
+ Dynamic: license
29
+ Dynamic: license-file
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
34
+ # tf2-sku
35
+
36
+ A Python library for parsing Team Fortress 2 item SKUs to item names and vice versa.
37
+
38
+ ## Features
39
+ - Convert SKUs to item names
40
+ - Convert item names to SKUs
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install tf2-sku-to-name
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ```python
51
+ from sku import Sku
52
+
53
+ # Convert SKU to name
54
+ sku = "5021;6"
55
+ name = Sku.sku_to_name(sku)
56
+ print(name) # Output: Mann Co. Supply Crate Key
57
+
58
+ # Convert name to SKU
59
+ name = "Burning Flames Team Captain"
60
+ sku = Sku.name_to_sku(name)
61
+ print(sku) # Output: 378;5;u13
62
+
63
+ # Working with item objects
64
+ from sku import itemClass
65
+
66
+ item = itemClass()
67
+ item.Defindex = 424
68
+ item.Quality = 11
69
+ item.Killstreak = 3
70
+
71
+ sku = Sku.object_to_sku(item)
72
+ print(sku) # Output: 424;11;kt-3
73
+ ```
74
+
75
+ ## Advanced Usage
76
+
77
+ ### Schema Management
78
+
79
+ The library automatically manages TF2 schema data:
80
+
81
+ ```python
82
+ from sku import get_schema, update_schema
83
+
84
+ # Get the current schema instance
85
+ schema = get_schema()
86
+
87
+ # Access schema data
88
+ item = schema.get_item_by_defindex(5021)
89
+ print(item['item_name']) # Mann Co. Supply Crate Key
90
+
91
+ # Force update schema (by default uses autobot.tf)
92
+ update_schema()
93
+
94
+ # Or use Steam API (requires API key)
95
+ update_schema(api_key="YOUR_STEAM_API_KEY", use_autobot=False)
96
+ ```
97
+
98
+ ## Installation
99
+ ```bash
100
+ pip install tf2-sku-to-name
101
+ ```
102
+
103
+ ## Acknowledgements
104
+ [TF2Autobot's node-tf2-schema](https://github.com/TF2Autobot/node-tf2-schema) for the original JavaScript implementation\
105
+ [idinium96's tf2autobot](https://github.com/TF2Autobot/tf2autobot) for the item name schema\
106
+ Inspired by [Nicklason's node-tf2-sku](https://github.com/Nicklason/node-tf2-sku) and [TryHardDo's TF2Sku](https://github.com/TryHardDo/TF2Sku/tree/master)
@@ -0,0 +1,9 @@
1
+ sku/__init__.py,sha256=77dSD2mzT1jgk-OYCWpuHVBTBCmWMdqfbwCONzmd2s0,377
2
+ sku/models.py,sha256=9jQimlGwJrJRmAY5o9PTKfdgp5kRajjMcH-Xp3GA35k,804
3
+ sku/parser.py,sha256=f-myoUIpbNyAT9tUct0gsZSG14VKnZA9IV6SllsTvKA,26650
4
+ sku/schema.py,sha256=MxfQGo8dAm5O_YZ0uzicQwULSz-4khoz_-l04i6uEZ8,25051
5
+ tf2_sku_to_name-2.0.0.dist-info/licenses/LICENSE,sha256=oZXGpA1oKt4L1lkrblMbut3_ClR3etussSbI0pBkL38,1070
6
+ tf2_sku_to_name-2.0.0.dist-info/METADATA,sha256=vMREIUXo44PBZcUhbWTWCKksodvujdKiwPTeZgCSh2c,2723
7
+ tf2_sku_to_name-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ tf2_sku_to_name-2.0.0.dist-info/top_level.txt,sha256=2ekTXVLQ1fHUW3ge6PK7EaoEwkUy0tnsaDvoNkPXfNw,4
9
+ tf2_sku_to_name-2.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Purple Barber
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Purple Barber
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.