malevich-coretools 0.3.60__py3-none-any.whl → 0.3.62__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 malevich-coretools might be problematic. Click here for more details.

@@ -139,12 +139,8 @@ class ScaleInfo(BaseModel):
139
139
 
140
140
 
141
141
  class TaskComponent(BaseModel):
142
- appControl: Optional[str] = None
143
- control: Optional[str] = None
144
- extra: Optional[str] = None
145
- internal: Optional[str] = None
142
+ main: Optional[str] = None
146
143
  keyValue: Optional[str] = None
147
- minimal: Optional[str] = None
148
144
  objectStorage: Optional[str] = None
149
145
 
150
146
 
@@ -504,6 +500,24 @@ class OperationOrNone(BaseModel):
504
500
  operationId: Optional[Alias.Id] = None
505
501
 
506
502
 
503
+ class AdminRunInfoReq(OperationOrNone):
504
+ dmId: Optional[str] = None
505
+
506
+
507
+ class AdminDMRegister(BaseModel):
508
+ id: int
509
+ url: Optional[str]
510
+ secret: Optional[str]
511
+ appSecret: Optional[str]
512
+ login: Optional[str]
513
+ actuaryDMId: Optional[int]
514
+
515
+
516
+ class AdminDMUnregister(BaseModel):
517
+ id: str
518
+ actuaryDMId: Optional[int]
519
+
520
+
507
521
  class AdminStopOperation(BaseModel):
508
522
  operationId: Optional[Alias.Id] = None
509
523
  withLogs: bool
@@ -1,54 +1,245 @@
1
+ from typing import Coroutine, Literal, Union, overload
2
+
1
3
  import malevich_coretools.funcs.funcs as f
2
4
  from malevich_coretools.abstract import * # noqa: F403
3
5
  from malevich_coretools.batch import Batcher
4
6
  from malevich_coretools.secondary import Config
5
7
 
6
8
 
9
+ @overload
7
10
  def admin_get_runs(
8
11
  *,
9
12
  auth: Optional[AUTH] = None,
10
13
  conn_url: Optional[str] = None,
11
14
  batcher: Optional[Batcher] = None,
15
+ is_async: Literal[False] = False,
12
16
  ) -> AdminRunsInfo:
17
+ pass
18
+
19
+
20
+ @overload
21
+ def admin_get_runs(
22
+ *,
23
+ auth: Optional[AUTH] = None,
24
+ conn_url: Optional[str] = None,
25
+ batcher: Optional[Batcher] = None,
26
+ is_async: Literal[True],
27
+ ) -> Coroutine[Any, Any, AdminRunsInfo]:
28
+ pass
29
+
30
+
31
+ def admin_get_runs(
32
+ *,
33
+ auth: Optional[AUTH] = None,
34
+ conn_url: Optional[str] = None,
35
+ batcher: Optional[Batcher] = None,
36
+ is_async: bool = False,
37
+ ) -> Union[AdminRunsInfo, Coroutine[Any, Any, AdminRunsInfo]]:
13
38
  """return info about all runs"""
14
39
  if batcher is None:
15
40
  batcher = Config.BATCHER
16
41
  if batcher is not None:
17
42
  return batcher.add("getAllRuns", result_model=AdminRunsInfo)
43
+ if is_async:
44
+ return f.get_admin_runs_async(auth=auth, conn_url=conn_url)
18
45
  return f.get_admin_runs(auth=auth, conn_url=conn_url)
19
46
 
20
47
 
48
+ @overload
21
49
  def admin_get_run_info(
22
50
  id: Alias.Id,
23
51
  *,
52
+ dm_id: Optional[str] = None,
24
53
  auth: Optional[AUTH] = None,
25
54
  conn_url: Optional[str] = None,
26
55
  batcher: Optional[Batcher] = None,
56
+ is_async: Literal[False] = False,
27
57
  ) -> Alias.Json:
58
+ pass
59
+
60
+
61
+ @overload
62
+ def admin_get_run_info(
63
+ id: Alias.Id,
64
+ *,
65
+ dm_id: Optional[str] = None,
66
+ auth: Optional[AUTH] = None,
67
+ conn_url: Optional[str] = None,
68
+ batcher: Optional[Batcher] = None,
69
+ is_async: Literal[True],
70
+ ) -> Coroutine[Any, Any, Alias.Json]:
71
+ pass
72
+
73
+
74
+ def admin_get_run_info(
75
+ id: Alias.Id,
76
+ *,
77
+ dm_id: Optional[str] = None,
78
+ auth: Optional[AUTH] = None,
79
+ conn_url: Optional[str] = None,
80
+ batcher: Optional[Batcher] = None,
81
+ is_async: bool = False,
82
+ ) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
28
83
  """return run info by operation `id`"""
29
84
  if batcher is None:
30
85
  batcher = Config.BATCHER
31
- data = OperationOrNone(operationId=id)
86
+ data = AdminRunInfoReq(operationId=id, dmId=dm_id)
32
87
  if batcher is not None:
33
88
  return batcher.add("getRunInfo", data=data)
89
+ if is_async:
90
+ return f.get_admin_runs_info_async(data, auth=auth, conn_url=conn_url)
34
91
  return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
35
92
 
36
93
 
94
+ @overload
37
95
  def admin_get_runs_info(
38
96
  *,
97
+ dm_id: Optional[str] = None,
39
98
  auth: Optional[AUTH] = None,
40
99
  conn_url: Optional[str] = None,
41
100
  batcher: Optional[Batcher] = None,
101
+ is_async: Literal[False] = False,
42
102
  ) -> Alias.Json:
