malevich-coretools 0.3.41__py3-none-any.whl → 0.3.43__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.

@@ -23,7 +23,9 @@ from malevich_coretools.batch import Batcher
23
23
  from malevich_coretools.funcs.checks import check_profile_mode
24
24
  from malevich_coretools.funcs.funcs import (
25
25
  post_collections_data,
26
+ post_collections_data_async,
26
27
  post_collections_data_id,
28
+ post_collections_data_id_async,
27
29
  )
28
30
  from malevich_coretools.secondary import Config, to_json
29
31
 
@@ -98,6 +100,7 @@ def create_collection_from_df(
98
100
  name: Optional[str],
99
101
  metadata: Optional[Union[Dict[str, Any], str]],
100
102
  batcher: Optional[Batcher] = None,
103
+ is_async: bool = False,
101
104
  *args,
102
105
  **kwargs
103
106
  ) -> Alias.Id:
@@ -106,6 +109,8 @@ def create_collection_from_df(
106
109
  data = raw_collection_from_df(data, name, metadata)
107
110
  if batcher is not None:
108
111
  return batcher.add("postCollectionByDocs", data=data)
112
+ if is_async:
113
+ return post_collections_data_async(data, *args, **kwargs)
109
114
  return post_collections_data(data, *args, **kwargs)
110
115
 
111
116
 
@@ -115,6 +120,7 @@ def update_collection_from_df(
115
120
  name: Optional[str],
116
121
  metadata: Optional[Union[Dict[str, Any], str]],
117
122
  batcher: Optional[Batcher] = None,
123
+ is_async: bool = False,
118
124
  *args,
119
125
  **kwargs
120
126
  ) -> Alias.Id:
@@ -123,6 +129,8 @@ def update_collection_from_df(
123
129
  data = raw_collection_from_df(data, name, metadata)
124
130
  if batcher is not None:
125
131
  return batcher.add("postCollectionByDocsAndId", data=data, vars={"id": id})
132
+ if is_async:
133
+ return post_collections_data_id_async(id, data, *args, **kwargs)
126
134
  return post_collections_data_id(id, data, *args, **kwargs)
127
135
 
128
136
 
@@ -15,7 +15,7 @@ LONG_SLEEP_TIME = 1 # second
15
15
  WAIT_RESULT_TIMEOUT = 60 * 60 # hour
16
16
  AIOHTTP_TIMEOUT = aiohttp.ClientTimeout(total=60 * 10) # 10 min
17
17
  AIOHTTP_TIMEOUT_MINI = aiohttp.ClientTimeout(total=60 * 5) # 5 min
18
- POSSIBLE_APPS_PLATFORMS = {"base", "vast"}
18
+ POSSIBLE_APPS_PLATFORMS = {"base", "vast", "ws"}
19
19
  SCHEME_PATTERN = r"[a-zA-Z_]\w+"
20
20
 
21
21
  # endpoints