dataroom-client 1.0.6.post32.dev0__tar.gz → 1.0.6.post79.dev0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataroom-client
3
- Version: 1.0.6.post32.dev0
3
+ Version: 1.0.6.post79.dev0
4
4
  Summary: A python client to interface with the Dataroom backend API
5
5
  Author: Ales Kocjancic
6
6
  Author-email: hi@ales.io
@@ -1768,6 +1768,37 @@ class DataRoomClient:
1768
1768
  },
1769
1769
  )
1770
1770
 
1771
+ async def copy_dataset(self, from_slug_version: str, name: str, slug: str, description: str = None) -> dict:
1772
+ """
1773
+ Creates a new dataset and copies all images from an existing dataset version into it.
1774
+
1775
+ @param from_slug_version: The source dataset version to copy images from, e.g. "my-dataset/1".
1776
+ @param name: The display name for the new dataset.
1777
+ @param slug: The URL-friendly slug for the new dataset.
1778
+ @param description: An optional description for the new dataset.
1779
+ @return: A dictionary representing the newly created dataset.
1780
+ """
1781
+ return await self._make_request(
1782
+ url=f"datasets/{from_slug_version}/copy/",
1783
+ method="POST",
1784
+ json={
1785
+ "name": name,
1786
+ "slug": slug,
1787
+ "description": description if description else "",
1788
+ },
1789
+ )
1790
+
1791
+ async def delete_dataset(self, slug_version: str) -> None:
1792
+ """
1793
+ Deletes a dataset version and removes its reference from all images.
1794
+
1795
+ @param slug_version: The identifier for the dataset version to delete, e.g. "my-dataset/1".
1796
+ """
1797
+ return await self._make_request(
1798
+ url=f"datasets/{slug_version}/",
1799
+ method="DELETE",
1800
+ )
1801
+
1771
1802
 
1772
1803
 
1773
1804
  class AsyncRunner:
@@ -6,7 +6,7 @@ authors = [
6
6
  ]
7
7
  readme = "README.md"
8
8
  dynamic = []
9
- version = "1.0.6.post32.dev0"
9
+ version = "1.0.6.post79.dev0"
10
10
 
11
11
  [tool.poetry]
12
12