rapidata 2.12.0__py3-none-any.whl → 2.13.1__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 (70) hide show
  1. rapidata/__init__.py +1 -5
  2. rapidata/api_client/__init__.py +17 -39
  3. rapidata/api_client/api/__init__.py +0 -1
  4. rapidata/api_client/api/campaign_api.py +13 -13
  5. rapidata/api_client/api/datapoint_api.py +6 -6
  6. rapidata/api_client/api/dataset_api.py +574 -16
  7. rapidata/api_client/api/rapid_api.py +262 -0
  8. rapidata/api_client/api/validation_api.py +7 -7
  9. rapidata/api_client/models/__init__.py +17 -38
  10. rapidata/api_client/models/add_campaign_model.py +3 -3
  11. rapidata/api_client/models/add_campaign_model_user_filters_inner.py +224 -0
  12. rapidata/api_client/models/campaign_query_result.py +105 -0
  13. rapidata/api_client/models/campaign_query_result_paged_result.py +105 -0
  14. rapidata/api_client/models/classification_metadata_model.py +2 -4
  15. rapidata/api_client/models/compare_workflow_config.py +8 -10
  16. rapidata/api_client/models/compare_workflow_config_model.py +9 -11
  17. rapidata/api_client/models/compare_workflow_config_model_pair_maker_config.py +8 -22
  18. rapidata/api_client/models/compare_workflow_config_pair_maker_config.py +8 -22
  19. rapidata/api_client/models/compare_workflow_model.py +8 -10
  20. rapidata/api_client/models/compare_workflow_model1.py +8 -10
  21. rapidata/api_client/models/compare_workflow_model1_pair_maker_information.py +8 -22
  22. rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +10 -24
  23. rapidata/api_client/models/count_metadata_model.py +2 -4
  24. rapidata/api_client/models/create_datapoint_from_urls_model.py +87 -0
  25. rapidata/api_client/models/create_datapoint_result.py +97 -0
  26. rapidata/api_client/models/create_order_model_user_filters_inner.py +23 -9
  27. rapidata/api_client/models/datapoint_state.py +38 -0
  28. rapidata/api_client/models/demographic.py +89 -0
  29. rapidata/api_client/models/demographic_metadata_model.py +18 -9
  30. rapidata/api_client/models/elo_config.py +91 -0
  31. rapidata/api_client/models/elo_config_model.py +91 -0
  32. rapidata/api_client/models/file_asset_model.py +18 -13
  33. rapidata/api_client/models/file_asset_model_metadata_value.py +266 -0
  34. rapidata/api_client/models/get_compare_workflow_results_model.py +1 -9
  35. rapidata/api_client/models/get_compare_workflow_results_result.py +6 -15
  36. rapidata/api_client/models/get_datapoint_by_id_result.py +114 -0
  37. rapidata/api_client/models/get_dataset_progress_result.py +93 -0
  38. rapidata/api_client/models/get_simple_workflow_results_result.py +3 -3
  39. rapidata/api_client/models/image_dimension_metadata_model.py +2 -4
  40. rapidata/api_client/models/inspect_report_result.py +92 -0
  41. rapidata/api_client/models/location_metadata_model.py +2 -4
  42. rapidata/api_client/models/multi_asset_model.py +18 -13
  43. rapidata/api_client/models/new_user_filter_model.py +94 -0
  44. rapidata/api_client/models/new_user_filter_model1.py +94 -0
  45. rapidata/api_client/models/null_asset_model.py +18 -13
  46. rapidata/api_client/models/online_pair_maker_config_model.py +1 -1
  47. rapidata/api_client/models/original_filename_metadata_model.py +2 -4
  48. rapidata/api_client/models/prompt_metadata_input.py +2 -4
  49. rapidata/api_client/models/prompt_metadata_model.py +2 -4
  50. rapidata/api_client/models/query_validation_rapids_result.py +14 -9
  51. rapidata/api_client/models/query_validation_rapids_result_asset.py +40 -40
  52. rapidata/api_client/models/report_model.py +11 -4
  53. rapidata/api_client/models/source_url_metadata_model.py +96 -0
  54. rapidata/api_client/models/text_asset_model.py +18 -13
  55. rapidata/api_client/models/text_metadata_model.py +2 -4
  56. rapidata/api_client/models/transcription_metadata_input.py +2 -4
  57. rapidata/api_client/models/transcription_metadata_model.py +1 -3
  58. rapidata/api_client/models/translated_prompt_metadata_model.py +2 -4
  59. rapidata/api_client/models/upload_from_s3_result.py +87 -0
  60. rapidata/api_client_README.md +20 -39
  61. rapidata/rapidata_client/metadata/_base_metadata.py +0 -3
  62. rapidata/rapidata_client/metadata/_private_text_metadata.py +2 -1
  63. rapidata/rapidata_client/metadata/_prompt_metadata.py +3 -3
  64. rapidata/rapidata_client/metadata/_public_text_metadata.py +2 -1
  65. rapidata/rapidata_client/metadata/_select_words_metadata.py +2 -4
  66. rapidata/rapidata_client/validation/validation_set_manager.py +3 -2
  67. {rapidata-2.12.0.dist-info → rapidata-2.13.1.dist-info}/METADATA +1 -1
  68. {rapidata-2.12.0.dist-info → rapidata-2.13.1.dist-info}/RECORD +70 -53
  69. {rapidata-2.12.0.dist-info → rapidata-2.13.1.dist-info}/LICENSE +0 -0
  70. {rapidata-2.12.0.dist-info → rapidata-2.13.1.dist-info}/WHEEL +0 -0
