match-predicting-pub-api 4.9__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.
Files changed (30) hide show
  1. match_predicting_pub_api/__init__.py +79 -0
  2. match_predicting_pub_api/api/__init__.py +8 -0
  3. match_predicting_pub_api/api/dummy_api.py +170 -0
  4. match_predicting_pub_api/api/import_api.py +173 -0
  5. match_predicting_pub_api/api/testing_api.py +171 -0
  6. match_predicting_pub_api/api/training_api.py +318 -0
  7. match_predicting_pub_api/api_client.py +766 -0
  8. match_predicting_pub_api/api_response.py +25 -0
  9. match_predicting_pub_api/configuration.py +434 -0
  10. match_predicting_pub_api/exceptions.py +166 -0
  11. match_predicting_pub_api/models/__init__.py +29 -0
  12. match_predicting_pub_api/models/dummy_dto.py +93 -0
  13. match_predicting_pub_api/models/fcm_topic.py +46 -0
  14. match_predicting_pub_api/models/import_dto.py +78 -0
  15. match_predicting_pub_api/models/import_progress_dto.py +78 -0
  16. match_predicting_pub_api/models/import_type.py +42 -0
  17. match_predicting_pub_api/models/progress_dto.py +73 -0
  18. match_predicting_pub_api/models/testing_dto.py +73 -0
  19. match_predicting_pub_api/models/training_dto.py +73 -0
  20. match_predicting_pub_api/models/training_network_dto.py +81 -0
  21. match_predicting_pub_api/models/training_progress_dto.py +75 -0
  22. match_predicting_pub_api/models/training_request_dto.py +83 -0
  23. match_predicting_pub_api/models/training_result_dto.py +87 -0
  24. match_predicting_pub_api/models/user_role_enum.py +40 -0
  25. match_predicting_pub_api/py.typed +0 -0
  26. match_predicting_pub_api/rest.py +329 -0
  27. match_predicting_pub_api-4.9.dist-info/METADATA +24 -0
  28. match_predicting_pub_api-4.9.dist-info/RECORD +30 -0
  29. match_predicting_pub_api-4.9.dist-info/WHEEL +5 -0
  30. match_predicting_pub_api-4.9.dist-info/top_level.txt +1 -0
