rapidata 2.41.1__py3-none-any.whl → 2.41.3__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 rapidata might be problematic. Click here for more details.

Files changed (45) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +4 -2
  3. rapidata/api_client/api/dataset_api.py +544 -0
  4. rapidata/api_client/api/order_api.py +1 -3
  5. rapidata/api_client/models/__init__.py +4 -2
  6. rapidata/api_client/models/compare_workflow_config.py +3 -3
  7. rapidata/api_client/models/compare_workflow_config_model.py +3 -3
  8. rapidata/api_client/models/compare_workflow_model.py +4 -4
  9. rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +1 -1
  10. rapidata/api_client/models/create_order_model_referee.py +12 -12
  11. rapidata/api_client/models/create_order_model_workflow.py +15 -15
  12. rapidata/api_client/models/early_stopping_referee_model.py +3 -3
  13. rapidata/api_client/models/elo_config_model.py +4 -4
  14. rapidata/api_client/models/evaluation_workflow_model.py +4 -4
  15. rapidata/api_client/models/existing_asset_input.py +100 -0
  16. rapidata/api_client/models/file_asset.py +3 -3
  17. rapidata/api_client/models/file_asset_metadata_value.py +296 -0
  18. rapidata/api_client/models/multi_asset.py +3 -3
  19. rapidata/api_client/models/multi_asset_input1_assets_inner.py +40 -12
  20. rapidata/api_client/models/multi_asset_input3_assets_inner.py +40 -12
  21. rapidata/api_client/models/multi_asset_input_assets_inner.py +40 -12
  22. rapidata/api_client/models/naive_referee_model.py +2 -2
  23. rapidata/api_client/models/null_asset.py +3 -3
  24. rapidata/api_client/models/online_pair_maker_config_model.py +3 -3
  25. rapidata/api_client/models/prompt_asset_metadata_input_asset.py +40 -12
  26. rapidata/api_client/models/reference_asset_input.py +100 -0
  27. rapidata/api_client/models/simple_workflow_model.py +5 -5
  28. rapidata/api_client/models/submit_prompt_model_prompt_asset.py +40 -12
  29. rapidata/api_client/models/text_asset.py +3 -3
  30. rapidata/api_client/models/upload_asset_result.py +102 -0
  31. rapidata/api_client_README.md +6 -2
  32. rapidata/rapidata_client/order/_rapidata_order_builder.py +4 -2
  33. rapidata/rapidata_client/order/rapidata_order_manager.py +8 -0
  34. rapidata/rapidata_client/settings/translation_behaviour.py +1 -1
  35. rapidata/rapidata_client/workflow/_classify_workflow.py +3 -3
  36. rapidata/rapidata_client/workflow/_compare_workflow.py +3 -3
  37. rapidata/rapidata_client/workflow/_draw_workflow.py +4 -3
  38. rapidata/rapidata_client/workflow/_free_text_workflow.py +3 -3
  39. rapidata/rapidata_client/workflow/_locate_workflow.py +4 -3
  40. rapidata/rapidata_client/workflow/_select_words_workflow.py +4 -3
  41. rapidata/rapidata_client/workflow/_timestamp_workflow.py +4 -3
  42. {rapidata-2.41.1.dist-info → rapidata-2.41.3.dist-info}/METADATA +4 -2
  43. {rapidata-2.41.1.dist-info → rapidata-2.41.3.dist-info}/RECORD +45 -41
  44. {rapidata-2.41.1.dist-info → rapidata-2.41.3.dist-info}/WHEEL +1 -1
  45. {rapidata-2.41.1.dist-info → rapidata-2.41.3.dist-info/licenses}/LICENSE +0 -0
rapidata/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.41.1"
1
+ __version__ = "2.41.3"
2
2
 
