rapidata 2.7.1__py3-none-any.whl → 2.8.0__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 (34) hide show
  1. rapidata/api_client/__init__.py +1 -0
  2. rapidata/api_client/api/dataset_api.py +31 -615
  3. rapidata/api_client/api/rapid_api.py +252 -0
  4. rapidata/api_client/api/workflow_api.py +280 -1
  5. rapidata/api_client/models/__init__.py +1 -0
  6. rapidata/api_client/models/add_campaign_model.py +1 -1
  7. rapidata/api_client/models/add_validation_rapid_model.py +2 -2
  8. rapidata/api_client/models/add_validation_text_rapid_model.py +2 -2
  9. rapidata/api_client/models/clients_query_result.py +3 -3
  10. rapidata/api_client/models/compare_workflow_model1.py +2 -2
  11. rapidata/api_client/models/coordinate.py +2 -2
  12. rapidata/api_client/models/datapoint.py +9 -2
  13. rapidata/api_client/models/datapoint_metadata_model.py +11 -4
  14. rapidata/api_client/models/get_compare_ab_summary_result.py +87 -0
  15. rapidata/api_client/models/order_model.py +1 -1
  16. rapidata/api_client/models/preliminary_download_model.py +2 -2
  17. rapidata/api_client/models/query_validation_rapids_result.py +1 -1
  18. rapidata/api_client/models/read_bridge_token_keys_result.py +6 -6
  19. rapidata/api_client/models/report_model.py +1 -1
  20. rapidata/api_client/models/simple_workflow_model1.py +2 -2
  21. rapidata/api_client/models/update_campaign_model.py +2 -2
  22. rapidata/api_client/models/update_validation_rapid_model.py +2 -2
  23. rapidata/api_client/models/upload_files_from_s3_bucket_model.py +3 -3
  24. rapidata/api_client/models/upload_text_sources_to_dataset_model.py +11 -4
  25. rapidata/api_client_README.md +3 -2
  26. rapidata/rapidata_client/assets/_media_asset.py +42 -28
  27. rapidata/rapidata_client/order/_rapidata_dataset.py +9 -7
  28. rapidata/rapidata_client/order/rapidata_order.py +9 -0
  29. rapidata/rapidata_client/order/rapidata_order_manager.py +3 -1
  30. rapidata/rapidata_client/validation/validation_set_manager.py +2 -1
  31. {rapidata-2.7.1.dist-info → rapidata-2.8.0.dist-info}/METADATA +1 -1
  32. {rapidata-2.7.1.dist-info → rapidata-2.8.0.dist-info}/RECORD +34 -33
  33. {rapidata-2.7.1.dist-info → rapidata-2.8.0.dist-info}/LICENSE +0 -0
  34. {rapidata-2.7.1.dist-info → rapidata-2.8.0.dist-info}/WHEEL +0 -0
@@ -1442,369 +1442,7 @@ class DatasetApi:
1442
1442
 
1443
1443
 
1444
1444
  @validate_call