103
+ pass
104
+
105
+
106
+ @overload
107
+ def admin_get_runs_info(
108
+ *,
109
+ dm_id: Optional[str] = None,
110
+ auth: Optional[AUTH] = None,
111
+ conn_url: Optional[str] = None,
112
+ batcher: Optional[Batcher] = None,
113
+ is_async: Literal[True],
114
+ ) -> Coroutine[Any, Any, Alias.Json]:
115
+ pass
116
+
117
+
118
+ def admin_get_runs_info(
119
+ *,
120
+ dm_id: Optional[str] = None,
121
+ auth: Optional[AUTH] = None,
122
+ conn_url: Optional[str] = None,
123
+ batcher: Optional[Batcher] = None,
124
+ is_async: bool = False,
125
+ ) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
43
126
  """return json: dm id -> info about its runs"""
44
127
  if batcher is None:
45
128
  batcher = Config.BATCHER
46
- data = OperationOrNone()
129
+ data = AdminRunInfoReq(dmId=dm_id)
47
130
  if batcher is not None:
48
131
  return batcher.add("getRunInfo", data=data)
132
+ if is_async:
133
+ return f.get_admin_runs_info_async(data, auth=auth, conn_url=conn_url)
49
134
  return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
50
135
 
51
136
 
137
+ @overload
138
+ def admin_dm_register(
139
+ id: Optional[int] = None,
140
+ url: Optional[str] = None,
141
+ secret: Optional[str] = None,
142
+ app_secret: Optional[str] = None,
143
+ login: Optional[str] = None,
144
+ actuary_dm_id: Optional[int] = None,
145
+ *,
146
+ auth: Optional[AUTH] = None,
147
+ conn_url: Optional[str] = None,
148
+ batcher: Optional[Batcher] = None,
149
+ is_async: Literal[False] = False,
150
+ ) -> None:
151
+ pass
152
+
153
+
154
+ @overload
155
+ def admin_dm_register(
156
+ id: Optional[int] = None,
157
+ url: Optional[str] = None,
158
+ secret: Optional[str] = None,
159
+ app_secret: Optional[str] = None,
160
+ login: Optional[str] = None,
161
+ actuary_dm_id: Optional[int] = None,
162
+ *,
163
+ auth: Optional[AUTH] = None,
164
+ conn_url: Optional[str] = None,
165
+ batcher: Optional[Batcher] = None,
166
+ is_async: Literal[True],
167
+ ) -> Coroutine[Any, Any, None]:
168
+ pass
169
+
170
+
171
+ def admin_dm_register(
172
+ id: Optional[int] = None,
173
+ url: Optional[str] = None,
174
+ secret: Optional[str] = None,
175
+ app_secret: Optional[str] = None,
176
+ login: Optional[str] = None,
177
+ actuary_dm_id: Optional[int] = None,
178
+ *,
179
+ auth: Optional[AUTH] = None,
180
+ conn_url: Optional[str] = None,
181
+ batcher: Optional[Batcher] = None,
182
+ is_async: bool = False,
183
+ ) -> Union[None, Coroutine[Any, Any, None]]:
184
+ assert id is not None or (url is not None and secret is not None and app_secret is not None and login is not None), "id or url & secret & app_secret & login should set"
185
+ if batcher is None:
186
+ batcher = Config.BATCHER
187
+ data = AdminDMRegister(id=id, url=url, secret=secret, appSecret=app_secret, login=login, actuaryDMId=actuary_dm_id)
188
+ if batcher is not None:
189
+ return batcher.add("postDMRegister", data=data)
190
+ if is_async:
191
+ return f.post_admin_dm_register_async(data, auth=auth, conn_url=conn_url)
192
+ return f.post_admin_dm_register(data, auth=auth, conn_url=conn_url)
193
+
194
+
195
+ @overload
196
+ def admin_dm_unregister(
197
+ id: Union[str, int] = 0,
198
+ actuary_dm_id: Optional[int] = None,
199
+ *,
200
+ auth: Optional[AUTH] = None,
201
+ conn_url: Optional[str] = None,
202
+ batcher: Optional[Batcher] = None,
203
+ is_async: Literal[False] = False,
204
+ ) -> None:
205
+ pass
206
+
207
+
208
+ @overload
209
+ def admin_dm_unregister(
210
+ id: Union[str, int] = 0,
211
+ actuary_dm_id: Optional[int] = None,
212
+ *,
213
+ auth: Optional[AUTH] = None,
214
+ conn_url: Optional[str] = None,
215
+ batcher: Optional[Batcher] = None,
216
+ is_async: Literal[True],
217
+ ) -> Coroutine[Any, Any, None]:
218
+ pass
219
+
220
+
221
+ def admin_dm_unregister(
222
+ id: Union[str, int] = 0, # id or login
223
+ actuary_dm_id: Optional[int] = None,
224
+ *,
225
+ auth: Optional[AUTH] = None,
226
+ conn_url: Optional[str] = None,
227
+ batcher: Optional[Batcher] = None,
228
+ is_async: bool = False,
229
+ ) -> Union[None, Coroutine[Any, Any, None]]:
230
+ if isinstance(id, int):
231
+ id = f'{id:05d}'
232
+ if batcher is None:
233
+ batcher = Config.BATCHER
234
+ data = AdminDMUnregister(id=id, actuaryDMId=actuary_dm_id)
235
+ if batcher is not None:
236
+ return batcher.add("deleteDMRegister", data=data)
237
+ if is_async:
238
+ return f.delete_admin_dm_register_async(data, auth=auth, conn_url=conn_url)
239
+ return f.delete_admin_dm_register(data, auth=auth, conn_url=conn_url)
240
+
241
+
242
+ @overload
52
243
  def admin_update_superuser(
53
244
  login: str,
54
245
  is_superuser: bool = True,
@@ -56,16 +247,45 @@ def admin_update_superuser(
56
247
  auth: Optional[AUTH] = None,
57
248
  conn_url: Optional[str] = None,
58
249
  batcher: Optional[Batcher] = None,
250
+ is_async: Literal[False] = False,
59
251
  ) -> Alias.Info:
252
+ pass
253
+
254
+
255
+ @overload
256
+ def admin_update_superuser(
257
+ login: str,
258
+ is_superuser: bool = True,
259
+ *,
260
+ auth: Optional[AUTH] = None,
261
+ conn_url: Optional[str] = None,
262
+ batcher: Optional[Batcher] = None,
263
+ is_async: Literal[True],
264
+ ) -> Coroutine[Any, Any, Alias.Info]:
265
+ pass
266
+
267
+
268
+ def admin_update_superuser(
269
+ login: str,
270
+ is_superuser: bool = True,
271
+ *,
272
+ auth: Optional[AUTH] = None,
273
+ conn_url: Optional[str] = None,
274
+ batcher: Optional[Batcher] = None,
275
+ is_async: bool = False,
276
+ ) -> Union[Alias.Info, Coroutine[Any, Any, Alias.Info]]:
60
277
  """update user role by login"""
61
278
  if batcher is None:
62
279
  batcher = Config.BATCHER
63
280
  data = Superuser(login=login, isSuperuser=is_superuser)
64
281
  if batcher is not None:
65
282
  return batcher.add("postUpdateSuperuser", data=data)
283
+ if is_async:
284
+ return f.post_admin_update_superuser_async(data, auth=auth, conn_url=conn_url)
66
285
  return f.post_admin_update_superuser(data, auth=auth, conn_url=conn_url)
67
286
 
68
287
 
288
+ @overload
69
289
  def admin_delete_run(
70
290
  id: Alias.Id,
71
291
  withLogs: bool = False,
@@ -73,27 +293,82 @@ def admin_delete_run(
73
293
  auth: Optional[AUTH] = None,
74
294
  conn_url: Optional[str] = None,
75
295
  batcher: Optional[Batcher] = None,
296
+ is_async: Literal[False] = False,
76
297
  ) -> Alias.Json:
298
+ pass
299
+
300
+
301
+ @overload
302
+ def admin_delete_run(
303
+ id: Alias.Id,
304
+ withLogs: bool = False,
305
+ *,
306
+ auth: Optional[AUTH] = None,
307
+ conn_url: Optional[str] = None,
308
+ batcher: Optional[Batcher] = None,
309
+ is_async: Literal[True],
310
+ ) -> Coroutine[Any, Any, Alias.Json]:
311
+ pass
312
+
313
+
314
+ def admin_delete_run(
315
+ id: Alias.Id,
316
+ withLogs: bool = False,
317
+ *,
318
+ auth: Optional[AUTH] = None,
319
+ conn_url: Optional[str] = None,
320
+ batcher: Optional[Batcher] = None,
321
+ is_async: bool = False,
322
+ ) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
77
323
  """delete run by operation `id`"""
78
324
  if batcher is None:
79
325
  batcher = Config.BATCHER
80
326
  data = AdminStopOperation(operationId=id, withLogs=withLogs)
81
327
  if batcher is not None:
82
328
  return batcher.add("deleteRuns", data=data)
329
+ if is_async:
330
+ return f.delete_admin_runs_async(data, auth=auth, conn_url=conn_url)
83
331
  return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
84
332
 
85
333
 
334
+ @overload
86
335
  def admin_delete_runs(
87
336
  withLogs: bool = False,
88
337
  *,
89
338
  auth: Optional[AUTH] = None,
90
339
  conn_url: Optional[str] = None,
91
340
  batcher: Optional[Batcher] = None,
341
+ is_async: Literal[False] = False,
92
342
  ) -> Alias.Json:
343
+ pass
344
+
345
+
346
+ @overload
347
+ def admin_delete_runs(
348
+ withLogs: bool = False,
349
+ *,
350
+ auth: Optional[AUTH] = None,
351
+ conn_url: Optional[str] = None,
352
+ batcher: Optional[Batcher] = None,
353
+ is_async: Literal[True],
354
+ ) -> Coroutine[Any, Any, Alias.Json]:
355
+ pass
356
+
357
+
358
+ def admin_delete_runs(
359
+ withLogs: bool = False,
360
+ *,
361
+ auth: Optional[AUTH] = None,
362
+ conn_url: Optional[str] = None,
363
+ batcher: Optional[Batcher] = None,
364
+ is_async: bool = False,
365
+ ) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
93
366
  """delete all runs"""
94
367
  if batcher is None:
95
368
  batcher = Config.BATCHER
96
369
  data = AdminStopOperation(withLogs=withLogs)
97
370
  if batcher is not None:
98
371
  return batcher.add("deleteRuns", data=data)
372
+ if is_async:
373
+ return f.delete_admin_runs_async(data, auth=auth, conn_url=conn_url)
99
374
  return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
@@ -1114,14 +1114,30 @@ async def get_admin_runs_async(*args, **kwargs) -> AdminRunsInfo:
1114
1114
  return model_from_json(await send_to_core_get_async(ADMIN_RUNS, *args, **kwargs), AdminRunsInfo)
1115
1115
 
1116
1116
 
1117
- def get_admin_runs_info(data: OperationOrNone, *args, **kwargs) -> Alias.Json:
1117
+ def get_admin_runs_info(data: AdminRunInfoReq, *args, **kwargs) -> Alias.Json:
1118
1118
  return send_to_core_modify(ADMIN_RUNS_INFO, data, *args, **kwargs)
1119
1119
 
1120
1120
 
1121
- async def get_admin_runs_info_async(data: OperationOrNone, *args, **kwargs) -> Alias.Json:
1121
+ async def get_admin_runs_info_async(data: AdminRunInfoReq, *args, **kwargs) -> Alias.Json:
1122
1122
  return await send_to_core_modify_async(ADMIN_RUNS_INFO, data, *args, **kwargs)
1123
1123
 
1124
1124
 
1125
+ def post_admin_dm_register(data: AdminDMRegister, *args, **kwargs) -> None:
1126
+ return send_to_core_modify(ADMIN_DM_REGISTER, data, *args, **kwargs)
1127
+
1128
+
1129
+ async def post_admin_dm_register_async(data: AdminDMRegister, *args, **kwargs) -> None:
1130
+ return await send_to_core_modify_async(ADMIN_DM_REGISTER, data, *args, **kwargs)
1131
+
1132
+
1133
+ def delete_admin_dm_register(data: AdminDMUnregister, *args, **kwargs) -> None:
1134
+ return send_to_core_modify(ADMIN_DM_REGISTER, data, *args, **kwargs, is_post=False)
1135
+
1136
+
1137
+ async def delete_admin_dm_register_async(data: AdminDMUnregister, *args, **kwargs) -> None:
1138
+ return await send_to_core_modify_async(ADMIN_DM_REGISTER, data, *args, **kwargs, is_post=False)
1139
+
1140
+
1125
1141
  def post_admin_update_superuser(data: Superuser, *args, **kwargs) -> Alias.Info:
1126
1142
  return send_to_core_modify(ADMIN_SUPERUSER, data, *args, **kwargs)
1127
1143
 
@@ -1222,14 +1238,22 @@ async def get_image_info_async(data: JsonImage, parse: bool, *args, **kwargs) ->
1222
1238
  return res
1223
1239
 
1224
1240
 
1225
- def get_task_schedules(data: Operation, with_show: bool, *args, **kwargs) -> Schedules:
1241
+ def get_task_schedules(*args, **kwargs) -> ResultIds:
1242
+ return model_from_json(send_to_core_get(MANAGER_TASK_SCHEDULES, *args, **kwargs), ResultIds)
1243
+
1244
+
1245
+ async def get_task_schedules_async(*args, **kwargs) -> ResultIds:
1246
+ return model_from_json(await send_to_core_get_async(MANAGER_TASK_SCHEDULES, *args, **kwargs), ResultIds)
1247
+
1248
+
1249
+ def post_task_schedules(data: Operation, with_show: bool, *args, **kwargs) -> Schedules:
1226
1250
  res = model_from_json(send_to_core_modify(MANAGER_TASK_SCHEDULES, data, with_show=False, *args, **kwargs), Schedules)
1227
1251
  if with_show:
1228
1252
  Config.logger.info(res)
1229
1253
  return res
1230
1254
 
1231
1255
 
1232
- async def get_task_schedules_async(data: Operation, with_show: bool, *args, **kwargs) -> Schedules:
1256
+ async def post_task_schedules_async(data: Operation, with_show: bool, *args, **kwargs) -> Schedules:
1233
1257
  res = model_from_json(await send_to_core_modify_async(MANAGER_TASK_SCHEDULES, data, with_show=False, *args, **kwargs), Schedules)
1234
1258
  if with_show:
1235
1259
  Config.logger.info(res)
@@ -287,21 +287,13 @@ def create_user_config(
287
287
 
288
288
 
289
289
  def create_task_component(
290
- app_control: Optional[str] = None,
291
- control: Optional[str] = None,
292
- extra: Optional[str] = None,
293
- internal: Optional[str] = None,
290
+ main: Optional[str] = None,
294
291
  key_value: Optional[str] = None,
295
- minimal: Optional[str] = None,
296
292
  object_storage: Optional[str] = None,
297
293
  ) -> TaskComponent:
298
294
  return TaskComponent(
299
- appControl=app_control,
300
- control=control,
301
- extra=extra,
302
- internal=internal,
295
+ main=main,
303
296
  keyValue=key_value,
304
- minimal=minimal,
305
297
  objectStorage=object_storage
306
298
  )
307
299
 
@@ -39,13 +39,13 @@ def with_key_values(url: str, key_values: Dict[str, Optional[str]]) -> str:
39
39
 
40
40
  ## DocsController
41
41
  DOCS_MAIN = f"{API_VERSION}/docs"
42
- DOCS = lambda wait: with_wait(f"{DOCS_MAIN}/", wait)
42
+ DOCS = lambda wait: with_wait(DOCS_MAIN, wait)
43
43
  DOCS_ID = lambda id, wait: with_wait(f"{DOCS_MAIN}/{id}", wait)
44
44
  DOCS_NAME = lambda name, wait: with_wait(f"{DOCS_MAIN}/name/{name}", wait)
45
45
 
46
46
  ## CollectionsController
47
47
  COLLECTIONS_MAIN = f"{API_VERSION}/collections"
48
- COLLECTIONS = lambda wait: with_wait(f"{COLLECTIONS_MAIN}/", wait)
48
+ COLLECTIONS = lambda wait: with_wait(COLLECTIONS_MAIN, wait)
49
49
  COLLECTIONS_IDS_NAME = lambda name, operation_id, run_id: with_key_values(f"{COLLECTIONS_MAIN}/ids/name/{urllib.parse.quote(str(name), safe='')}", {"operationId": operation_id, "runId": run_id})
50
50
  COLLECTIONS_NAME = lambda name, operation_id, run_id, offset, limit: with_key_values(f"{COLLECTIONS_MAIN}/name/{urllib.parse.quote(str(name), safe='')}", {"operationId": operation_id, "runId": run_id, "offset": offset, "limit": limit})
51
51
  COLLECTIONS_IDS_GROUP_NAME = lambda name, operation_id, run_id: with_key_values(f"{COLLECTIONS_MAIN}/ids/groupName/{urllib.parse.quote(str(name), safe='')}", {"operationId": operation_id, "runId": run_id})
@@ -67,7 +67,7 @@ COLLECTIONS_METADATA = lambda id, wait: with_wait(f"{COLLECTIONS_MAIN}/{urllib.p
67
67
  COLLECTION_OBJECTS_MAIN = f"{API_VERSION}/collectionObjects"
68
68
  COLLECTION_OBJECTS_ALL_GET = lambda path, recursive: with_key_values(f"{COLLECTION_OBJECTS_MAIN}/all", {"path": path, "recursive": recursive})
69
69
  COLLECTION_OBJECTS_ALL = lambda wait: with_wait(f"{COLLECTION_OBJECTS_MAIN}/all", wait)
70
- COLLECTION_OBJECTS_PATH = lambda path, wait, zip: with_key_values(f"{COLLECTION_OBJECTS_MAIN}/", {"path": path, "wait": None if wait is None else bool_to_str(wait), "zip": None if zip is None else bool_to_str(zip)})
70
+ COLLECTION_OBJECTS_PATH = lambda path, wait, zip: with_key_values(COLLECTION_OBJECTS_MAIN, {"path": path, "wait": None if wait is None else bool_to_str(wait), "zip": None if zip is None else bool_to_str(zip)})
71
71
  COLLECTION_OBJECTS_PRESIGN_PUT = lambda path, callback_url, expires_in, wait: with_key_values(f"{COLLECTION_OBJECTS_MAIN}/presign/put", {"path": path, "callback_url": callback_url, "expiresIn": expires_in, "wait": bool_to_str(wait)})
72
72
  COLLECTION_OBJECTS_PRESIGN_GET = lambda path, callback_url, expires_in, wait: with_key_values(f"{COLLECTION_OBJECTS_MAIN}/presign/get", {"path": path, "callback_url": callback_url, "expiresIn": expires_in, "wait": bool_to_str(wait)})
73
73
  COLLECTION_OBJECTS_PRESIGN = lambda signature, zip: with_key_values(f"{COLLECTION_OBJECTS_MAIN}/presign", {"signature": signature, "zip": None if zip is None else bool_to_str(zip)})
@@ -84,7 +84,7 @@ ENDPOINTS_RESUME = lambda hash, wait: with_wait(f"{ENDPOINTS_MAIN}/resume/{urlli
84
84
 
85
85
  ## SchemeController
86
86
  SCHEMES_MAIN = f"{API_VERSION}/schemes"
87
- SCHEMES = lambda wait: with_wait(f"{SCHEMES_MAIN}/", wait)
87
+ SCHEMES = lambda wait: with_wait(SCHEMES_MAIN, wait)
88
88
  SCHEMES_ID = lambda id, wait: with_wait(f"{SCHEMES_MAIN}/{urllib.parse.quote(str(id), safe='')}", wait)
89
89
  SCHEMES_ID_RAW = lambda id: f"{SCHEMES_MAIN}/{urllib.parse.quote(str(id), safe='')}/raw"
90
90
  SCHEMES_MAPPING = lambda wait: with_wait(f"{SCHEMES_MAIN}/mapping", wait)
@@ -100,7 +100,7 @@ PING = "ping"
100
100
 
101
101
  ## UserShareController
102
102
  SHARE_MAIN = f"{API_VERSION}/share"
103
- SHARE = lambda wait: with_wait(f"{SHARE_MAIN}/", wait)
103
+ SHARE = lambda wait: with_wait(SHARE_MAIN, wait)
104
104
  SHARE_COLLECTION_ID = lambda id, wait: with_wait(f"{SHARE_MAIN}/collection/{urllib.parse.quote(str(id), safe='')}", wait)
105
105
  SHARE_SCHEME_ID = lambda id, wait: with_wait(f"{SHARE_MAIN}/scheme/{urllib.parse.quote(str(id), safe='')}", wait)
106
106
  SHARE_USER_APP_ID = lambda id, wait: with_wait(f"{SHARE_MAIN}/userApp/{urllib.parse.quote(str(id), safe='')}", wait)
@@ -109,13 +109,13 @@ SHARE_ALL = lambda wait: with_wait(f"{SHARE_MAIN}/all", wait)
109
109
 
110
110
  ## RegistrationController
111
111
  REGISTER_MAIN = f"{API_VERSION}/register"
112
- REGISTER = f"{REGISTER_MAIN}/"
112
+ REGISTER = REGISTER_MAIN
113
113
  REGISTER_LOGIN = lambda login, wait: with_wait(f"{REGISTER_MAIN}/login/{urllib.parse.quote(str(login), safe='')}", wait)
114
114
  REGISTER_ALL = f"{REGISTER_MAIN}/all"
115
115
 
116
116
  ## UserAppsController
117
117
  USER_APPS_MAIN = f"{API_VERSION}/userApps"
118
- USER_APPS = lambda wait: with_wait(f"{USER_APPS_MAIN}/", wait)
118
+ USER_APPS = lambda wait: with_wait(USER_APPS_MAIN, wait)
119
119
  USER_APPS_REAL_IDS = f"{USER_APPS_MAIN}/realIds"
120
120
  USER_APPS_MAP_IDS = f"{USER_APPS_MAIN}/mapIds"
121
121
  USER_APPS_MAP_ID = lambda id: f"{USER_APPS_MAIN}/mapIds/{urllib.parse.quote(str(id), safe='')}"
@@ -124,7 +124,7 @@ USER_APPS_REAL_ID = lambda id: f"{USER_APPS_MAIN}/realIds/{urllib.parse.quote(st
124
124
 
125
125
  ## UserTasksController
126
126
  USER_TASKS_MAIN = f"{API_VERSION}/userTasks"
127
- USER_TASKS = lambda wait: with_wait(f"{USER_TASKS_MAIN}/", wait)
127
+ USER_TASKS = lambda wait: with_wait(USER_TASKS_MAIN, wait)
128
128
  USER_TASKS_REAL_IDS = f"{USER_TASKS_MAIN}/realIds"
129
129
  USER_TASKS_MAP_IDS = f"{USER_TASKS_MAIN}/mapIds"
130
130
  USER_TASKS_MAP_ID = lambda id: f"{USER_TASKS_MAIN}/mapIds/{urllib.parse.quote(str(id), safe='')}"
@@ -133,7 +133,7 @@ USER_TASKS_REAL_ID = lambda id: f"{USER_TASKS_MAIN}/realIds/{urllib.parse.quote(
133
133
 
134
134
  ## UserPipelinesController
135
135
  USER_PIPELINES_MAIN = f"{API_VERSION}/userPipelines"
136
- USER_PIPELINES = lambda wait: with_wait(f"{USER_PIPELINES_MAIN}/", wait)
136
+ USER_PIPELINES = lambda wait: with_wait(USER_PIPELINES_MAIN, wait)
137
137
  USER_PIPELINES_REAL_IDS = f"{USER_PIPELINES_MAIN}/realIds"
138
138
  USER_PIPELINES_MAP_IDS = f"{USER_PIPELINES_MAIN}/mapIds"
139
139
  USER_PIPELINES_MAP_ID = lambda id: f"{USER_PIPELINES_MAIN}/mapIds/{urllib.parse.quote(str(id), safe='')}"
@@ -144,7 +144,7 @@ USER_PIPELINES_TAG_REAL_IDS = lambda tag: f"{USER_PIPELINES_MAIN}/realIds/tagSea
144
144
 
145
145
  ## UserCfgsController
146
146
  USER_CFGS_MAIN = f"{API_VERSION}/userCfgs"
147
- USER_CFGS = lambda wait: with_wait(f"{USER_CFGS_MAIN}/", wait)
147
+ USER_CFGS = lambda wait: with_wait(USER_CFGS_MAIN, wait)
148
148
  USER_CFGS_REAL_IDS = f"{USER_CFGS_MAIN}/realIds"
149
149
  USER_CFGS_MAP_IDS = f"{USER_CFGS_MAIN}/mapIds"
150
150
  USER_CFGS_MAP_ID = lambda id: f"{USER_CFGS_MAIN}/mapIds/{urllib.parse.quote(str(id), safe='')}"
@@ -153,7 +153,7 @@ USER_CFGS_REAL_ID = lambda id: f"{USER_CFGS_MAIN}/realIds/{urllib.parse.quote(st
153
153
 
154
154
  ## OperationResultsController
155
155
  OPERATION_RESULTS_MAIN = f"{API_VERSION}/operationResults"
156
- OPERATION_RESULTS = lambda wait: with_wait(f"{OPERATION_RESULTS_MAIN}/", wait)
156
+ OPERATION_RESULTS = lambda wait: with_wait(OPERATION_RESULTS_MAIN, wait)
157
157
  OPERATION_RESULTS_ID = lambda id, wait: with_wait(f"{OPERATION_RESULTS_MAIN}/{urllib.parse.quote(str(id), safe='')}", wait)
158
158
 
159
159
  ## TempRunController
@@ -168,6 +168,7 @@ TEMP_RUN_OPERATIONS_IDS = lambda taskId, cfgId: f"{TEMP_RUN_MAIN}/operationsIds/
168
168
  ADMIN_MAIN = f"{API_VERSION}/admin"
169
169
  ADMIN_RUNS = f"{ADMIN_MAIN}/runs"
170
170
  ADMIN_RUNS_INFO = f"{ADMIN_MAIN}/runs/info"
171
+ ADMIN_DM_REGISTER = f"{ADMIN_MAIN}/dm/register"
171
172
  ADMIN_SUPERUSER = f"{ADMIN_MAIN}/superuser"
172
173
 
173
174
  ## ManagerController
@@ -195,16 +196,16 @@ MANAGER_APP_PAUSE = lambda wait: with_wait(f"{MANAGER_MAIN}/app/pause", wait)
195
196
 
196
197
  ## LimitsController
197
198
  LIMITS_MAIN = f"{API_VERSION}/limits"
198
- LIMITS = lambda wait: with_wait(f"{LIMITS_MAIN}/", wait)
199
+ LIMITS = lambda wait: with_wait(LIMITS_MAIN, wait)
199
200
  LIMITS_USER = lambda wait: with_wait(f"{LIMITS_MAIN}/user", wait)
200
201
 
201
202
  ## HandlerUrlController
202
203
  HANDLER_URL_MAIN = f"{API_VERSION}/handlerUrls"
203
- HANDLER_URL = lambda url, wait: with_key_values(f"{HANDLER_URL_MAIN}/", {"url": url, "wait": bool_to_str(wait)})
204
+ HANDLER_URL = lambda url, wait: with_key_values(HANDLER_URL_MAIN, {"url": url, "wait": bool_to_str(wait)})
204
205
 
205
206
  ## AnalyticsController
206
207
  ANALYTICS_MAIN = f"{API_VERSION}/analytics"
207
- ANALYTICS = lambda wait: with_wait(f"{ANALYTICS_MAIN}/", wait)
208
+ ANALYTICS = lambda wait: with_wait(ANALYTICS_MAIN, wait)
208
209
  ANALYTICS_MANY = lambda wait: with_wait(f"{ANALYTICS_MAIN}/many", wait)
209
210
  ANALYTICS_ID = lambda id, wait: with_wait(f"{ANALYTICS_MAIN}/{id}", wait)
210
211
  ANALYTICS_NAME = lambda name, wait: with_wait(f"{ANALYTICS_MAIN}/name/{name}", wait)
@@ -216,20 +217,20 @@ RUNS_INFO_LAST_FAILED = lambda count: with_key_values(f"{RUNS_INFO_MAIN}/lastFai
216
217
 
217
218
  ## WSAppsController
218
219
  WS_APPS_MAIN = f"{API_VERSION}/ws/apps"
219
- WS_APPS = lambda only_active, full: with_key_values(f"{WS_APPS_MAIN}/", {"onlyActive": only_active, "full": full})
220
- WS_APPS_ = lambda only_not_active, wait: with_key_values(f"{WS_APPS_MAIN}/", {"onlyNotActive": only_not_active, "wait": wait})
220
+ WS_APPS = lambda only_active, full: with_key_values(WS_APPS_MAIN, {"onlyActive": only_active, "full": full})
221
+ WS_APPS_ = lambda only_not_active, wait: with_key_values(WS_APPS_MAIN, {"onlyNotActive": only_not_active, "wait": wait})
221
222
  WS_APPS_ID = lambda id, wait: with_wait(f"{WS_APPS_MAIN}/{id}", wait)
222
223
 
223
224
  ## McpToolController
224
225
  MCP_TOOLS_MAIN = f"{API_VERSION}/tools"
225
- MCP_TOOLS = lambda id, name, wait: with_key_values(f"{MCP_TOOLS_MAIN}/", {"id": id, "name": name, "wait": wait})
226
+ MCP_TOOLS = lambda id, name, wait: with_key_values(MCP_TOOLS_MAIN, {"id": id, "name": name, "wait": wait})
226
227
  MCP_TOOLS_ALL = lambda wait: with_wait(f"{MCP_TOOLS_MAIN}/all", wait)
227
228
  MCP_TOOLS_LIST = f"{MCP_TOOLS_MAIN}/list"
228
229
  MCP_TOOLS_CALL = f"{MCP_TOOLS_MAIN}/call"
229
230
 
230
231
  ## AppErrorInfoController
231
232
  APP_ERROR_INFO_MAIN = f"{API_VERSION}/errors"
232
- APP_ERROR_INFO = lambda wait: with_wait(f"{APP_ERROR_INFO_MAIN}/", wait)
233
+ APP_ERROR_INFO = lambda wait: with_wait(APP_ERROR_INFO_MAIN, wait)
233
234
  APP_ERROR_INFO_ID = lambda operationId, wait: with_wait(f"{APP_ERROR_INFO_MAIN}/{operationId}", wait)
234
235
 
235
236
  ### Kafka
@@ -237,4 +238,4 @@ KAFKA_SEND = f"{MANAGER_MAIN}/kafkaMsg"
237
238
 
238
239
  ## BatchController
239
240
  BATCH_MAIN = f"{API_VERSION}/batch"
240
- BATCH = f"{BATCH_MAIN}/"
241
+ BATCH = BATCH_MAIN
@@ -57,7 +57,7 @@ def bool_to_str(b: bool) -> str:
57
57
  return "true" if b else "false"
58
58
 
59
59
 
60
- def __show_logs_result(res: LogsResult, i: Optional[int]): # noqa: ANN202
60
+ def __show_logs_result(res: LogsResult, i: Optional[int] = None): # noqa: ANN202
61
61
  if len(res.data) > 0:
62
62
  print(f"------- main ({i}):" if i is not None else "------- main:")
63
63
  print(res.data)
@@ -6735,7 +6735,7 @@ def get_task_schedules(
6735
6735
  conn_url: Optional[str] = None,
6736
6736
  batcher: Optional[Batcher] = None,
6737
6737
  is_async: Literal[False] = False,
6738
- ) -> Schedules:
6738
+ ) -> Union[Schedules, ResultIds]:
6739
6739
  pass
6740
6740
 
6741
6741
 
@@ -6748,32 +6748,39 @@ def get_task_schedules(
6748
6748
  conn_url: Optional[str] = None,
6749
6749
  batcher: Optional[Batcher] = None,
6750
6750
  is_async: Literal[True],
6751
- ) -> Coroutine[Any, Any, Schedules]:
6751
+ ) -> Coroutine[Any, Any, Union[Schedules, ResultIds]]:
6752
6752
  pass
6753
6753
 
6754
6754
 
6755
6755
  def get_task_schedules(
6756
- operation_id: str,
6756
+ operation_id: Optional[str] = None,
6757
6757
  with_show: bool = True,
6758
6758
  *,
6759
6759
  auth: Optional[AUTH] = None,
6760
6760
  conn_url: Optional[str] = None,
6761
6761
  batcher: Optional[Batcher] = None,
6762
6762
  is_async: bool = False,
6763
- ) -> Union[Schedules, Coroutine[Any, Any, Schedules]]:
6763
+ ) -> Union[ResultIds, Schedules, Coroutine[Any, Any, Schedules], Coroutine[Any, Any, ResultIds]]:
6764
6764
  """return schedule ids by `operation_id` """
6765
6765
  if batcher is None:
6766
6766
  batcher = Config.BATCHER
6767
- data = Operation(operationId=operation_id)
6768
- if batcher is not None:
6769
- return batcher.add("sendTaskSchedules", data=data, result_model=Schedules)
6770
- if is_async:
6771
- return f.get_task_schedules_async(
6767
+ if operation_id is None:
6768
+ if batcher is not None:
6769
+ return batcher.add("getTaskSchedules", result_model=ResultIds)
6770
+ if is_async:
6771
+ return f.get_task_schedules_async(auth=auth, conn_url=conn_url)
6772
+ return f.get_task_schedules(auth=auth, conn_url=conn_url)
6773
+ else:
6774
+ data = Operation(operationId=operation_id)
6775
+ if batcher is not None:
6776
+ return batcher.add("sendTaskSchedules", data=data, result_model=Schedules)
6777
+ if is_async:
6778
+ return f.post_task_schedules_async(
6779
+ data, with_show=with_show, auth=auth, conn_url=conn_url
6780
+ )
6781
+ return f.post_task_schedules(
6772
6782
  data, with_show=with_show, auth=auth, conn_url=conn_url
6773
6783
  )
6774
- return f.get_task_schedules(
6775
- data, with_show=with_show, auth=auth, conn_url=conn_url
6776
- )
6777
6784
 
6778
6785
 
6779
6786
  @overload
@@ -6834,7 +6841,6 @@ def task_full(
6834
6841
  pass
6835
6842
 
6836
6843
 
6837
- # FIXME check component
6838
6844
  def task_full(
6839
6845
  task_id: str,
6840
6846
  cfg_id: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: malevich-coretools
3
- Version: 0.3.60
3
+ Version: 0.3.62
4
4
  Author: Andrew Pogrebnoj
5
5
  Author-email: andrew@onjulius.co
6
6
  License-File: LICENSE
@@ -1,28 +1,28 @@
1
1
  malevich_coretools/__init__.py,sha256=DJtPESxkCZD2SbTZTrR_x0TKDQ4MJpmBqGw5YpKYidM,134
2
- malevich_coretools/utils.py,sha256=5PapAMSTWKTuubLZfPcRhAErQbUaY9eIwpnn0EHY_a8,275324
2
+ malevich_coretools/utils.py,sha256=9k2I7YMrLtSlfHWkhVuYWdtljZgWKnfJvFDdqexhx-I,275747
3
3
  malevich_coretools/abstract/__init__.py,sha256=6vQ08c8HPYyT_pPkKlc-EwQKE8xG3HTEo2p_GiI5rik,142
4
- malevich_coretools/abstract/abstract.py,sha256=S5yYRhzpqsiIEN083LqUJlvu0MZ9Z__DdOLhS5ZsPdc,17475
4
+ malevich_coretools/abstract/abstract.py,sha256=JZZwDux3RpJgDPVQa3-RjKFZfSceC00sn_aBxsKJeB8,17670
5
5
  malevich_coretools/abstract/operations.py,sha256=cWlo2xzW-rzkTInzpDjBYeL68KfLYqSpZJRzCQ4OzjA,3070
6
6
  malevich_coretools/abstract/pipeline.py,sha256=HwhYp5G9yaZYaeDypChfpNd2W-kmJQfM9I54uek0B9k,7914
7
7
  malevich_coretools/abstract/statuses.py,sha256=9ISSw_evsylBshLXoU44TCoFOrZm4bXIxyAFFDqdUWc,333
8
8
  malevich_coretools/admin/__init__.py,sha256=zdIcHs3T_NZ8HYWts-O7OpBEWHIu779QDZMGF5HRCLg,35
9
- malevich_coretools/admin/utils.py,sha256=jmqy8qODvPOg1qcY1pBPJWJCdAVGiOFTAFn6Ltyhsms,3015
9
+ malevich_coretools/admin/utils.py,sha256=mGu-zge5FHW2Z2TDhE3YOhOlw2x8NA2CV_XKsY-g4nE,10378
10
10
  malevich_coretools/batch/__init__.py,sha256=taxyZl8YOZd2EBd3leN6slzMkejUtjQ64Na31TcT3-I,165
11
11
  malevich_coretools/batch/utils.py,sha256=FRmCYU-zr-RjgT1Mo3CUNcB2mW1t_gKCJazcMx6aIW4,7719
12
12
  malevich_coretools/funcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  malevich_coretools/funcs/checks.py,sha256=Q5pRtRevQrGv_-SMbn2GgYnulhclDLBXdRtbw2QOYKU,223
14
- malevich_coretools/funcs/funcs.py,sha256=3qmzZcXGWrCujrWUMg1RAU7IxdGARm0AKAxMhtxf0aI,84920
15
- malevich_coretools/funcs/helpers.py,sha256=3-2s5-8hiBeslir8Qa1IgKkHwgYnjPG5w7Kog1e7dHI,13830
14
+ malevich_coretools/funcs/funcs.py,sha256=gG-vAXigztV15451X9Glx4XIn2wo19JHBWllkKyocVk,85942
15
+ malevich_coretools/funcs/helpers.py,sha256=nYbUdtAuSSa9VMr7Oy2y0yvEMLv9EI1jzGq6eynuNLU,13573
16
16
  malevich_coretools/secondary/__init__.py,sha256=048HqvG36_1WdDVZK_RuECmaf14Iq2fviUysG1inlaE,78
17
17
  malevich_coretools/secondary/config.py,sha256=hRlSJuPQnhKyt1wmOAJX_XmcliaO0fPGbW94AE_Mazs,463
18
- malevich_coretools/secondary/const.py,sha256=b_zCHD4yCHfupyDfJZpBPBbnjcvJ3Aqcqgllhe9AqG4,15435
19
- malevich_coretools/secondary/helpers.py,sha256=9zRU_EjESks_DbDxs6PjaubtKeJWTqOI_fCoTsEsP8w,7979
18
+ malevich_coretools/secondary/const.py,sha256=1x-49VxzVdtk064xn92gQnqlEfMuYAvWcz-vp3D6fO4,15369
19
+ malevich_coretools/secondary/helpers.py,sha256=V5xNv-Rt4SNkthTcNnMtYPjiYfoHmwUR8ApU8qFmzT0,7986
20
20
  malevich_coretools/secondary/kafka_utils.py,sha256=SIUnBFyfwsquN6MAUrEkKCw-1l7979Znl7OTQSX2UKo,989
21
21
  malevich_coretools/tools/__init__.py,sha256=jDxlCa5Dr6Y43qlI7JwsRAlBkKmFeTHTEnjNUvu-0iw,46
22
22
  malevich_coretools/tools/abstract.py,sha256=B1RW1FeNHrQ6r1k-cQZ4k4noCRXkIGt-JUwVoXEDkAg,4466
23
23
  malevich_coretools/tools/vast.py,sha256=63tvy70qQV9vnK0eWytlgjBGSnfA7l3kSIDgACBbMMs,12893
24
- malevich_coretools-0.3.60.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- malevich_coretools-0.3.60.dist-info/METADATA,sha256=zQpUhuk6_J_LV4GsHswQMESMUNZKMEzBcXgEN46THjo,347
26
- malevich_coretools-0.3.60.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- malevich_coretools-0.3.60.dist-info/top_level.txt,sha256=wDX3s1Tso0otBPNrFRfXqyNpm48W4Bp5v6JfbITO2Z8,19
28
- malevich_coretools-0.3.60.dist-info/RECORD,,
24
+ malevich_coretools-0.3.62.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ malevich_coretools-0.3.62.dist-info/METADATA,sha256=V99umI8hcAVVlU6TP_LspC-5F55VqF1Ss9fA1pDnpGo,347
26
+ malevich_coretools-0.3.62.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ malevich_coretools-0.3.62.dist-info/top_level.txt,sha256=wDX3s1Tso0otBPNrFRfXqyNpm48W4Bp5v6JfbITO2Z8,19
28
+ malevich_coretools-0.3.62.dist-info/RECORD,,