@@ -19,11 +19,14 @@ from typing_extensions import Annotated
19
19
  from pydantic import Field, StrictBytes, StrictStr
20
20
  from typing import List, Optional, Tuple, Union
21
21
  from typing_extensions import Annotated
22
+ from rapidata.api_client.models.create_datapoint_from_urls_model import CreateDatapointFromUrlsModel
23
+ from rapidata.api_client.models.create_datapoint_result import CreateDatapointResult
22
24
  from rapidata.api_client.models.datapoint_metadata_model import DatapointMetadataModel
23
25
  from rapidata.api_client.models.get_dataset_by_id_result import GetDatasetByIdResult
26
+ from rapidata.api_client.models.get_dataset_progress_result import GetDatasetProgressResult
24
27
  from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
25
- from rapidata.api_client.models.upload_datapoints_result import UploadDatapointsResult
26
28
  from rapidata.api_client.models.upload_files_from_s3_bucket_model import UploadFilesFromS3BucketModel
29
+ from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
27
30
  from rapidata.api_client.models.upload_text_sources_to_dataset_model import UploadTextSourcesToDatasetModel
28
31
 
29
32
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
@@ -60,7 +63,7 @@ class DatasetApi:
60
63
  _content_type: Optional[StrictStr] = None,
61
64
  _headers: Optional[Dict[StrictStr, Any]] = None,
62
65
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
- ) -> UploadDatapointsResult:
66
+ ) -> CreateDatapointResult:
64
67
  """Creates new datapoints from text sources.
65
68
 
66
69
  If multiple text sources are uploaded, a new datapoint will be created for each text source.
@@ -98,7 +101,7 @@ class DatasetApi:
98
101
  )
99
102
 
100
103
  _response_types_map: Dict[str, Optional[str]] = {
101
- '200': "UploadDatapointsResult",
104
+ '200': "CreateDatapointResult",
102
105
  }
103
106
  response_data = self.api_client.call_api(
104
107
  *_param,
@@ -127,7 +130,7 @@ class DatasetApi:
127
130
  _content_type: Optional[StrictStr] = None,
128
131
  _headers: Optional[Dict[StrictStr, Any]] = None,
129
132
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
- ) -> ApiResponse[UploadDatapointsResult]:
133
+ ) -> ApiResponse[CreateDatapointResult]:
131
134
  """Creates new datapoints from text sources.
132
135
 
133
136
  If multiple text sources are uploaded, a new datapoint will be created for each text source.
@@ -165,7 +168,7 @@ class DatasetApi:
165
168
  )
166
169
 