3
3
  from .rapidata_client import (
4
4
  RapidataClient,
@@ -107,7 +107,6 @@ from rapidata.api_client.models.compare_rapid_blueprint import CompareRapidBluep
107
107
  from rapidata.api_client.models.compare_result import CompareResult
108
108
  from rapidata.api_client.models.compare_truth import CompareTruth
109
109
  from rapidata.api_client.models.compare_workflow_config import CompareWorkflowConfig
110
- from rapidata.api_client.models.compare_workflow_config_metadata_value import CompareWorkflowConfigMetadataValue
111
110
  from rapidata.api_client.models.compare_workflow_config_model import CompareWorkflowConfigModel
112
111
  from rapidata.api_client.models.compare_workflow_config_model_pair_maker_config import CompareWorkflowConfigModelPairMakerConfig
113
112
  from rapidata.api_client.models.compare_workflow_config_pair_maker_config import CompareWorkflowConfigPairMakerConfig
@@ -179,6 +178,7 @@ from rapidata.api_client.models.empty_validation_truth import EmptyValidationTru
179
178
  from rapidata.api_client.models.evaluation_workflow_config import EvaluationWorkflowConfig
180
179
  from rapidata.api_client.models.evaluation_workflow_model import EvaluationWorkflowModel
181
180
  from rapidata.api_client.models.evaluation_workflow_model1 import EvaluationWorkflowModel1
181
+ from rapidata.api_client.models.existing_asset_input import ExistingAssetInput
182
182
  from rapidata.api_client.models.feature_flag import FeatureFlag
183
183
  from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
184
184
  from rapidata.api_client.models.feedback_model import FeedbackModel
@@ -190,6 +190,7 @@ from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1Fil
190
190
  from rapidata.api_client.models.file_asset_input2 import FileAssetInput2
191
191
  from rapidata.api_client.models.file_asset_input3 import FileAssetInput3
192
192
  from rapidata.api_client.models.file_asset_input_file import FileAssetInputFile
193
+ from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
193
194
  from rapidata.api_client.models.file_asset_model import FileAssetModel
194
195
  from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
195
196
  from rapidata.api_client.models.file_type import FileType
@@ -348,6 +349,7 @@ from rapidata.api_client.models.rapid_result_model_result import RapidResultMode
348
349
  from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
349
350
  from rapidata.api_client.models.rapid_state import RapidState
350
351
  from rapidata.api_client.models.read_bridge_token_keys_result import ReadBridgeTokenKeysResult
352
+ from rapidata.api_client.models.reference_asset_input import ReferenceAssetInput
351
353
  from rapidata.api_client.models.report_model import ReportModel
352
354
  from rapidata.api_client.models.response_count_filter import ResponseCountFilter
353
355
  from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
@@ -373,7 +375,6 @@ from rapidata.api_client.models.simple_workflow_config_model import SimpleWorkfl
373
375
  from rapidata.api_client.models.simple_workflow_config_model_blueprint import SimpleWorkflowConfigModelBlueprint
374
376
  from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
375
377
  from rapidata.api_client.models.simple_workflow_model1 import SimpleWorkflowModel1
376
- from rapidata.api_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
377
378
  from rapidata.api_client.models.skip_result import SkipResult
378
379
  from rapidata.api_client.models.skip_truth import SkipTruth
379
380
  from rapidata.api_client.models.sort_criterion import SortCriterion
@@ -430,6 +431,7 @@ from rapidata.api_client.models.update_should_alert_model import UpdateShouldAle
430
431
  from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
431
432
  from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
432
433
  from rapidata.api_client.models.update_validation_set_model import UpdateValidationSetModel
434
+ from rapidata.api_client.models.upload_asset_result import UploadAssetResult
433
435
  from rapidata.api_client.models.upload_coco_result import UploadCocoResult
434
436
  from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
435
437
  from rapidata.api_client.models.url_asset_input import UrlAssetInput
@@ -32,6 +32,7 @@ from rapidata.api_client.models.get_failed_datapoints_result import GetFailedDat
32
32
  from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
33
33
  from rapidata.api_client.models.query_model import QueryModel
34
34
  from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
35
+ from rapidata.api_client.models.upload_asset_result import UploadAssetResult
35
36
  from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
36
37
 
37
38
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
@@ -52,6 +53,549 @@ class DatasetApi:
52
53
  self.api_client = api_client
53
54
 
54
55
 
56
+ @validate_call
57
+ def dataset_asset_file_post(
58
+ self,
59
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to upload to S3.")] = None,
60
+ _request_timeout: Union[
61
+ None,
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Tuple[
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Annotated[StrictFloat, Field(gt=0)]
66
+ ]
67
+ ] = None,
68
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
69
+ _content_type: Optional[StrictStr] = None,
70
+ _headers: Optional[Dict[StrictStr, Any]] = None,
71
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
72
+ ) -> UploadAssetResult:
73
+ """Uploads a single asset to S3 and returns the asset details.
74
+
75
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
76
+
77
+ :param file: The file to upload to S3.
78
+ :type file: bytearray
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._dataset_asset_file_post_serialize(
102
+ file=file,
103
+ _request_auth=_request_auth,
104
+ _content_type=_content_type,
105
+ _headers=_headers,
106
+ _host_index=_host_index
107
+ )
108
+
109
+ _response_types_map: Dict[str, Optional[str]] = {
110
+ '200': "UploadAssetResult",
111
+ }
112
+ response_data = self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ def dataset_asset_file_post_with_http_info(
125
+ self,
126
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to upload to S3.")] = None,
127
+ _request_timeout: Union[
128
+ None,
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Tuple[
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Annotated[StrictFloat, Field(gt=0)]
133
+ ]
134
+ ] = None,
135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
136
+ _content_type: Optional[StrictStr] = None,
137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
139
+ ) -> ApiResponse[UploadAssetResult]:
140
+ """Uploads a single asset to S3 and returns the asset details.
141
+
142
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
143
+
144
+ :param file: The file to upload to S3.
145
+ :type file: bytearray
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._dataset_asset_file_post_serialize(
169
+ file=file,
170
+ _request_auth=_request_auth,
171
+ _content_type=_content_type,
172
+ _headers=_headers,
173
+ _host_index=_host_index
174
+ )
175
+
176
+ _response_types_map: Dict[str, Optional[str]] = {
177
+ '200': "UploadAssetResult",
178
+ }
179
+ response_data = self.api_client.call_api(
180
+ *_param,
181
+ _request_timeout=_request_timeout
182
+ )
183
+ response_data.read()
184
+ return self.api_client.response_deserialize(
185
+ response_data=response_data,
186
+ response_types_map=_response_types_map,
187
+ )
188
+
189
+
190
+ @validate_call
191
+ def dataset_asset_file_post_without_preload_content(
192
+ self,
193
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to upload to S3.")] = None,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Uploads a single asset to S3 and returns the asset details.
208
+
209
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
210
+
211
+ :param file: The file to upload to S3.
212
+ :type file: bytearray
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._dataset_asset_file_post_serialize(
236
+ file=file,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "UploadAssetResult",
245
+ }
246
+ response_data = self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _dataset_asset_file_post_serialize(
254
+ self,
255
+ file,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _host = None
263
+
264
+ _collection_formats: Dict[str, str] = {
265
+ }
266
+
267
+ _path_params: Dict[str, str] = {}
268
+ _query_params: List[Tuple[str, str]] = []
269
+ _header_params: Dict[str, Optional[str]] = _headers or {}
270
+ _form_params: List[Tuple[str, str]] = []
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
274
+ _body_params: Optional[bytes] = None
275
+
276
+ # process the path parameters
277
+ # process the query parameters
278
+ # process the header parameters
279
+ # process the form parameters
280
+ if file is not None:
281
+ _files['file'] = file
282
+ # process the body parameter
283
+
284
+
285
+ # set the HTTP header `Accept`
286
+ if 'Accept' not in _header_params:
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
288
+ [
289
+ 'text/plain',
290
+ 'application/json',
291
+ 'text/json'
292
+ ]
293
+ )
294
+
295
+ # set the HTTP header `Content-Type`
296
+ if _content_type:
297
+ _header_params['Content-Type'] = _content_type
298
+ else:
299
+ _default_content_type = (
300
+ self.api_client.select_header_content_type(
301
+ [
302
+ 'multipart/form-data'
303
+ ]
304
+ )
305
+ )
306
+ if _default_content_type is not None:
307
+ _header_params['Content-Type'] = _default_content_type
308
+
309
+ # authentication setting
310
+ _auth_settings: List[str] = [
311
+ 'bearer',
312
+ 'oauth2'
313
+ ]
314
+
315
+ return self.api_client.param_serialize(
316
+ method='POST',
317
+ resource_path='/dataset/asset/file',
318
+ path_params=_path_params,
319
+ query_params=_query_params,
320
+ header_params=_header_params,
321
+ body=_body_params,
322
+ post_params=_form_params,
323
+ files=_files,
324
+ auth_settings=_auth_settings,
325
+ collection_formats=_collection_formats,
326
+ _host=_host,
327
+ _request_auth=_request_auth
328
+ )
329
+
330
+
331
+
332
+
333
+ @validate_call
334
+ def dataset_asset_url_post(
335
+ self,
336
+ url: Annotated[Optional[StrictStr], Field(description="The url of the file to upload to S3.")] = None,
337
+ _request_timeout: Union[
338
+ None,
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Tuple[
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Annotated[StrictFloat, Field(gt=0)]
343
+ ]
344
+ ] = None,
345
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
346
+ _content_type: Optional[StrictStr] = None,
347
+ _headers: Optional[Dict[StrictStr, Any]] = None,
348
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
349
+ ) -> UploadAssetResult:
350
+ """Uploads a single asset to S3 and returns the asset details.
351
+
352
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
353
+
354
+ :param url: The url of the file to upload to S3.
355
+ :type url: str
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._dataset_asset_url_post_serialize(
379
+ url=url,
380
+ _request_auth=_request_auth,
381
+ _content_type=_content_type,
382
+ _headers=_headers,
383
+ _host_index=_host_index
384
+ )
385
+
386
+ _response_types_map: Dict[str, Optional[str]] = {
387
+ '200': "UploadAssetResult",
388
+ }
389
+ response_data = self.api_client.call_api(
390
+ *_param,
391
+ _request_timeout=_request_timeout
392
+ )
393
+ response_data.read()
394
+ return self.api_client.response_deserialize(
395
+ response_data=response_data,
396
+ response_types_map=_response_types_map,
397
+ ).data
398
+
399
+
400
+ @validate_call
401
+ def dataset_asset_url_post_with_http_info(
402
+ self,
403
+ url: Annotated[Optional[StrictStr], Field(description="The url of the file to upload to S3.")] = None,
404
+ _request_timeout: Union[
405
+ None,
406
+ Annotated[StrictFloat, Field(gt=0)],
407
+ Tuple[
408
+ Annotated[StrictFloat, Field(gt=0)],
409
+ Annotated[StrictFloat, Field(gt=0)]
410
+ ]
411
+ ] = None,
412
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
413
+ _content_type: Optional[StrictStr] = None,
414
+ _headers: Optional[Dict[StrictStr, Any]] = None,
415
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
416
+ ) -> ApiResponse[UploadAssetResult]:
417
+ """Uploads a single asset to S3 and returns the asset details.
418
+
419
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
420
+
421
+ :param url: The url of the file to upload to S3.
422
+ :type url: str
423
+ :param _request_timeout: timeout setting for this request. If one
424
+ number provided, it will be total request
425
+ timeout. It can also be a pair (tuple) of
426
+ (connection, read) timeouts.
427
+ :type _request_timeout: int, tuple(int, int), optional
428
+ :param _request_auth: set to override the auth_settings for an a single
429
+ request; this effectively ignores the
430
+ authentication in the spec for a single request.
431
+ :type _request_auth: dict, optional
432
+ :param _content_type: force content-type for the request.
433
+ :type _content_type: str, Optional
434
+ :param _headers: set to override the headers for a single
435
+ request; this effectively ignores the headers
436
+ in the spec for a single request.
437
+ :type _headers: dict, optional
438
+ :param _host_index: set to override the host_index for a single
439
+ request; this effectively ignores the host_index
440
+ in the spec for a single request.
441
+ :type _host_index: int, optional
442
+ :return: Returns the result object.
443
+ """ # noqa: E501
444
+
445
+ _param = self._dataset_asset_url_post_serialize(
446
+ url=url,
447
+ _request_auth=_request_auth,
448
+ _content_type=_content_type,
449
+ _headers=_headers,
450
+ _host_index=_host_index
451
+ )
452
+
453
+ _response_types_map: Dict[str, Optional[str]] = {
454
+ '200': "UploadAssetResult",
455
+ }
456
+ response_data = self.api_client.call_api(
457
+ *_param,
458
+ _request_timeout=_request_timeout
459
+ )
460
+ response_data.read()
461
+ return self.api_client.response_deserialize(
462
+ response_data=response_data,
463
+ response_types_map=_response_types_map,
464
+ )
465
+
466
+
467
+ @validate_call
468
+ def dataset_asset_url_post_without_preload_content(
469
+ self,
470
+ url: Annotated[Optional[StrictStr], Field(description="The url of the file to upload to S3.")] = None,
471
+ _request_timeout: Union[
472
+ None,
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Tuple[
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Annotated[StrictFloat, Field(gt=0)]
477
+ ]
478
+ ] = None,
479
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
480
+ _content_type: Optional[StrictStr] = None,
481
+ _headers: Optional[Dict[StrictStr, Any]] = None,
482
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
483
+ ) -> RESTResponseType:
484
+ """Uploads a single asset to S3 and returns the asset details.
485
+
486
+ This endpoint allows uploading a single file to S3 storage with the asset creator. The uploaded asset will be stored using the configured S3 settings and a unique filename will be generated.
487
+
488
+ :param url: The url of the file to upload to S3.
489
+ :type url: str
490
+ :param _request_timeout: timeout setting for this request. If one
491
+ number provided, it will be total request
492
+ timeout. It can also be a pair (tuple) of
493
+ (connection, read) timeouts.
494
+ :type _request_timeout: int, tuple(int, int), optional
495
+ :param _request_auth: set to override the auth_settings for an a single
496
+ request; this effectively ignores the
497
+ authentication in the spec for a single request.
498
+ :type _request_auth: dict, optional
499
+ :param _content_type: force content-type for the request.
500
+ :type _content_type: str, Optional
501
+ :param _headers: set to override the headers for a single
502
+ request; this effectively ignores the headers
503
+ in the spec for a single request.
504
+ :type _headers: dict, optional
505
+ :param _host_index: set to override the host_index for a single
506
+ request; this effectively ignores the host_index
507
+ in the spec for a single request.
508
+ :type _host_index: int, optional
509
+ :return: Returns the result object.
510
+ """ # noqa: E501
511
+
512
+ _param = self._dataset_asset_url_post_serialize(
513
+ url=url,
514
+ _request_auth=_request_auth,
515
+ _content_type=_content_type,
516
+ _headers=_headers,
517
+ _host_index=_host_index
518
+ )
519
+
520
+ _response_types_map: Dict[str, Optional[str]] = {
521
+ '200': "UploadAssetResult",
522
+ }
523
+ response_data = self.api_client.call_api(
524
+ *_param,
525
+ _request_timeout=_request_timeout
526
+ )
527
+ return response_data.response
528
+
529
+
530
+ def _dataset_asset_url_post_serialize(
531
+ self,
532
+ url,
533
+ _request_auth,
534
+ _content_type,
535
+ _headers,
536
+ _host_index,
537
+ ) -> RequestSerialized:
538
+
539
+ _host = None
540
+
541
+ _collection_formats: Dict[str, str] = {
542
+ }
543
+
544
+ _path_params: Dict[str, str] = {}
545
+ _query_params: List[Tuple[str, str]] = []
546
+ _header_params: Dict[str, Optional[str]] = _headers or {}
547
+ _form_params: List[Tuple[str, str]] = []
548
+ _files: Dict[
549
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
550
+ ] = {}
551
+ _body_params: Optional[bytes] = None
552
+
553
+ # process the path parameters
554
+ # process the query parameters
555
+ if url is not None:
556
+
557
+ _query_params.append(('url', url))
558
+
559
+ # process the header parameters
560
+ # process the form parameters
561
+ # process the body parameter
562
+
563
+
564
+ # set the HTTP header `Accept`
565
+ if 'Accept' not in _header_params:
566
+ _header_params['Accept'] = self.api_client.select_header_accept(
567
+ [
568
+ 'text/plain',
569
+ 'application/json',
570
+ 'text/json'
571
+ ]
572
+ )
573
+
574
+
575
+ # authentication setting
576
+ _auth_settings: List[str] = [
577
+ 'bearer',
578
+ 'oauth2'
579
+ ]
580
+
581
+ return self.api_client.param_serialize(
582
+ method='POST',
583
+ resource_path='/dataset/asset/url',
584
+ path_params=_path_params,
585
+ query_params=_query_params,
586
+ header_params=_header_params,
587
+ body=_body_params,
588
+ post_params=_form_params,
589
+ files=_files,
590
+ auth_settings=_auth_settings,
591
+ collection_formats=_collection_formats,
592
+ _host=_host,
593
+ _request_auth=_request_auth
594
+ )
595
+
596
+
597
+
598
+
55
599
  @validate_call
56
600
  def dataset_dataset_id_datapoints_csv_post(
57
601
  self,
@@ -4566,9 +4566,7 @@ class OrderApi:
4566
4566
  _default_content_type = (
4567
4567
  self.api_client.select_header_content_type(
4568
4568
  [
4569
- 'application/json',
4570
- 'text/json',
4571
- 'application/*+json'
4569
+ 'application/json'
4572
4570
  ]
4573
4571
  )
4574
4572
  )
@@ -67,7 +67,6 @@ from rapidata.api_client.models.compare_rapid_blueprint import CompareRapidBluep
67
67
  from rapidata.api_client.models.compare_result import CompareResult
68
68
  from rapidata.api_client.models.compare_truth import CompareTruth
69
69
  from rapidata.api_client.models.compare_workflow_config import CompareWorkflowConfig
70
- from rapidata.api_client.models.compare_workflow_config_metadata_value import CompareWorkflowConfigMetadataValue
71
70
  from rapidata.api_client.models.compare_workflow_config_model import CompareWorkflowConfigModel
72
71
  from rapidata.api_client.models.compare_workflow_config_model_pair_maker_config import CompareWorkflowConfigModelPairMakerConfig
73
72
  from rapidata.api_client.models.compare_workflow_config_pair_maker_config import CompareWorkflowConfigPairMakerConfig
@@ -139,6 +138,7 @@ from rapidata.api_client.models.empty_validation_truth import EmptyValidationTru
139
138
  from rapidata.api_client.models.evaluation_workflow_config import EvaluationWorkflowConfig
140
139
  from rapidata.api_client.models.evaluation_workflow_model import EvaluationWorkflowModel
141
140
  from rapidata.api_client.models.evaluation_workflow_model1 import EvaluationWorkflowModel1
141
+ from rapidata.api_client.models.existing_asset_input import ExistingAssetInput
142
142
  from rapidata.api_client.models.feature_flag import FeatureFlag
143
143
  from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
144
144
  from rapidata.api_client.models.feedback_model import FeedbackModel
@@ -150,6 +150,7 @@ from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1Fil
150
150
  from rapidata.api_client.models.file_asset_input2 import FileAssetInput2
151
151
  from rapidata.api_client.models.file_asset_input3 import FileAssetInput3
152
152
  from rapidata.api_client.models.file_asset_input_file import FileAssetInputFile
153
+ from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
153
154
  from rapidata.api_client.models.file_asset_model import FileAssetModel
154
155
  from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
155
156
  from rapidata.api_client.models.file_type import FileType
@@ -308,6 +309,7 @@ from rapidata.api_client.models.rapid_result_model_result import RapidResultMode
308
309
  from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
309
310
  from rapidata.api_client.models.rapid_state import RapidState
310
311
  from rapidata.api_client.models.read_bridge_token_keys_result import ReadBridgeTokenKeysResult
312
+ from rapidata.api_client.models.reference_asset_input import ReferenceAssetInput
311
313
  from rapidata.api_client.models.report_model import ReportModel
312
314
  from rapidata.api_client.models.response_count_filter import ResponseCountFilter
313
315
  from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
@@ -333,7 +335,6 @@ from rapidata.api_client.models.simple_workflow_config_model import SimpleWorkfl
333
335
  from rapidata.api_client.models.simple_workflow_config_model_blueprint import SimpleWorkflowConfigModelBlueprint
334
336
  from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
335
337
  from rapidata.api_client.models.simple_workflow_model1 import SimpleWorkflowModel1
336
- from rapidata.api_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
337
338
  from rapidata.api_client.models.skip_result import SkipResult
338
339
  from rapidata.api_client.models.skip_truth import SkipTruth
339
340
  from rapidata.api_client.models.sort_criterion import SortCriterion
@@ -390,6 +391,7 @@ from rapidata.api_client.models.update_should_alert_model import UpdateShouldAle
390
391
  from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
391
392
  from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
392
393
  from rapidata.api_client.models.update_validation_set_model import UpdateValidationSetModel
394
+ from rapidata.api_client.models.upload_asset_result import UploadAssetResult
393
395
  from rapidata.api_client.models.upload_coco_result import UploadCocoResult
394
396
  from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
395
397
  from rapidata.api_client.models.url_asset_input import UrlAssetInput