1445
- def dataset_upload_datapoint_post(
1446
- self,
1447
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the datapoint to.")] = None,
1448
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to create the asset from.")] = None,
1449
- _request_timeout: Union[
1450
- None,
1451
- Annotated[StrictFloat, Field(gt=0)],
1452
- Tuple[
1453
- Annotated[StrictFloat, Field(gt=0)],
1454
- Annotated[StrictFloat, Field(gt=0)]
1455
- ]
1456
- ] = None,
1457
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1458
- _content_type: Optional[StrictStr] = None,
1459
- _headers: Optional[Dict[StrictStr, Any]] = None,
1460
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1461
- ) -> UploadDatapointsResult:
1462
- """(Deprecated) Creates a new multi asset datapoint.
1463
-
1464
-
1465
- :param dataset_id: The id of the dataset to upload the datapoint to.
1466
- :type dataset_id: str
1467
- :param files: The image files to create the asset from.
1468
- :type files: List[bytearray]
1469
- :param _request_timeout: timeout setting for this request. If one
1470
- number provided, it will be total request
1471
- timeout. It can also be a pair (tuple) of
1472
- (connection, read) timeouts.
1473
- :type _request_timeout: int, tuple(int, int), optional
1474
- :param _request_auth: set to override the auth_settings for an a single
1475
- request; this effectively ignores the
1476
- authentication in the spec for a single request.
1477
- :type _request_auth: dict, optional
1478
- :param _content_type: force content-type for the request.
1479
- :type _content_type: str, Optional
1480
- :param _headers: set to override the headers for a single
1481
- request; this effectively ignores the headers
1482
- in the spec for a single request.
1483
- :type _headers: dict, optional
1484
- :param _host_index: set to override the host_index for a single
1485
- request; this effectively ignores the host_index
1486
- in the spec for a single request.
1487
- :type _host_index: int, optional
1488
- :return: Returns the result object.
1489
- """ # noqa: E501
1490
- warnings.warn("POST /Dataset/UploadDatapoint is deprecated.", DeprecationWarning)
1491
-
1492
- _param = self._dataset_upload_datapoint_post_serialize(
1493
- dataset_id=dataset_id,
1494
- files=files,
1495
- _request_auth=_request_auth,
1496
- _content_type=_content_type,
1497
- _headers=_headers,
1498
- _host_index=_host_index
1499
- )
1500
-
1501
- _response_types_map: Dict[str, Optional[str]] = {
1502
- '200': "UploadDatapointsResult",
1503
- }
1504
- response_data = self.api_client.call_api(
1505
- *_param,
1506
- _request_timeout=_request_timeout
1507
- )
1508
- response_data.read()
1509
- return self.api_client.response_deserialize(
1510
- response_data=response_data,
1511
- response_types_map=_response_types_map,
1512
- ).data
1513
-
1514
-
1515
- @validate_call
1516
- def dataset_upload_datapoint_post_with_http_info(
1517
- self,
1518
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the datapoint to.")] = None,
1519
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to create the asset from.")] = None,
1520
- _request_timeout: Union[
1521
- None,
1522
- Annotated[StrictFloat, Field(gt=0)],
1523
- Tuple[
1524
- Annotated[StrictFloat, Field(gt=0)],
1525
- Annotated[StrictFloat, Field(gt=0)]
1526
- ]
1527
- ] = None,
1528
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1529
- _content_type: Optional[StrictStr] = None,
1530
- _headers: Optional[Dict[StrictStr, Any]] = None,
1531
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1532
- ) -> ApiResponse[UploadDatapointsResult]:
1533
- """(Deprecated) Creates a new multi asset datapoint.
1534
-
1535
-
1536
- :param dataset_id: The id of the dataset to upload the datapoint to.
1537
- :type dataset_id: str
1538
- :param files: The image files to create the asset from.
1539
- :type files: List[bytearray]
1540
- :param _request_timeout: timeout setting for this request. If one
1541
- number provided, it will be total request
1542
- timeout. It can also be a pair (tuple) of
1543
- (connection, read) timeouts.
1544
- :type _request_timeout: int, tuple(int, int), optional
1545
- :param _request_auth: set to override the auth_settings for an a single
1546
- request; this effectively ignores the
1547
- authentication in the spec for a single request.
1548
- :type _request_auth: dict, optional
1549
- :param _content_type: force content-type for the request.
1550
- :type _content_type: str, Optional
1551
- :param _headers: set to override the headers for a single
1552
- request; this effectively ignores the headers
1553
- in the spec for a single request.
1554
- :type _headers: dict, optional
1555
- :param _host_index: set to override the host_index for a single
1556
- request; this effectively ignores the host_index
1557
- in the spec for a single request.
1558
- :type _host_index: int, optional
1559
- :return: Returns the result object.
1560
- """ # noqa: E501
1561
- warnings.warn("POST /Dataset/UploadDatapoint is deprecated.", DeprecationWarning)
1562
-
1563
- _param = self._dataset_upload_datapoint_post_serialize(
1564
- dataset_id=dataset_id,
1565
- files=files,
1566
- _request_auth=_request_auth,
1567
- _content_type=_content_type,
1568
- _headers=_headers,
1569
- _host_index=_host_index
1570
- )
1571
-
1572
- _response_types_map: Dict[str, Optional[str]] = {
1573
- '200': "UploadDatapointsResult",
1574
- }
1575
- response_data = self.api_client.call_api(
1576
- *_param,
1577
- _request_timeout=_request_timeout
1578
- )
1579
- response_data.read()
1580
- return self.api_client.response_deserialize(
1581
- response_data=response_data,
1582
- response_types_map=_response_types_map,
1583
- )
1584
-
1585
-
1586
- @validate_call
1587
- def dataset_upload_datapoint_post_without_preload_content(
1588
- self,
1589
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the datapoint to.")] = None,
1590
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to create the asset from.")] = None,
1591
- _request_timeout: Union[
1592
- None,
1593
- Annotated[StrictFloat, Field(gt=0)],
1594
- Tuple[
1595
- Annotated[StrictFloat, Field(gt=0)],
1596
- Annotated[StrictFloat, Field(gt=0)]
1597
- ]
1598
- ] = None,
1599
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1600
- _content_type: Optional[StrictStr] = None,
1601
- _headers: Optional[Dict[StrictStr, Any]] = None,
1602
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1603
- ) -> RESTResponseType:
1604
- """(Deprecated) Creates a new multi asset datapoint.
1605
-
1606
-
1607
- :param dataset_id: The id of the dataset to upload the datapoint to.
1608
- :type dataset_id: str
1609
- :param files: The image files to create the asset from.
1610
- :type files: List[bytearray]
1611
- :param _request_timeout: timeout setting for this request. If one
1612
- number provided, it will be total request
1613
- timeout. It can also be a pair (tuple) of
1614
- (connection, read) timeouts.
1615
- :type _request_timeout: int, tuple(int, int), optional
1616
- :param _request_auth: set to override the auth_settings for an a single
1617
- request; this effectively ignores the
1618
- authentication in the spec for a single request.
1619
- :type _request_auth: dict, optional
1620
- :param _content_type: force content-type for the request.
1621
- :type _content_type: str, Optional
1622
- :param _headers: set to override the headers for a single
1623
- request; this effectively ignores the headers
1624
- in the spec for a single request.
1625
- :type _headers: dict, optional
1626
- :param _host_index: set to override the host_index for a single
1627
- request; this effectively ignores the host_index
1628
- in the spec for a single request.
1629
- :type _host_index: int, optional
1630
- :return: Returns the result object.
1631
- """ # noqa: E501
1632
- warnings.warn("POST /Dataset/UploadDatapoint is deprecated.", DeprecationWarning)
1633
-
1634
- _param = self._dataset_upload_datapoint_post_serialize(
1635
- dataset_id=dataset_id,
1636
- files=files,
1637
- _request_auth=_request_auth,
1638
- _content_type=_content_type,
1639
- _headers=_headers,
1640
- _host_index=_host_index
1641
- )
1642
-
1643
- _response_types_map: Dict[str, Optional[str]] = {
1644
- '200': "UploadDatapointsResult",
1645
- }
1646
- response_data = self.api_client.call_api(
1647
- *_param,
1648
- _request_timeout=_request_timeout
1649
- )
1650
- return response_data.response
1651
-
1652
-
1653
- def _dataset_upload_datapoint_post_serialize(
1654
- self,
1655
- dataset_id,
1656
- files,
1657
- _request_auth,
1658
- _content_type,
1659
- _headers,
1660
- _host_index,
1661
- ) -> RequestSerialized:
1662
-
1663
- _host = None
1664
-
1665
- _collection_formats: Dict[str, str] = {
1666
- 'files': 'multi',
1667
- }
1668
-
1669
- _path_params: Dict[str, str] = {}
1670
- _query_params: List[Tuple[str, str]] = []
1671
- _header_params: Dict[str, Optional[str]] = _headers or {}
1672
- _form_params: List[Tuple[str, str]] = []
1673
- _files: Dict[
1674
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1675
- ] = {}
1676
- _body_params: Optional[bytes] = None
1677
-
1678
- # process the path parameters
1679
- # process the query parameters
1680
- if dataset_id is not None:
1681
-
1682
- _query_params.append(('datasetId', dataset_id))
1683
-
1684
- # process the header parameters
1685
- # process the form parameters
1686
- if files is not None:
1687
- _files['files'] = files
1688
- # process the body parameter
1689
-
1690
-
1691
- # set the HTTP header `Accept`
1692
- if 'Accept' not in _header_params:
1693
- _header_params['Accept'] = self.api_client.select_header_accept(
1694
- [
1695
- 'text/plain',
1696
- 'application/json',
1697
- 'text/json'
1698
- ]
1699
- )
1700
-
1701
- # set the HTTP header `Content-Type`
1702
- if _content_type:
1703
- _header_params['Content-Type'] = _content_type
1704
- else:
1705
- _default_content_type = (
1706
- self.api_client.select_header_content_type(
1707
- [
1708
- 'multipart/form-data'
1709
- ]
1710
- )
1711
- )
1712
- if _default_content_type is not None:
1713
- _header_params['Content-Type'] = _default_content_type
1714
-
1715
- # authentication setting
1716
- _auth_settings: List[str] = [
1717
- 'bearer',
1718
- 'oauth2'
1719
- ]
1720
-
1721
- return self.api_client.param_serialize(
1722
- method='POST',
1723
- resource_path='/Dataset/UploadDatapoint',
1724
- path_params=_path_params,
1725
- query_params=_query_params,
1726
- header_params=_header_params,
1727
- body=_body_params,
1728
- post_params=_form_params,
1729
- files=_files,
1730
- auth_settings=_auth_settings,
1731
- collection_formats=_collection_formats,
1732
- _host=_host,
1733
- _request_auth=_request_auth
1734
- )
1735
-
1736
-
1737
-
1738
-
1739
- @validate_call
1740
- def dataset_upload_files_from_s3_post(
1741
- self,
1742
- upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
1743
- _request_timeout: Union[
1744
- None,
1745
- Annotated[StrictFloat, Field(gt=0)],
1746
- Tuple[
1747
- Annotated[StrictFloat, Field(gt=0)],
1748
- Annotated[StrictFloat, Field(gt=0)]
1749
- ]
1750
- ] = None,
1751
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1752
- _content_type: Optional[StrictStr] = None,
1753
- _headers: Optional[Dict[StrictStr, Any]] = None,
1754
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1755
- ) -> UploadDatapointsResult:
1756
- """Uploads files from an S3 bucket to a dataset.
1757
-
1758
- A new datapoint will be created for each file in the bucket.
1759
-
1760
- :param upload_files_from_s3_bucket_model: The body of the request.
1761
- :type upload_files_from_s3_bucket_model: UploadFilesFromS3BucketModel
1762
- :param _request_timeout: timeout setting for this request. If one
1763
- number provided, it will be total request
1764
- timeout. It can also be a pair (tuple) of
1765
- (connection, read) timeouts.
1766
- :type _request_timeout: int, tuple(int, int), optional
1767
- :param _request_auth: set to override the auth_settings for an a single
1768
- request; this effectively ignores the
1769
- authentication in the spec for a single request.
1770
- :type _request_auth: dict, optional
1771
- :param _content_type: force content-type for the request.
1772
- :type _content_type: str, Optional
1773
- :param _headers: set to override the headers for a single
1774
- request; this effectively ignores the headers
1775
- in the spec for a single request.
1776
- :type _headers: dict, optional
1777
- :param _host_index: set to override the host_index for a single
1778
- request; this effectively ignores the host_index
1779
- in the spec for a single request.
1780
- :type _host_index: int, optional
1781
- :return: Returns the result object.
1782
- """ # noqa: E501
1783
-
1784
- _param = self._dataset_upload_files_from_s3_post_serialize(
1785
- upload_files_from_s3_bucket_model=upload_files_from_s3_bucket_model,
1786
- _request_auth=_request_auth,
1787
- _content_type=_content_type,
1788
- _headers=_headers,
1789
- _host_index=_host_index
1790
- )
1791
-
1792
- _response_types_map: Dict[str, Optional[str]] = {
1793
- '200': "UploadDatapointsResult",
1794
- }
1795
- response_data = self.api_client.call_api(
1796
- *_param,
1797
- _request_timeout=_request_timeout
1798
- )
1799
- response_data.read()
1800
- return self.api_client.response_deserialize(
1801
- response_data=response_data,
1802
- response_types_map=_response_types_map,
1803
- ).data
1804
-
1805
-
1806
- @validate_call
1807
- def dataset_upload_files_from_s3_post_with_http_info(
1445
+ def dataset_upload_files_from_s3_post(
1808
1446
  self,
1809
1447
  upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
1810
1448
  _request_timeout: Union[
@@ -1819,7 +1457,7 @@ class DatasetApi:
1819
1457
  _content_type: Optional[StrictStr] = None,
1820
1458
  _headers: Optional[Dict[StrictStr, Any]] = None,
1821
1459
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1822
- ) -> ApiResponse[UploadDatapointsResult]:
1460
+ ) -> UploadDatapointsResult:
1823
1461
  """Uploads files from an S3 bucket to a dataset.
1824
1462
 
1825
1463
  A new datapoint will be created for each file in the bucket.
@@ -1867,11 +1505,11 @@ class DatasetApi:
1867
1505
  return self.api_client.response_deserialize(
1868
1506
  response_data=response_data,
1869
1507
  response_types_map=_response_types_map,
1870
- )
1508
+ ).data
1871
1509
 
1872
1510
 
1873
1511
  @validate_call
1874
- def dataset_upload_files_from_s3_post_without_preload_content(
1512
+ def dataset_upload_files_from_s3_post_with_http_info(
1875
1513
  self,
1876
1514
  upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
1877
1515
  _request_timeout: Union[
@@ -1886,7 +1524,7 @@ class DatasetApi:
1886
1524
  _content_type: Optional[StrictStr] = None,
1887
1525
  _headers: Optional[Dict[StrictStr, Any]] = None,
1888
1526
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1889
- ) -> RESTResponseType:
1527
+ ) -> ApiResponse[UploadDatapointsResult]:
1890
1528
  """Uploads files from an S3 bucket to a dataset.
1891
1529
 
1892
1530
  A new datapoint will be created for each file in the bucket.
@@ -1930,228 +1568,6 @@ class DatasetApi:
1930
1568
  *_param,
1931
1569
  _request_timeout=_request_timeout
1932
1570
  )
