From d53b75f284960d6d018daa23eb29c9c35351b8ec Mon Sep 17 00:00:00 2001
From: alaskowski <alaskowski@ethz.ch>
Date: Fri, 26 May 2023 12:28:06 +0200
Subject: [PATCH] SSDM-13568: Updated pybis docs

---
 .../src/python/README.md                      | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/api-openbis-python3-pybis/src/python/README.md b/api-openbis-python3-pybis/src/python/README.md
index 0100f86d3ec..739421c0092 100644
--- a/api-openbis-python3-pybis/src/python/README.md
+++ b/api-openbis-python3-pybis/src/python/README.md
@@ -638,6 +638,27 @@ dataframe = experiments.df         # get Pandas DataFrame of result list
 exp = o.get_experiment('/MY_SPACE/MY_PROJECT/MY_EXPERIMENT')
 ```
 
+***Note: Attributes download***
+
+The `get_experiments()` method, by default, returns fewer details to make the download process faster.
+However, if you want to include specific attributes in the results, you can do so by using the `attrs` parameter.
+
+The `get_experiments()` method results include only `identifier`, `permId`, `type`, `registrator`, `registrationDate`, `modifier`, `modificationDate`
+
+```get attributes
+experiments = o.get_experiments(
+    project       = 'YEASTS',
+    space         = 'MY_SPACE',
+    type          = 'DEFAULT_EXPERIMENT',
+    attrs          = ["parents", "children"]
+)
+
+    identifier             permId                type               registrator    registrationDate     modifier    modificationDate     parents                    children
+--  ---------------------  --------------------  -----------------  -------------  -------------------  ----------  -------------------  -------------------------  ----------
+ 0  /MY_SPACE/YEASTS/EXP1  20230407070122991-46  DEFAULT_EXPERIMENT  admin          2023-04-07 09:01:23  admin       2023-04-07 09:02:22  ['/MY_SPACE/YEASTS/EXP2']  []
+
+```
+
 ### Experiment attributes
 
 ```
@@ -917,6 +938,26 @@ samples.df                            # returns a Pandas DataFrame object
 samples = o.get_samples(props="*")    # retrieve all properties of all samples
 ```
 
+***Note: Attributes download***
+
+The `get_samples()` method, by default, returns fewer details to make the download process faster.
+However, if you want to include specific attributes in the results, you can do so by using the `attrs` parameter.
+
+The `get_samples()` method results include only `identifier`, `permId`, `type`, `registrator`, `registrationDate`, `modifier`, `modificationDate`
+
+```get attributes
+experiments = o.get_samples(
+    space         = 'MY_SPACE',
+    type          = 'YEAST',
+    attrs          = ["parents", "children"]
+)
+
+    identifier                permId                type               registrator    registrationDate     modifier    modificationDate     parents                    children
+--  ---------------------     --------------------  -----------------  -------------  -------------------  ----------  -------------------  -------------------------  ----------
+ 0  /MY_SPACE/YEASTS/SAMPLE1  20230407070121337-47  YEAST              admin          2023-04-07 09:06:23  admin       2023-04-07 09:06:22  ['/MY_SPACE/YEASTS/EXP2']  []
+
+```
+
 ### freezing samples
 
 ```
@@ -957,6 +998,26 @@ for dataset in datasets:
 dataset = datasets[0]
 ```
 
+***Note: Attributes download***
+
+The `get_datasets()` method, by default, returns fewer details to make the download process faster.
+However, if you want to include specific attributes in the results, you can do so by using the `attrs` parameter.
+
+The `get_datasets()` method results include only `permId`, `type`, `experiment`, `sample`, `registrationDate`, `modificationDate`,
+`location`, `status`, `presentInArchive`, `size`
+
+```get attributes
+experiments = o.get_datasets(
+    space         = 'MY_SPACE',
+    attrs          = ["parents", "children"]
+)
+
+    permId                type      experiment                sample                   registrationDate     modificationDate     location                                 status     presentInArchive      size  parents                   children
+--  --------------------  --------  ------------------------  ---------------------    -------------------  -------------------  ---------------------------------------  ---------  ------------------  ------  ------------------------  ------------------------
+ 0  20230526101657295-48  RAW_DATA  /MY_SPACE/DEFAULT/DEFAULT  /MY_SPACE/DEFAULT/EXP1  2023-05-26 12:16:58  2023-05-26 12:17:37  1F60C7DC-63D8-4C07/20230526101657295-48  AVAILABLE  False                  469  []                        ['20230526101737019-49']
+ 1  20230526101737019-49  RAW_DATA  /MY_SPACE/DEFAULT/DEFAULT  /MY_SPACE/DEFAULT/EXP1  2023-05-26 12:17:37  2023-05-26 12:17:37  1F60C7DC-63D8-4C07/20230526101737019-49  AVAILABLE  False                  127  ['20230526101657295-48']  []
+```
+
 **More dataset functions:**
 
 ```
-- 
GitLab