167
170
  _response_types_map: Dict[str, Optional[str]] = {
168
- '200': "UploadDatapointsResult",
171
+ '200': "CreateDatapointResult",
169
172
  }
170
173
  response_data = self.api_client.call_api(
171
174
  *_param,
@@ -232,7 +235,7 @@ class DatasetApi:
232
235
  )
233
236
 
234
237
  _response_types_map: Dict[str, Optional[str]] = {
235
- '200': "UploadDatapointsResult",
238
+ '200': "CreateDatapointResult",
236
239
  }
237
240
  response_data = self.api_client.call_api(
238
241
  *_param,
@@ -340,7 +343,7 @@ class DatasetApi:
340
343
  _content_type: Optional[StrictStr] = None,
341
344
  _headers: Optional[Dict[StrictStr, Any]] = None,
342
345
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
343
- ) -> UploadDatapointsResult:
346
+ ) -> CreateDatapointResult:
344
347
  """Creates a single datapoint.
345
348
 
346
349
  If multiple files are uploaded, a multi asset datapoint will be created.
@@ -381,7 +384,7 @@ class DatasetApi:
381
384
  )
382
385
 
383
386
  _response_types_map: Dict[str, Optional[str]] = {
384
- '200': "UploadDatapointsResult",
387
+ '200': "CreateDatapointResult",
385
388
  }
386
389
  response_data = self.api_client.call_api(
387
390
  *_param,
@@ -411,7 +414,7 @@ class DatasetApi:
411
414
  _content_type: Optional[StrictStr] = None,
412
415
  _headers: Optional[Dict[StrictStr, Any]] = None,
413
416
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
414
- ) -> ApiResponse[UploadDatapointsResult]:
417
+ ) -> ApiResponse[CreateDatapointResult]:
415
418
  """Creates a single datapoint.
416
419
 
417
420
  If multiple files are uploaded, a multi asset datapoint will be created.
@@ -452,7 +455,7 @@ class DatasetApi:
452
455
  )
453
456
 
454
457
  _response_types_map: Dict[str, Optional[str]] = {
455
- '200': "UploadDatapointsResult",
458
+ '200': "CreateDatapointResult",
456
459
  }
457
460
  response_data = self.api_client.call_api(
458
461
  *_param,
@@ -523,7 +526,7 @@ class DatasetApi:
523
526
  )
524
527
 
525
528
  _response_types_map: Dict[str, Optional[str]] = {
526
- '200': "UploadDatapointsResult",
529
+ '200': "CreateDatapointResult",
527
530
  }