1933
- return response_data.response
1934
-
1935
-
1936
- def _dataset_upload_files_from_s3_post_serialize(
1937
- self,
1938
- upload_files_from_s3_bucket_model,
1939
- _request_auth,
1940
- _content_type,
1941
- _headers,
1942
- _host_index,
1943
- ) -> RequestSerialized:
1944
-
1945
- _host = None
1946
-
1947
- _collection_formats: Dict[str, str] = {
1948
- }
1949
-
1950
- _path_params: Dict[str, str] = {}
1951
- _query_params: List[Tuple[str, str]] = []
1952
- _header_params: Dict[str, Optional[str]] = _headers or {}
1953
- _form_params: List[Tuple[str, str]] = []
1954
- _files: Dict[
1955
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1956
- ] = {}
1957
- _body_params: Optional[bytes] = None
1958
-
1959
- # process the path parameters
1960
- # process the query parameters
1961
- # process the header parameters
1962
- # process the form parameters
1963
- # process the body parameter
1964
- if upload_files_from_s3_bucket_model is not None:
1965
- _body_params = upload_files_from_s3_bucket_model
1966
-
1967
-
1968
- # set the HTTP header `Accept`
1969
- if 'Accept' not in _header_params:
1970
- _header_params['Accept'] = self.api_client.select_header_accept(
1971
- [
1972
- 'text/plain',
1973
- 'application/json',
1974
- 'text/json'
1975
- ]
1976
- )
1977
-
1978
- # set the HTTP header `Content-Type`
1979
- if _content_type:
1980
- _header_params['Content-Type'] = _content_type
1981
- else:
1982
- _default_content_type = (
1983
- self.api_client.select_header_content_type(
1984
- [
1985
- 'application/json',
1986
- 'text/json',
1987
- 'application/*+json'
1988
- ]
1989
- )
1990
- )
1991
- if _default_content_type is not None:
1992
- _header_params['Content-Type'] = _default_content_type
1993
-
1994
- # authentication setting
1995
- _auth_settings: List[str] = [
1996
- 'bearer',
1997
- 'oauth2'
1998
- ]
1999
-
2000
- return self.api_client.param_serialize(
2001
- method='POST',
2002
- resource_path='/Dataset/UploadFilesFromS3',
2003
- path_params=_path_params,
2004
- query_params=_query_params,
2005
- header_params=_header_params,
2006
- body=_body_params,
2007
- post_params=_form_params,
2008
- files=_files,
2009
- auth_settings=_auth_settings,
2010
- collection_formats=_collection_formats,
2011
- _host=_host,
2012
- _request_auth=_request_auth
2013
- )
2014
-
2015
-
2016
-
2017
-
2018
- @validate_call
2019
- def dataset_upload_images_to_dataset_post(
2020
- self,
2021
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the images to.")] = None,
2022
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to upload.")] = None,
2023
- _request_timeout: Union[
2024
- None,
2025
- Annotated[StrictFloat, Field(gt=0)],
2026
- Tuple[
2027
- Annotated[StrictFloat, Field(gt=0)],
2028
- Annotated[StrictFloat, Field(gt=0)]
2029
- ]
2030
- ] = None,
2031
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2032
- _content_type: Optional[StrictStr] = None,
2033
- _headers: Optional[Dict[StrictStr, Any]] = None,
2034
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2035
- ) -> None:
2036
- """(Deprecated) Uploads images to a dataset.
2037
-
2038
- If multiple files are uploaded, a new datapoint will be created for each file.
2039
-
2040
- :param dataset_id: The id of the dataset to upload the images to.
2041
- :type dataset_id: str
2042
- :param files: The image files to upload.
2043
- :type files: List[bytearray]
2044
- :param _request_timeout: timeout setting for this request. If one
2045
- number provided, it will be total request
2046
- timeout. It can also be a pair (tuple) of
2047
- (connection, read) timeouts.
2048
- :type _request_timeout: int, tuple(int, int), optional
2049
- :param _request_auth: set to override the auth_settings for an a single
2050
- request; this effectively ignores the
2051
- authentication in the spec for a single request.
2052
- :type _request_auth: dict, optional
2053
- :param _content_type: force content-type for the request.
2054
- :type _content_type: str, Optional
2055
- :param _headers: set to override the headers for a single
2056
- request; this effectively ignores the headers
2057
- in the spec for a single request.
2058
- :type _headers: dict, optional
2059
- :param _host_index: set to override the host_index for a single
2060
- request; this effectively ignores the host_index
2061
- in the spec for a single request.
2062
- :type _host_index: int, optional
2063
- :return: Returns the result object.
2064
- """ # noqa: E501
2065
- warnings.warn("POST /Dataset/UploadImagesToDataset is deprecated.", DeprecationWarning)
2066
-
2067
- _param = self._dataset_upload_images_to_dataset_post_serialize(
2068
- dataset_id=dataset_id,
2069
- files=files,
2070
- _request_auth=_request_auth,
2071
- _content_type=_content_type,
2072
- _headers=_headers,
2073
- _host_index=_host_index
2074
- )
2075
-
2076
- _response_types_map: Dict[str, Optional[str]] = {
2077
- '200': None,
2078
- }
2079
- response_data = self.api_client.call_api(
2080
- *_param,
2081
- _request_timeout=_request_timeout
2082
- )
2083
- response_data.read()
2084
- return self.api_client.response_deserialize(
2085
- response_data=response_data,
2086
- response_types_map=_response_types_map,
2087
- ).data
2088
-
2089
-
2090
- @validate_call
2091
- def dataset_upload_images_to_dataset_post_with_http_info(
2092
- self,
2093
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the images to.")] = None,
2094
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to upload.")] = None,
2095
- _request_timeout: Union[
2096
- None,
2097
- Annotated[StrictFloat, Field(gt=0)],
2098
- Tuple[
2099
- Annotated[StrictFloat, Field(gt=0)],
2100
- Annotated[StrictFloat, Field(gt=0)]
2101
- ]
2102
- ] = None,
2103
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2104
- _content_type: Optional[StrictStr] = None,
2105
- _headers: Optional[Dict[StrictStr, Any]] = None,
2106
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2107
- ) -> ApiResponse[None]:
2108
- """(Deprecated) Uploads images to a dataset.
2109
-
2110
- If multiple files are uploaded, a new datapoint will be created for each file.
2111
-
2112
- :param dataset_id: The id of the dataset to upload the images to.
2113
- :type dataset_id: str
2114
- :param files: The image files to upload.
2115
- :type files: List[bytearray]
2116
- :param _request_timeout: timeout setting for this request. If one
2117
- number provided, it will be total request
2118
- timeout. It can also be a pair (tuple) of
2119
- (connection, read) timeouts.
2120
- :type _request_timeout: int, tuple(int, int), optional
2121
- :param _request_auth: set to override the auth_settings for an a single
2122
- request; this effectively ignores the
2123
- authentication in the spec for a single request.
2124
- :type _request_auth: dict, optional
2125
- :param _content_type: force content-type for the request.
2126
- :type _content_type: str, Optional
2127
- :param _headers: set to override the headers for a single
2128
- request; this effectively ignores the headers
2129
- in the spec for a single request.
2130
- :type _headers: dict, optional
2131
- :param _host_index: set to override the host_index for a single
2132
- request; this effectively ignores the host_index
2133
- in the spec for a single request.
2134
- :type _host_index: int, optional
2135
- :return: Returns the result object.
2136
- """ # noqa: E501
2137
- warnings.warn("POST /Dataset/UploadImagesToDataset is deprecated.", DeprecationWarning)
2138
-
2139
- _param = self._dataset_upload_images_to_dataset_post_serialize(
2140
- dataset_id=dataset_id,
2141
- files=files,
2142
- _request_auth=_request_auth,
2143
- _content_type=_content_type,
2144
- _headers=_headers,
2145
- _host_index=_host_index
2146
- )
2147
-
2148
- _response_types_map: Dict[str, Optional[str]] = {
2149
- '200': None,
2150
- }
2151
- response_data = self.api_client.call_api(
2152
- *_param,
2153
- _request_timeout=_request_timeout
2154
- )
2155
1571
  response_data.read()
