match-predicting-ann-server-pub-api 5.2__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.
Potentially problematic release.
This version of match-predicting-ann-server-pub-api might be problematic. Click here for more details.
- match_predicting_ann_server_pub_api/__init__.py +0 -0
- match_predicting_ann_server_pub_api/__main__.py +19 -0
- match_predicting_ann_server_pub_api/controllers/__init__.py +0 -0
- match_predicting_ann_server_pub_api/controllers/network_controller.py +29 -0
- match_predicting_ann_server_pub_api/controllers/security_controller.py +2 -0
- match_predicting_ann_server_pub_api/encoder.py +19 -0
- match_predicting_ann_server_pub_api/models/__init__.py +8 -0
- match_predicting_ann_server_pub_api/models/base_model.py +68 -0
- match_predicting_ann_server_pub_api/models/network_dto.py +113 -0
- match_predicting_ann_server_pub_api/models/predicting_data.py +89 -0
- match_predicting_ann_server_pub_api/models/training_data.py +143 -0
- match_predicting_ann_server_pub_api/models/training_match_dto.py +87 -0
- match_predicting_ann_server_pub_api/models/training_network_dto.py +191 -0
- match_predicting_ann_server_pub_api/models/training_request_dto.py +167 -0
- match_predicting_ann_server_pub_api/openapi/openapi.yaml +243 -0
- match_predicting_ann_server_pub_api/test/__init__.py +16 -0
- match_predicting_ann_server_pub_api/typing_utils.py +30 -0
- match_predicting_ann_server_pub_api/util.py +147 -0
- match_predicting_ann_server_pub_api-5.2.dist-info/METADATA +19 -0
- match_predicting_ann_server_pub_api-5.2.dist-info/RECORD +23 -0
- match_predicting_ann_server_pub_api-5.2.dist-info/WHEEL +5 -0
- match_predicting_ann_server_pub_api-5.2.dist-info/entry_points.txt +2 -0
- match_predicting_ann_server_pub_api-5.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from match_predicting_ann_server_pub_api import typing_utils
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _deserialize(data, klass):
|
|
8
|
+
"""Deserializes dict, list, str into an object.
|
|
9
|
+
|
|
10
|
+
:param data: dict, list or str.
|
|
11
|
+
:param klass: class literal, or string of class name.
|
|
12
|
+
|
|
13
|
+
:return: object.
|
|
14
|
+
"""
|
|
15
|
+
if data is None:
|
|
16
|
+
return None
|
|
17
|
+
|
|
18
|
+
if klass in (int, float, str, bool, bytearray):
|
|
19
|
+
return _deserialize_primitive(data, klass)
|
|
20
|
+
elif klass == object:
|
|
21
|
+
return _deserialize_object(data)
|
|
22
|
+
elif klass == datetime.date:
|
|
23
|
+
return deserialize_date(data)
|
|
24
|
+
elif klass == datetime.datetime:
|
|
25
|
+
return deserialize_datetime(data)
|
|
26
|
+
elif typing_utils.is_generic(klass):
|
|
27
|
+
if typing_utils.is_list(klass):
|
|
28
|
+
return _deserialize_list(data, klass.__args__[0])
|
|
29
|
+
if typing_utils.is_dict(klass):
|
|
30
|
+
return _deserialize_dict(data, klass.__args__[1])
|
|
31
|
+
else:
|
|
32
|
+
return deserialize_model(data, klass)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _deserialize_primitive(data, klass):
|
|
36
|
+
"""Deserializes to primitive type.
|
|
37
|
+
|
|
38
|
+
:param data: data to deserialize.
|
|
39
|
+
:param klass: class literal.
|
|
40
|
+
|
|
41
|
+
:return: int, long, float, str, bool.
|
|
42
|
+
:rtype: int | long | float | str | bool
|
|
43
|
+
"""
|
|
44
|
+
try:
|
|
45
|
+
value = klass(data)
|
|
46
|
+
except UnicodeEncodeError:
|
|
47
|
+
value = data
|
|
48
|
+
except TypeError:
|
|
49
|
+
value = data
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _deserialize_object(value):
|
|
54
|
+
"""Return an original value.
|
|
55
|
+
|
|
56
|
+
:return: object.
|
|
57
|
+
"""
|
|
58
|
+
return value
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def deserialize_date(string):
|
|
62
|
+
"""Deserializes string to date.
|
|
63
|
+
|
|
64
|
+
:param string: str.
|
|
65
|
+
:type string: str
|
|
66
|
+
:return: date.
|
|
67
|
+
:rtype: date
|
|
68
|
+
"""
|
|
69
|
+
if string is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
from dateutil.parser import parse
|
|
74
|
+
return parse(string).date()
|
|
75
|
+
except ImportError:
|
|
76
|
+
return string
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def deserialize_datetime(string):
|
|
80
|
+
"""Deserializes string to datetime.
|
|
81
|
+
|
|
82
|
+
The string should be in iso8601 datetime format.
|
|
83
|
+
|
|
84
|
+
:param string: str.
|
|
85
|
+
:type string: str
|
|
86
|
+
:return: datetime.
|
|
87
|
+
:rtype: datetime
|
|
88
|
+
"""
|
|
89
|
+
if string is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
try:
|
|
93
|
+
from dateutil.parser import parse
|
|
94
|
+
return parse(string)
|
|
95
|
+
except ImportError:
|
|
96
|
+
return string
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def deserialize_model(data, klass):
|
|
100
|
+
"""Deserializes list or dict to model.
|
|
101
|
+
|
|
102
|
+
:param data: dict, list.
|
|
103
|
+
:type data: dict | list
|
|
104
|
+
:param klass: class literal.
|
|
105
|
+
:return: model object.
|
|
106
|
+
"""
|
|
107
|
+
instance = klass()
|
|
108
|
+
|
|
109
|
+
if not instance.openapi_types:
|
|
110
|
+
return data
|
|
111
|
+
|
|
112
|
+
for attr, attr_type in instance.openapi_types.items():
|
|
113
|
+
if data is not None \
|
|
114
|
+
and instance.attribute_map[attr] in data \
|
|
115
|
+
and isinstance(data, (list, dict)):
|
|
116
|
+
value = data[instance.attribute_map[attr]]
|
|
117
|
+
setattr(instance, attr, _deserialize(value, attr_type))
|
|
118
|
+
|
|
119
|
+
return instance
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _deserialize_list(data, boxed_type):
|
|
123
|
+
"""Deserializes a list and its elements.
|
|
124
|
+
|
|
125
|
+
:param data: list to deserialize.
|
|
126
|
+
:type data: list
|
|
127
|
+
:param boxed_type: class literal.
|
|
128
|
+
|
|
129
|
+
:return: deserialized list.
|
|
130
|
+
:rtype: list
|
|
131
|
+
"""
|
|
132
|
+
return [_deserialize(sub_data, boxed_type)
|
|
133
|
+
for sub_data in data]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def _deserialize_dict(data, boxed_type):
|
|
137
|
+
"""Deserializes a dict and its elements.
|
|
138
|
+
|
|
139
|
+
:param data: dict to deserialize.
|
|
140
|
+
:type data: dict
|
|
141
|
+
:param boxed_type: class literal.
|
|
142
|
+
|
|
143
|
+
:return: deserialized dict.
|
|
144
|
+
:rtype: dict
|
|
145
|
+
"""
|
|
146
|
+
return {k: _deserialize(v, boxed_type)
|
|
147
|
+
for k, v in data.items() }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: match_predicting_ann_server_pub_api
|
|
3
|
+
Version: 5.2
|
|
4
|
+
Summary: Match Predicting ANN Server Public API
|
|
5
|
+
Home-page: https://github.com/magistvan/match-predicting-ann-server-client
|
|
6
|
+
Author-email: magistvan@yahoo.com
|
|
7
|
+
Keywords: OpenAPI,Match Predicting ANN Server Public API
|
|
8
|
+
Requires-Dist: connexion>=2.0.2
|
|
9
|
+
Requires-Dist: swagger-ui-bundle>=0.0.2
|
|
10
|
+
Requires-Dist: python_dateutil>=2.6.0
|
|
11
|
+
Dynamic: author-email
|
|
12
|
+
Dynamic: description
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: keywords
|
|
15
|
+
Dynamic: requires-dist
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
19
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
match_predicting_ann_server_pub_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
match_predicting_ann_server_pub_api/__main__.py,sha256=5ECcdjZ7rsQ4zkGaHP4W84mjPLxKa7BoPwFjVS6nCM0,438
|
|
3
|
+
match_predicting_ann_server_pub_api/encoder.py,sha256=8DGPwOWxaL_GlegXlfwmZOMPLmfEOrd-VlXnHGBcyNg,599
|
|
4
|
+
match_predicting_ann_server_pub_api/typing_utils.py,sha256=yXf3fOQSZ9ymHPjpMsUFRLBrYlMDT_xpVzhSlD0kiCw,792
|
|
5
|
+
match_predicting_ann_server_pub_api/util.py,sha256=91_jR_wg_JA633WRbQOi5yp7wo4K6kgt-Pw7SOMIvKY,3498
|
|
6
|
+
match_predicting_ann_server_pub_api/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
match_predicting_ann_server_pub_api/controllers/network_controller.py,sha256=0n6tCQeOSuZrcFds-DyXf4rjkz3C5mQdJtDxxzzVNV0,1000
|
|
8
|
+
match_predicting_ann_server_pub_api/controllers/security_controller.py,sha256=Od2OR_cgmL1we63tUzKfAMv6aJWsuu9XtxMpx6a04Pk,25
|
|
9
|
+
match_predicting_ann_server_pub_api/models/__init__.py,sha256=j4FS_XJbYinzlrmnPF41w2h84BSBKJwwqDHpxAbxLIQ,577
|
|
10
|
+
match_predicting_ann_server_pub_api/models/base_model.py,sha256=0JFvQhKYTDOTIg_5j3iY2YtXx9P0p2BafgKP9oVOzlA,1897
|
|
11
|
+
match_predicting_ann_server_pub_api/models/network_dto.py,sha256=4YJ-0-Iu1CKO0SKK4CYfbXTPbE8xJwCjNoZK9JZqYyY,2754
|
|
12
|
+
match_predicting_ann_server_pub_api/models/predicting_data.py,sha256=8yv-7go_TSOkGsK1GXOnm1MNihboeXN5-YoJXpk8byA,2585
|
|
13
|
+
match_predicting_ann_server_pub_api/models/training_data.py,sha256=r52_0iAmogV6hisvMqZZOfwxGEIAP17crYABIhQKUO0,4354
|
|
14
|
+
match_predicting_ann_server_pub_api/models/training_match_dto.py,sha256=x04ie1Q6WzwuFTJUWBXhGfe_xWW6BC9D8NQO7RrZmY4,2310
|
|
15
|
+
match_predicting_ann_server_pub_api/models/training_network_dto.py,sha256=4sDvGKZ_rC_Q-xW4N627TDhvFvjU-mzTCemDTcr2SPU,8086
|
|
16
|
+
match_predicting_ann_server_pub_api/models/training_request_dto.py,sha256=qtbI6umG16I0sdd2h2TKW7PP1srqQ5-mqyvSdI9CQ7k,5437
|
|
17
|
+
match_predicting_ann_server_pub_api/openapi/openapi.yaml,sha256=fhwnvRcgAvJ6-ERAhenbbgmLY9YNFgGKtq1naLWJvk4,6276
|
|
18
|
+
match_predicting_ann_server_pub_api/test/__init__.py,sha256=u8FUjwGUdequ5yYe68rd7injTGbpATxODdfrPx1n9lw,458
|
|
19
|
+
match_predicting_ann_server_pub_api-5.2.dist-info/METADATA,sha256=kJLRD4cRj0L2iIg-cZBnOf7hywnhnUtYufoEhQfDfp8,638
|
|
20
|
+
match_predicting_ann_server_pub_api-5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
match_predicting_ann_server_pub_api-5.2.dist-info/entry_points.txt,sha256=71haID4caF-1UAj_Pp8EVclMJ0P_vh64Yt-Y3qvNsJw,106
|
|
22
|
+
match_predicting_ann_server_pub_api-5.2.dist-info/top_level.txt,sha256=lXwEK8E85U9Gmd4xA5qUuaVsnQy2bzfdeuE9ETVa4lg,36
|
|
23
|
+
match_predicting_ann_server_pub_api-5.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
match_predicting_ann_server_pub_api
|