528
531
  response_data = self.api_client.call_api(
529
532
  *_param,
@@ -616,6 +619,561 @@ class DatasetApi:
616
619
 
617
620
 
618
621
 
622
+ @validate_call
623
+ def dataset_dataset_id_datapoints_urls_post(
624
+ self,
625
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
626
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
627
+ _request_timeout: Union[
628
+ None,
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Tuple[
631
+ Annotated[StrictFloat, Field(gt=0)],
632
+ Annotated[StrictFloat, Field(gt=0)]
633
+ ]
634
+ ] = None,
635
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
636
+ _content_type: Optional[StrictStr] = None,
637
+ _headers: Optional[Dict[StrictStr, Any]] = None,
638
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
639
+ ) -> CreateDatapointResult:
640
+ """Creates new datapoint where the assets are fetched from the specified urls.
641
+
642
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
643
+
644
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
645
+ :type dataset_id: str
646
+ :param create_datapoint_from_urls_model: The body of the request.
647
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
648
+ :param _request_timeout: timeout setting for this request. If one
649
+ number provided, it will be total request
650
+ timeout. It can also be a pair (tuple) of
651
+ (connection, read) timeouts.
652
+ :type _request_timeout: int, tuple(int, int), optional
653
+ :param _request_auth: set to override the auth_settings for an a single
654
+ request; this effectively ignores the
655
+ authentication in the spec for a single request.
656
+ :type _request_auth: dict, optional
657
+ :param _content_type: force content-type for the request.
658
+ :type _content_type: str, Optional
659
+ :param _headers: set to override the headers for a single
660
+ request; this effectively ignores the headers
661
+ in the spec for a single request.
662
+ :type _headers: dict, optional
663
+ :param _host_index: set to override the host_index for a single
664
+ request; this effectively ignores the host_index
665
+ in the spec for a single request.
666
+ :type _host_index: int, optional
667
+ :return: Returns the result object.
668
+ """ # noqa: E501
669
+
670
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
671
+ dataset_id=dataset_id,
672
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
673
+ _request_auth=_request_auth,
674
+ _content_type=_content_type,
675
+ _headers=_headers,
676
+ _host_index=_host_index
677
+ )
678
+
679
+ _response_types_map: Dict[str, Optional[str]] = {
680
+ '200': "CreateDatapointResult",
681
+ }
682
+ response_data = self.api_client.call_api(
683
+ *_param,
684
+ _request_timeout=_request_timeout
685
+ )
686
+ response_data.read()
687
+ return self.api_client.response_deserialize(
688
+ response_data=response_data,
689
+ response_types_map=_response_types_map,
690
+ ).data
691
+
692
+
693
+ @validate_call
694
+ def dataset_dataset_id_datapoints_urls_post_with_http_info(
695
+ self,
696
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
697
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
698
+ _request_timeout: Union[
699
+ None,
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Tuple[
702
+ Annotated[StrictFloat, Field(gt=0)],
703
+ Annotated[StrictFloat, Field(gt=0)]
704
+ ]
705
+ ] = None,
706
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
707
+ _content_type: Optional[StrictStr] = None,
708
+ _headers: Optional[Dict[StrictStr, Any]] = None,
709
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
710
+ ) -> ApiResponse[CreateDatapointResult]:
711
+ """Creates new datapoint where the assets are fetched from the specified urls.
712
+
713
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
714
+
715
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
716
+ :type dataset_id: str
717
+ :param create_datapoint_from_urls_model: The body of the request.
718
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
719
+ :param _request_timeout: timeout setting for this request. If one
720
+ number provided, it will be total request
721
+ timeout. It can also be a pair (tuple) of
722
+ (connection, read) timeouts.
723
+ :type _request_timeout: int, tuple(int, int), optional
724
+ :param _request_auth: set to override the auth_settings for an a single
725
+ request; this effectively ignores the
726
+ authentication in the spec for a single request.
727
+ :type _request_auth: dict, optional
728
+ :param _content_type: force content-type for the request.
729
+ :type _content_type: str, Optional
730
+ :param _headers: set to override the headers for a single
731
+ request; this effectively ignores the headers
732
+ in the spec for a single request.
733
+ :type _headers: dict, optional
734
+ :param _host_index: set to override the host_index for a single
735
+ request; this effectively ignores the host_index
736
+ in the spec for a single request.
737
+ :type _host_index: int, optional
738
+ :return: Returns the result object.
739
+ """ # noqa: E501
740
+
741
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
742
+ dataset_id=dataset_id,
743
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
744
+ _request_auth=_request_auth,
745
+ _content_type=_content_type,
746
+ _headers=_headers,
747
+ _host_index=_host_index
748
+ )
749
+
750
+ _response_types_map: Dict[str, Optional[str]] = {
751
+ '200': "CreateDatapointResult",
752
+ }
753
+ response_data = self.api_client.call_api(
754
+ *_param,
755
+ _request_timeout=_request_timeout
756
+ )
757
+ response_data.read()
758
+ return self.api_client.response_deserialize(
759
+ response_data=response_data,
760
+ response_types_map=_response_types_map,
761
+ )
762
+
763
+
764
+ @validate_call
765
+ def dataset_dataset_id_datapoints_urls_post_without_preload_content(
766
+ self,
767
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
768
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
769
+ _request_timeout: Union[
770
+ None,
771
+ Annotated[StrictFloat, Field(gt=0)],
772
+ Tuple[
773
+ Annotated[StrictFloat, Field(gt=0)],
774
+ Annotated[StrictFloat, Field(gt=0)]
775
+ ]
776
+ ] = None,
777
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
778
+ _content_type: Optional[StrictStr] = None,
779
+ _headers: Optional[Dict[StrictStr, Any]] = None,
780
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
781
+ ) -> RESTResponseType:
782
+ """Creates new datapoint where the assets are fetched from the specified urls.
783
+
784
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
785
+
786
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
787
+ :type dataset_id: str
788
+ :param create_datapoint_from_urls_model: The body of the request.
789
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
790
+ :param _request_timeout: timeout setting for this request. If one
791
+ number provided, it will be total request
792
+ timeout. It can also be a pair (tuple) of
793
+ (connection, read) timeouts.
794
+ :type _request_timeout: int, tuple(int, int), optional
795
+ :param _request_auth: set to override the auth_settings for an a single
796
+ request; this effectively ignores the
797
+ authentication in the spec for a single request.
798
+ :type _request_auth: dict, optional
799
+ :param _content_type: force content-type for the request.
800
+ :type _content_type: str, Optional
801
+ :param _headers: set to override the headers for a single
802
+ request; this effectively ignores the headers
803
+ in the spec for a single request.
804
+ :type _headers: dict, optional
805
+ :param _host_index: set to override the host_index for a single
806
+ request; this effectively ignores the host_index
807
+ in the spec for a single request.
808
+ :type _host_index: int, optional
809
+ :return: Returns the result object.
810
+ """ # noqa: E501
811
+
812
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
813
+ dataset_id=dataset_id,
814
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
815
+ _request_auth=_request_auth,
816
+ _content_type=_content_type,
817
+ _headers=_headers,
818
+ _host_index=_host_index
819
+ )
820
+
821
+ _response_types_map: Dict[str, Optional[str]] = {
822
+ '200': "CreateDatapointResult",
823
+ }
824
+ response_data = self.api_client.call_api(
825
+ *_param,
826
+ _request_timeout=_request_timeout
827
+ )
828
+ return response_data.response
829
+
830
+
831
+ def _dataset_dataset_id_datapoints_urls_post_serialize(
832
+ self,
833
+ dataset_id,
834
+ create_datapoint_from_urls_model,
835
+ _request_auth,
836
+ _content_type,
837
+ _headers,
838
+ _host_index,
839
+ ) -> RequestSerialized:
840
+
841
+ _host = None
842
+
843
+ _collection_formats: Dict[str, str] = {
844
+ }
845
+
846
+ _path_params: Dict[str, str] = {}
847
+ _query_params: List[Tuple[str, str]] = []
848
+ _header_params: Dict[str, Optional[str]] = _headers or {}
849
+ _form_params: List[Tuple[str, str]] = []
850
+ _files: Dict[
851
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
852
+ ] = {}
853
+ _body_params: Optional[bytes] = None
854
+
855
+ # process the path parameters
856
+ if dataset_id is not None:
857
+ _path_params['datasetId'] = dataset_id
858
+ # process the query parameters
859
+ # process the header parameters
860
+ # process the form parameters
861
+ # process the body parameter
862
+ if create_datapoint_from_urls_model is not None:
863
+ _body_params = create_datapoint_from_urls_model
864
+
865
+
866
+ # set the HTTP header `Accept`
867
+ if 'Accept' not in _header_params:
868
+ _header_params['Accept'] = self.api_client.select_header_accept(
869
+ [
870
+ 'text/plain',
871
+ 'application/json',
872
+ 'text/json'
873
+ ]
874
+ )
875
+
876
+ # set the HTTP header `Content-Type`
877
+ if _content_type:
878
+ _header_params['Content-Type'] = _content_type
879
+ else:
880
+ _default_content_type = (
881
+ self.api_client.select_header_content_type(
882
+ [
883
+ 'application/json',
884
+ 'text/json',
885
+ 'application/*+json'
886
+ ]
887
+ )
888
+ )
889
+ if _default_content_type is not None:
890
+ _header_params['Content-Type'] = _default_content_type
891
+
892
+ # authentication setting
893
+ _auth_settings: List[str] = [
894
+ 'bearer',
895
+ 'oauth2'
896
+ ]
897
+
898
+ return self.api_client.param_serialize(
899
+ method='POST',
900
+ resource_path='/dataset/{datasetId}/datapoints/urls',
901
+ path_params=_path_params,
902
+ query_params=_query_params,
903
+ header_params=_header_params,
904
+ body=_body_params,
905
+ post_params=_form_params,
906
+ files=_files,
907
+ auth_settings=_auth_settings,
908
+ collection_formats=_collection_formats,
909
+ _host=_host,
910
+ _request_auth=_request_auth
911
+ )
912
+
913
+
914
+
915
+
916
+ @validate_call
917
+ def dataset_dataset_id_progress_get(
918
+ self,
919
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
920
+ _request_timeout: Union[
921
+ None,
922
+ Annotated[StrictFloat, Field(gt=0)],
923
+ Tuple[
924
+ Annotated[StrictFloat, Field(gt=0)],
925
+ Annotated[StrictFloat, Field(gt=0)]
926
+ ]
927
+ ] = None,
928
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
929
+ _content_type: Optional[StrictStr] = None,
930
+ _headers: Optional[Dict[StrictStr, Any]] = None,
931
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
932
+ ) -> GetDatasetProgressResult:
933
+ """Gets the upload progress of a dataset.
934
+
935
+
936
+ :param dataset_id: The id of the dataset to get the progress of. (required)
937
+ :type dataset_id: str
938
+ :param _request_timeout: timeout setting for this request. If one
939
+ number provided, it will be total request
940
+ timeout. It can also be a pair (tuple) of
941
+ (connection, read) timeouts.
942
+ :type _request_timeout: int, tuple(int, int), optional
943
+ :param _request_auth: set to override the auth_settings for an a single
944
+ request; this effectively ignores the
945
+ authentication in the spec for a single request.
946
+ :type _request_auth: dict, optional
947
+ :param _content_type: force content-type for the request.
948
+ :type _content_type: str, Optional
949
+ :param _headers: set to override the headers for a single
950
+ request; this effectively ignores the headers
951
+ in the spec for a single request.
952
+ :type _headers: dict, optional
953
+ :param _host_index: set to override the host_index for a single
954
+ request; this effectively ignores the host_index
955
+ in the spec for a single request.
956
+ :type _host_index: int, optional
957
+ :return: Returns the result object.
958
+ """ # noqa: E501
959
+
960
+ _param = self._dataset_dataset_id_progress_get_serialize(
961
+ dataset_id=dataset_id,
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index
966
+ )
967
+
968
+ _response_types_map: Dict[str, Optional[str]] = {
969
+ '200': "GetDatasetProgressResult",
970
+ }
971
+ response_data = self.api_client.call_api(
972
+ *_param,
973
+ _request_timeout=_request_timeout
974
+ )
975
+ response_data.read()
976
+ return self.api_client.response_deserialize(
977
+ response_data=response_data,
978
+ response_types_map=_response_types_map,
979
+ ).data
980
+
981
+
982
+ @validate_call
983
+ def dataset_dataset_id_progress_get_with_http_info(
984
+ self,
985
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)],
991
+ Annotated[StrictFloat, Field(gt=0)]
992
+ ]
993
+ ] = None,
994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
995
+ _content_type: Optional[StrictStr] = None,
996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
998
+ ) -> ApiResponse[GetDatasetProgressResult]:
999
+ """Gets the upload progress of a dataset.
1000
+
1001
+
1002
+ :param dataset_id: The id of the dataset to get the progress of. (required)
1003
+ :type dataset_id: str
1004
+ :param _request_timeout: timeout setting for this request. If one
1005
+ number provided, it will be total request
1006
+ timeout. It can also be a pair (tuple) of
1007
+ (connection, read) timeouts.
1008
+ :type _request_timeout: int, tuple(int, int), optional
1009
+ :param _request_auth: set to override the auth_settings for an a single
1010
+ request; this effectively ignores the
1011
+ authentication in the spec for a single request.
1012
+ :type _request_auth: dict, optional
1013
+ :param _content_type: force content-type for the request.
1014
+ :type _content_type: str, Optional
1015
+ :param _headers: set to override the headers for a single
1016
+ request; this effectively ignores the headers
1017
+ in the spec for a single request.
1018
+ :type _headers: dict, optional
1019
+ :param _host_index: set to override the host_index for a single
1020
+ request; this effectively ignores the host_index
1021
+ in the spec for a single request.
1022
+ :type _host_index: int, optional
1023
+ :return: Returns the result object.
1024
+ """ # noqa: E501
1025
+
1026
+ _param = self._dataset_dataset_id_progress_get_serialize(
1027
+ dataset_id=dataset_id,
1028
+ _request_auth=_request_auth,
1029
+ _content_type=_content_type,
1030
+ _headers=_headers,
1031
+ _host_index=_host_index
1032
+ )
1033
+
1034
+ _response_types_map: Dict[str, Optional[str]] = {
1035
+ '200': "GetDatasetProgressResult",
1036
+ }
1037
+ response_data = self.api_client.call_api(
1038
+ *_param,
1039
+ _request_timeout=_request_timeout
1040
+ )
1041
+ response_data.read()
1042
+ return self.api_client.response_deserialize(
1043
+ response_data=response_data,
1044
+ response_types_map=_response_types_map,
1045
+ )
1046
+
1047
+
1048
+ @validate_call
1049
+ def dataset_dataset_id_progress_get_without_preload_content(
1050
+ self,
1051
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
1052
+ _request_timeout: Union[
1053
+ None,
1054
+ Annotated[StrictFloat, Field(gt=0)],
1055
+ Tuple[
1056
+ Annotated[StrictFloat, Field(gt=0)],
1057
+ Annotated[StrictFloat, Field(gt=0)]
1058
+ ]
1059
+ ] = None,
1060
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1061
+ _content_type: Optional[StrictStr] = None,
1062
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1063
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1064
+ ) -> RESTResponseType:
1065
+ """Gets the upload progress of a dataset.
1066
+
1067
+
1068
+ :param dataset_id: The id of the dataset to get the progress of. (required)
1069
+ :type dataset_id: str
1070
+ :param _request_timeout: timeout setting for this request. If one
1071
+ number provided, it will be total request
1072
+ timeout. It can also be a pair (tuple) of
1073
+ (connection, read) timeouts.
1074
+ :type _request_timeout: int, tuple(int, int), optional
1075
+ :param _request_auth: set to override the auth_settings for an a single
1076
+ request; this effectively ignores the
1077
+ authentication in the spec for a single request.
1078
+ :type _request_auth: dict, optional
1079
+ :param _content_type: force content-type for the request.
1080
+ :type _content_type: str, Optional
1081
+ :param _headers: set to override the headers for a single
1082
+ request; this effectively ignores the headers
1083
+ in the spec for a single request.
1084
+ :type _headers: dict, optional
1085
+ :param _host_index: set to override the host_index for a single
1086
+ request; this effectively ignores the host_index
1087
+ in the spec for a single request.
1088
+ :type _host_index: int, optional
1089
+ :return: Returns the result object.
1090
+ """ # noqa: E501
1091
+
1092
+ _param = self._dataset_dataset_id_progress_get_serialize(
1093
+ dataset_id=dataset_id,
1094
+ _request_auth=_request_auth,
1095
+ _content_type=_content_type,
1096
+ _headers=_headers,
1097
+ _host_index=_host_index
1098
+ )
1099
+
1100
+ _response_types_map: Dict[str, Optional[str]] = {
1101
+ '200': "GetDatasetProgressResult",
1102
+ }
1103
+ response_data = self.api_client.call_api(
1104
+ *_param,
1105
+ _request_timeout=_request_timeout
1106
+ )
1107
+ return response_data.response
1108
+
1109
+
1110
+ def _dataset_dataset_id_progress_get_serialize(
1111
+ self,
1112
+ dataset_id,
1113
+ _request_auth,
1114
+ _content_type,
1115
+ _headers,
1116
+ _host_index,
1117
+ ) -> RequestSerialized:
1118
+
1119
+ _host = None
1120
+
1121
+ _collection_formats: Dict[str, str] = {
1122
+ }
1123
+
1124
+ _path_params: Dict[str, str] = {}
1125
+ _query_params: List[Tuple[str, str]] = []
1126
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1127
+ _form_params: List[Tuple[str, str]] = []
1128
+ _files: Dict[
1129
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1130
+ ] = {}
1131
+ _body_params: Optional[bytes] = None
1132
+
1133
+ # process the path parameters
1134
+ if dataset_id is not None:
1135
+ _path_params['datasetId'] = dataset_id
1136
+ # process the query parameters
1137
+ # process the header parameters
1138
+ # process the form parameters
1139
+ # process the body parameter
1140
+
1141
+
1142
+ # set the HTTP header `Accept`
1143
+ if 'Accept' not in _header_params:
1144
+ _header_params['Accept'] = self.api_client.select_header_accept(
1145
+ [
1146
+ 'text/plain',
1147
+ 'application/json',
1148
+ 'text/json'
1149
+ ]
1150
+ )
1151
+
1152
+
1153
+ # authentication setting
1154
+ _auth_settings: List[str] = [
1155
+ 'bearer',
1156
+ 'oauth2'
1157
+ ]
1158
+
1159
+ return self.api_client.param_serialize(
1160
+ method='GET',
1161
+ resource_path='/dataset/{datasetId}/progress',
1162
+ path_params=_path_params,
1163
+ query_params=_query_params,
1164
+ header_params=_header_params,
1165
+ body=_body_params,
1166
+ post_params=_form_params,
1167
+ files=_files,
1168
+ auth_settings=_auth_settings,
1169
+ collection_formats=_collection_formats,
1170
+ _host=_host,
1171
+ _request_auth=_request_auth
1172
+ )
1173
+
1174
+
1175
+
1176
+
619
1177
  @validate_call