2156
1572
  return self.api_client.response_deserialize(
2157
1573
  response_data=response_data,
@@ -2160,10 +1576,9 @@ class DatasetApi:
2160
1576
 
2161
1577
 
2162
1578
  @validate_call
2163
- def dataset_upload_images_to_dataset_post_without_preload_content(
1579
+ def dataset_upload_files_from_s3_post_without_preload_content(
2164
1580
  self,
2165
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to upload the images to.")] = None,
2166
- files: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The image files to upload.")] = None,
1581
+ upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
2167
1582
  _request_timeout: Union[
2168
1583
  None,
2169
1584
  Annotated[StrictFloat, Field(gt=0)],
@@ -2177,14 +1592,12 @@ class DatasetApi:
2177
1592
  _headers: Optional[Dict[StrictStr, Any]] = None,
2178
1593
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2179
1594
  ) -> RESTResponseType:
2180
- """(Deprecated) Uploads images to a dataset.
1595
+ """Uploads files from an S3 bucket to a dataset.
2181
1596
 
2182
- If multiple files are uploaded, a new datapoint will be created for each file.
1597
+ A new datapoint will be created for each file in the bucket.
2183
1598
 
2184
- :param dataset_id: The id of the dataset to upload the images to.
2185
- :type dataset_id: str
2186
- :param files: The image files to upload.
2187
- :type files: List[bytearray]
1599
+ :param upload_files_from_s3_bucket_model: The body of the request.
1600
+ :type upload_files_from_s3_bucket_model: UploadFilesFromS3BucketModel
2188
1601
  :param _request_timeout: timeout setting for this request. If one
2189
1602
  number provided, it will be total request
2190
1603
  timeout. It can also be a pair (tuple) of
@@ -2206,11 +1619,9 @@ class DatasetApi:
2206
1619
  :type _host_index: int, optional
2207
1620
  :return: Returns the result object.
2208
1621
  """ # noqa: E501
2209
- warnings.warn("POST /Dataset/UploadImagesToDataset is deprecated.", DeprecationWarning)
2210
1622
 
2211
- _param = self._dataset_upload_images_to_dataset_post_serialize(
2212
- dataset_id=dataset_id,
2213
- files=files,
1623
+ _param = self._dataset_upload_files_from_s3_post_serialize(
1624
+ upload_files_from_s3_bucket_model=upload_files_from_s3_bucket_model,
2214
1625
  _request_auth=_request_auth,
2215
1626
  _content_type=_content_type,
2216
1627
  _headers=_headers,
@@ -2218,7 +1629,7 @@ class DatasetApi:
2218
1629
  )
2219
1630
 
2220
1631
  _response_types_map: Dict[str, Optional[str]] = {
2221
- '200': None,
1632
+ '200': "UploadDatapointsResult",
2222
1633
  }
2223
1634
  response_data = self.api_client.call_api(
2224
1635
  *_param,
@@ -2227,10 +1638,9 @@ class DatasetApi:
2227
1638
  return response_data.response
2228
1639
 
2229
1640
 
2230
- def _dataset_upload_images_to_dataset_post_serialize(
1641
+ def _dataset_upload_files_from_s3_post_serialize(
2231
1642
  self,
2232
- dataset_id,
2233
- files,
1643
+ upload_files_from_s3_bucket_model,
2234
1644
  _request_auth,
2235
1645
  _content_type,
2236
1646
  _headers,
@@ -2240,7 +1650,6 @@ class DatasetApi:
2240
1650
  _host = None
2241
1651
 
2242
1652
  _collection_formats: Dict[str, str] = {
2243
- 'files': 'multi',
2244
1653
  }
2245
1654
 
2246
1655
  _path_params: Dict[str, str] = {}
@@ -2254,17 +1663,22 @@ class DatasetApi:
2254
1663
 
2255
1664
  # process the path parameters
2256
1665
  # process the query parameters
2257
- if dataset_id is not None:
2258
-
2259
- _query_params.append(('datasetId', dataset_id))
2260
-
2261
1666
  # process the header parameters
2262
1667
  # process the form parameters
2263
- if files is not None:
2264
- _files['files'] = files
2265
1668
  # process the body parameter
1669
+ if upload_files_from_s3_bucket_model is not None:
1670
+ _body_params = upload_files_from_s3_bucket_model
2266
1671
 
2267
1672
 
1673
+ # set the HTTP header `Accept`
1674
+ if 'Accept' not in _header_params:
1675
+ _header_params['Accept'] = self.api_client.select_header_accept(
1676
+ [
1677
+ 'text/plain',
1678
+ 'application/json',
1679
+ 'text/json'
1680
+ ]
1681
+ )
2268
1682
 
2269
1683
  # set the HTTP header `Content-Type`
2270
1684
  if _content_type:
@@ -2273,7 +1687,9 @@ class DatasetApi:
2273
1687
  _default_content_type = (
2274
1688
  self.api_client.select_header_content_type(
2275
1689
  [
2276
- 'multipart/form-data'
1690
+ 'application/json',
1691
+ 'text/json',
1692
+ 'application/*+json'
2277
1693
  ]
2278
1694
  )
2279
1695
  )
@@ -2288,7 +1704,7 @@ class DatasetApi:
2288
1704
 
2289
1705
  return self.api_client.param_serialize(
2290
1706
  method='POST',
2291
- resource_path='/Dataset/UploadImagesToDataset',
1707
+ resource_path='/Dataset/UploadFilesFromS3',
2292
1708
  path_params=_path_params,
2293
1709
  query_params=_query_params,
2294
1710
  header_params=_header_params,