tf2-sku-to-name 1.0.7__py3-none-any.whl → 2.0.1__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.
- sku/__init__.py +13 -0
- sku/models.py +30 -30
- sku/parser.py +649 -236
- sku/schema.py +649 -0
- tf2_sku_to_name-2.0.1.dist-info/METADATA +106 -0
- tf2_sku_to_name-2.0.1.dist-info/RECORD +9 -0
- {tf2_sku_to_name-1.0.7.dist-info → tf2_sku_to_name-2.0.1.dist-info}/WHEEL +1 -1
- {tf2_sku_to_name-1.0.7.dist-info → tf2_sku_to_name-2.0.1.dist-info/licenses}/LICENSE +21 -21
- sku/data/data.json +0 -70183
- tf2_sku_to_name-1.0.7.dist-info/METADATA +0 -13
- tf2_sku_to_name-1.0.7.dist-info/RECORD +0 -8
- {tf2_sku_to_name-1.0.7.dist-info → tf2_sku_to_name-2.0.1.dist-info}/top_level.txt +0 -0
sku/__init__.py
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
from sku.parser import Sku, get_schema
|
2
|
+
from sku.models import itemClass
|
3
|
+
from sku.schema import Schema
|
4
|
+
|
5
|
+
__version__ = "2.0.1"
|
6
|
+
__all__ = ["Sku", "itemClass", "Schema", "get_schema", "update_schema"]
|
7
|
+
|
8
|
+
# Main functions
|
9
|
+
object_to_sku = Sku.object_to_sku
|
10
|
+
sku_to_object = Sku.sku_to_object
|
11
|
+
sku_to_name = Sku.sku_to_name
|
12
|
+
name_to_sku = Sku.name_to_sku
|
13
|
+
update_schema = Sku.update_schema
|
sku/models.py
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
from json import dumps
|
2
|
-
|
3
|
-
|
4
|
-
class itemClass:
|
5
|
-
def __init__(self, data=None):
|
6
|
-
# Initialize the properties with their default values
|
7
|
-
self.Defindex = 0
|
8
|
-
self.Quality = 6
|
9
|
-
self.Craftable = True
|
10
|
-
self.Killstreak = 0
|
11
|
-
self.Australium = False
|
12
|
-
self.Festive = False
|
13
|
-
self.Effect = None
|
14
|
-
self.PaintKit = None
|
15
|
-
self.Wear = None
|
16
|
-
self.ElevatedQuality = None
|
17
|
-
self.Target = None
|
18
|
-
self.CraftNum = None
|
19
|
-
self.CrateSn = None
|
20
|
-
self.Output = None
|
21
|
-
self.OutputQuality = None
|
22
|
-
|
23
|
-
# Update the properties with the provided data
|
24
|
-
if data is not None:
|
25
|
-
self.__dict__.update(data)
|
26
|
-
|
27
|
-
|
28
|
-
def __str__(self):
|
29
|
-
# Serialize the object to a JSON string
|
30
|
-
return dumps(self.__dict__)
|
1
|
+
from json import dumps
|
2
|
+
|
3
|
+
|
4
|
+
class itemClass:
|
5
|
+
def __init__(self, data=None):
|
6
|
+
# Initialize the properties with their default values
|
7
|
+
self.Defindex = 0
|
8
|
+
self.Quality = 6
|
9
|
+
self.Craftable = True
|
10
|
+
self.Killstreak = 0
|
11
|
+
self.Australium = False
|
12
|
+
self.Festive = False
|
13
|
+
self.Effect = None
|
14
|
+
self.PaintKit = None
|
15
|
+
self.Wear = None
|
16
|
+
self.ElevatedQuality = None
|
17
|
+
self.Target = None
|
18
|
+
self.CraftNum = None
|
19
|
+
self.CrateSn = None
|
20
|
+
self.Output = None
|
21
|
+
self.OutputQuality = None
|
22
|
+
|
23
|
+
# Update the properties with the provided data
|
24
|
+
if data is not None:
|
25
|
+
self.__dict__.update(data)
|
26
|
+
|
27
|
+
|
28
|
+
def __str__(self):
|
29
|
+
# Serialize the object to a JSON string
|
30
|
+
return dumps(self.__dict__)
|