@@ -0,0 +1,318 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Match Predicting Application Public API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic import validate_arguments, ValidationError
20
+
21
+ from typing_extensions import Annotated
22
+ from pydantic import Field
23
+
24
+ from match_predicting_pub_api.models.training_dto import TrainingDTO
25
+ from match_predicting_pub_api.models.training_result_dto import TrainingResultDTO
26
+
27
+ from match_predicting_pub_api.api_client import ApiClient
28
+ from match_predicting_pub_api.api_response import ApiResponse
29
+ from match_predicting_pub_api.exceptions import ( # noqa: F401
30
+ ApiTypeError,
31
+ ApiValueError
32
+ )
33
+
34
+
35
+ class TrainingApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+ @validate_arguments
48
+ def finish_training(self, training_result_dto : Annotated[TrainingResultDTO, Field(..., description="Training result")], **kwargs) -> None: # noqa: E501
49
+ """Finishes and saves the training with the provided result # noqa: E501
50
+
51
+ This method makes a synchronous HTTP request by default. To make an
52
+ asynchronous HTTP request, please pass async_req=True
53
+
54
+ >>> thread = api.finish_training(training_result_dto, async_req=True)
55
+ >>> result = thread.get()
56
+
57
+ :param training_result_dto: Training result (required)
58
+ :type training_result_dto: TrainingResultDTO
59
+ :param async_req: Whether to execute the request asynchronously.
60
+ :type async_req: bool, optional
61
+ :param _request_timeout: timeout setting for this request.
62
+ If one number provided, it will be total request
63
+ timeout. It can also be a pair (tuple) of
64
+ (connection, read) timeouts.
65
+ :return: Returns the result object.
66
+ If the method is called asynchronously,
67
+ returns the request thread.
68
+ :rtype: None
69
+ """
70
+ kwargs['_return_http_data_only'] = True
71
+ if '_preload_content' in kwargs:
72
+ message = "Error! Please call the finish_training_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
73
+ raise ValueError(message)
74
+ return self.finish_training_with_http_info(training_result_dto, **kwargs) # noqa: E501
75
+
76
+ @validate_arguments
77
+ def finish_training_with_http_info(self, training_result_dto : Annotated[TrainingResultDTO, Field(..., description="Training result")], **kwargs) -> ApiResponse: # noqa: E501
78
+ """Finishes and saves the training with the provided result # noqa: E501
79
+
80
+ This method makes a synchronous HTTP request by default. To make an
81
+ asynchronous HTTP request, please pass async_req=True
82
+
83
+ >>> thread = api.finish_training_with_http_info(training_result_dto, async_req=True)
84
+ >>> result = thread.get()
85
+
86
+ :param training_result_dto: Training result (required)
87
+ :type training_result_dto: TrainingResultDTO
88
+ :param async_req: Whether to execute the request asynchronously.
89
+ :type async_req: bool, optional
90
+ :param _preload_content: if False, the ApiResponse.data will
91
+ be set to none and raw_data will store the
92
+ HTTP response body without reading/decoding.
93
+ Default is True.
94
+ :type _preload_content: bool, optional
95
+ :param _return_http_data_only: response data instead of ApiResponse
96
+ object with status code, headers, etc
97
+ :type _return_http_data_only: bool, optional
98
+ :param _request_timeout: timeout setting for this request. If one
99
+ number provided, it will be total request
100
+ timeout. It can also be a pair (tuple) of
101
+ (connection, read) timeouts.
102
+ :param _request_auth: set to override the auth_settings for an a single
103
+ request; this effectively ignores the authentication
104
+ in the spec for a single request.
105
+ :type _request_auth: dict, optional
106
+ :type _content_type: string, optional: force content-type for the request
107
+ :return: Returns the result object.
108
+ If the method is called asynchronously,
109
+ returns the request thread.
110
+ :rtype: None
111
+ """
112
+
113
+ _params = locals()
114
+
115
+ _all_params = [
116
+ 'training_result_dto'
117
+ ]
118
+ _all_params.extend(
119
+ [
120
+ 'async_req',
121
+ '_return_http_data_only',
122
+ '_preload_content',
123
+ '_request_timeout',
124
+ '_request_auth',
125
+ '_content_type',
126
+ '_headers'
127
+ ]
128
+ )
129
+
130
+ # validate the arguments
131
+ for _key, _val in _params['kwargs'].items():
132
+ if _key not in _all_params:
133
+ raise ApiTypeError(
134
+ "Got an unexpected keyword argument '%s'"
135
+ " to method finish_training" % _key
136
+ )
137
+ _params[_key] = _val
138
+ del _params['kwargs']
139
+
140
+ _collection_formats = {}
141
+
142
+ # process the path parameters
143
+ _path_params = {}
144
+
145
+ # process the query parameters
146
+ _query_params = []
147
+ # process the header parameters
148
+ _header_params = dict(_params.get('_headers', {}))
149
+ # process the form parameters
150
+ _form_params = []
151
+ _files = {}
152
+ # process the body parameter
153
+ _body_params = None
154
+ if _params['training_result_dto'] is not None:
155
+ _body_params = _params['training_result_dto']
156
+
157
+ # set the HTTP header `Accept`
158
+ _header_params['Accept'] = self.api_client.select_header_accept(
159
+ ['application/json']) # noqa: E501
160
+
161
+ # set the HTTP header `Content-Type`
162
+ _content_types_list = _params.get('_content_type',
163
+ self.api_client.select_header_content_type(
164
+ ['application/json']))
165
+ if _content_types_list:
166
+ _header_params['Content-Type'] = _content_types_list
167
+
168
+ # authentication setting
169
+ _auth_settings = [] # noqa: E501
170
+
171
+ _response_types_map = {}
172
+
173
+ return self.api_client.call_api(
174
+ '/api/training/finish', 'POST',
175
+ _path_params,
176
+ _query_params,
177
+ _header_params,
178
+ body=_body_params,
179
+ post_params=_form_params,
180
+ files=_files,
181
+ response_types_map=_response_types_map,
182
+ auth_settings=_auth_settings,
183
+ async_req=_params.get('async_req'),
184
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
185
+ _preload_content=_params.get('_preload_content', True),
186
+ _request_timeout=_params.get('_request_timeout'),
187
+ collection_formats=_collection_formats,
188
+ _request_auth=_params.get('_request_auth'))
189
+
190
+ @validate_arguments
191
+ def get_current_training(self, **kwargs) -> TrainingDTO: # noqa: E501
192
+ """Returns the current training # noqa: E501
193
+
194
+ This method makes a synchronous HTTP request by default. To make an
195
+ asynchronous HTTP request, please pass async_req=True
196
+
197
+ >>> thread = api.get_current_training(async_req=True)
198
+ >>> result = thread.get()
199
+
200
+ :param async_req: Whether to execute the request asynchronously.
201
+ :type async_req: bool, optional
202
+ :param _request_timeout: timeout setting for this request.
203
+ If one number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :return: Returns the result object.
207
+ If the method is called asynchronously,
208
+ returns the request thread.
209
+ :rtype: TrainingDTO
210
+ """
211
+ kwargs['_return_http_data_only'] = True
212
+ if '_preload_content' in kwargs:
213
+ message = "Error! Please call the get_current_training_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
214
+ raise ValueError(message)
215
+ return self.get_current_training_with_http_info(**kwargs) # noqa: E501
216
+
217
+ @validate_arguments
218
+ def get_current_training_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
219
+ """Returns the current training # noqa: E501
220
+
221
+ This method makes a synchronous HTTP request by default. To make an
222
+ asynchronous HTTP request, please pass async_req=True
223
+
224
+ >>> thread = api.get_current_training_with_http_info(async_req=True)
225
+ >>> result = thread.get()
226
+
227
+ :param async_req: Whether to execute the request asynchronously.
228
+ :type async_req: bool, optional
229
+ :param _preload_content: if False, the ApiResponse.data will
230
+ be set to none and raw_data will store the
231
+ HTTP response body without reading/decoding.
232
+ Default is True.
233
+ :type _preload_content: bool, optional
234
+ :param _return_http_data_only: response data instead of ApiResponse
235
+ object with status code, headers, etc
236
+ :type _return_http_data_only: bool, optional
237
+ :param _request_timeout: timeout setting for this request. If one
238
+ number provided, it will be total request
239
+ timeout. It can also be a pair (tuple) of
240
+ (connection, read) timeouts.
241
+ :param _request_auth: set to override the auth_settings for an a single
242
+ request; this effectively ignores the authentication
243
+ in the spec for a single request.
244
+ :type _request_auth: dict, optional
245
+ :type _content_type: string, optional: force content-type for the request
246
+ :return: Returns the result object.
247
+ If the method is called asynchronously,
248
+ returns the request thread.
249
+ :rtype: tuple(TrainingDTO, status_code(int), headers(HTTPHeaderDict))
250
+ """
251
+
252
+ _params = locals()
253
+
254
+ _all_params = [
255
+ ]
256
+ _all_params.extend(
257
+ [
258
+ 'async_req',
259
+ '_return_http_data_only',
260
+ '_preload_content',
261
+ '_request_timeout',
262
+ '_request_auth',
263
+ '_content_type',
264
+ '_headers'
265
+ ]
266
+ )
267
+
268
+ # validate the arguments
269
+ for _key, _val in _params['kwargs'].items():
270
+ if _key not in _all_params:
271
+ raise ApiTypeError(
272
+ "Got an unexpected keyword argument '%s'"
273
+ " to method get_current_training" % _key
274
+ )
275
+ _params[_key] = _val
276
+ del _params['kwargs']
277
+
278
+ _collection_formats = {}
279
+
280
+ # process the path parameters
281
+ _path_params = {}
282
+
283
+ # process the query parameters
284
+ _query_params = []
285
+ # process the header parameters
286
+ _header_params = dict(_params.get('_headers', {}))
287
+ # process the form parameters
288
+ _form_params = []
289
+ _files = {}
290
+ # process the body parameter
291
+ _body_params = None
292
+ # set the HTTP header `Accept`
293
+ _header_params['Accept'] = self.api_client.select_header_accept(
294
+ ['application/json']) # noqa: E501
295
+
296
+ # authentication setting
297
+ _auth_settings = [] # noqa: E501
298
+
299
+ _response_types_map = {
300
+ '200': "TrainingDTO",
301
+ }
302
+
303
+ return self.api_client.call_api(
304
+ '/api/training/current', 'GET',
305
+ _path_params,
306
+ _query_params,
307
+ _header_params,
308
+ body=_body_params,
309
+ post_params=_form_params,
310
+ files=_files,
311
+ response_types_map=_response_types_map,
312
+ auth_settings=_auth_settings,
313
+ async_req=_params.get('async_req'),
314
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
315
+ _preload_content=_params.get('_preload_content', True),
316
+ _request_timeout=_params.get('_request_timeout'),
317
+ collection_formats=_collection_formats,
318
+ _request_auth=_params.get('_request_auth'))