620
1178
  def dataset_get_by_id_get(
621
1179
  self,
@@ -1457,7 +2015,7 @@ class DatasetApi:
1457
2015
  _content_type: Optional[StrictStr] = None,
1458
2016
  _headers: Optional[Dict[StrictStr, Any]] = None,
1459
2017
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1460
- ) -> UploadDatapointsResult:
2018
+ ) -> UploadFromS3Result:
1461
2019
  """Uploads files from an S3 bucket to a dataset.
1462
2020
 
1463
2021
  A new datapoint will be created for each file in the bucket.
@@ -1495,7 +2053,7 @@ class DatasetApi:
1495
2053
  )
1496
2054
 
1497
2055
  _response_types_map: Dict[str, Optional[str]] = {
1498
- '200': "UploadDatapointsResult",
2056
+ '200': "UploadFromS3Result",
1499
2057
  }
1500
2058
  response_data = self.api_client.call_api(
1501
2059
  *_param,
@@ -1524,7 +2082,7 @@ class DatasetApi:
1524
2082
  _content_type: Optional[StrictStr] = None,
1525
2083
  _headers: Optional[Dict[StrictStr, Any]] = None,
1526
2084
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1527
- ) -> ApiResponse[UploadDatapointsResult]:
2085
+ ) -> ApiResponse[UploadFromS3Result]:
1528
2086
  """Uploads files from an S3 bucket to a dataset.
1529
2087
 
1530
2088
  A new datapoint will be created for each file in the bucket.
@@ -1562,7 +2120,7 @@ class DatasetApi:
1562
2120
  )
1563
2121
 
1564
2122
  _response_types_map: Dict[str, Optional[str]] = {
1565
- '200': "UploadDatapointsResult",
2123
+ '200': "UploadFromS3Result",
1566
2124
  }
1567
2125
  response_data = self.api_client.call_api(
1568
2126
  *_param,
@@ -1629,7 +2187,7 @@ class DatasetApi:
1629
2187
  )
1630
2188
 
1631
2189
  _response_types_map: Dict[str, Optional[str]] = {
1632
- '200': "UploadDatapointsResult",
2190
+ '200': "UploadFromS3Result",
1633
2191
  }
1634
2192
  response_data = self.api_client.call_api(
1635
2193
  *_param,