Skip to content

Commit a5f5518

Browse files
sminotnathanthorpe
andauthored
Get sample metadata (#120)
* Get sample metadata * update pdoc dependency --------- Co-authored-by: Nathan Thorpe <[email protected]>
1 parent cd8c0fc commit a5f5518

File tree

3 files changed

+178
-169
lines changed

3 files changed

+178
-169
lines changed

cirro/sdk/project.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@ def upload_dataset(
210210
else:
211211
sleep(2)
212212

213+
def samples(self, max_items: int = 10000):
214+
"""
215+
Retrieves a list of samples associated with a project along with their metadata
216+
217+
Args:
218+
max_items (int): Maximum number of records to get (default 10,000)
219+
"""
220+
return self._client.metadata.get_project_samples(self.id, max_items)
221+
213222

214223
class DataPortalProjects(DataPortalAssets[DataPortalProject]):
215224
"""Collection of DataPortalProject objects"""

0 commit comments

Comments
 (0)