rucio-clients 37.3.0__py3-none-any.whl → 37.5.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 rucio-clients might be problematic. Click here for more details.

Files changed (41) hide show
  1. rucio/cli/rule.py +1 -1
  2. rucio/client/accountclient.py +205 -60
  3. rucio/client/accountlimitclient.py +84 -25
  4. rucio/client/baseclient.py +85 -48
  5. rucio/client/client.py +49 -41
  6. rucio/client/configclient.py +36 -13
  7. rucio/client/credentialclient.py +16 -6
  8. rucio/client/didclient.py +321 -133
  9. rucio/client/diracclient.py +13 -6
  10. rucio/client/downloadclient.py +435 -165
  11. rucio/client/exportclient.py +8 -2
  12. rucio/client/fileclient.py +10 -3
  13. rucio/client/importclient.py +4 -1
  14. rucio/client/lifetimeclient.py +48 -31
  15. rucio/client/lockclient.py +22 -7
  16. rucio/client/metaconventionsclient.py +59 -21
  17. rucio/client/pingclient.py +3 -1
  18. rucio/client/replicaclient.py +213 -96
  19. rucio/client/requestclient.py +124 -16
  20. rucio/client/rseclient.py +385 -160
  21. rucio/client/ruleclient.py +147 -51
  22. rucio/client/scopeclient.py +35 -10
  23. rucio/client/subscriptionclient.py +60 -27
  24. rucio/client/touchclient.py +16 -7
  25. rucio/common/constants.py +14 -17
  26. rucio/common/utils.py +18 -2
  27. rucio/rse/rsemanager.py +2 -2
  28. rucio/vcsversion.py +3 -3
  29. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rucio.cfg.template +0 -1
  30. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/METADATA +1 -1
  31. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/RECORD +41 -41
  32. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/WHEEL +1 -1
  33. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rse-accounts.cfg.template +0 -0
  34. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/etc/rucio.cfg.atlas.client.template +0 -0
  35. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/requirements.client.txt +0 -0
  36. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/data/rucio_client/merge_rucio_configs.py +0 -0
  37. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/scripts/rucio +0 -0
  38. {rucio_clients-37.3.0.data → rucio_clients-37.5.0.data}/scripts/rucio-admin +0 -0
  39. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/licenses/AUTHORS.rst +0 -0
  40. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/licenses/LICENSE +0 -0
  41. {rucio_clients-37.3.0.dist-info → rucio_clients-37.5.0.dist-info}/top_level.txt +0 -0
rucio/client/didclient.py CHANGED
@@ -45,14 +45,21 @@ class DIDClient(BaseClient):
45
45
  """
46
46
  List all data identifiers in a scope which match a given pattern.
47
47
 
48
- :param scope: The scope name.
49
- :param filters: A nested dictionary of key/value pairs like [{'key1': 'value1', 'key2.lte': 'value2'}, {'key3.gte, 'value3'}].
50
- Keypairs in the same dictionary are AND'ed together, dictionaries are OR'ed together. Keys should be suffixed
51
- like <key>.<operation>, e.g. key1 >= value1 is equivalent to {'key1.gte': value}, where <operation> belongs to one
52
- of the set {'lte', 'gte', 'gt', 'lt', 'ne' or ''}. Equivalence doesn't require an operator.
53
- :param did_type: The type of the did: 'all'(container, dataset or file)|'collection'(dataset or container)|'dataset'|'container'|'file'
54
- :param long: Long format option to display more information for each DID.
55
- :param recursive: Recursively list DIDs content.
48
+ Parameters
49
+ ----------
50
+ scope :
51
+ The scope name.
52
+ filters :
53
+ A nested dictionary of key/value pairs like [{'key1': 'value1', 'key2.lte': 'value2'}, {'key3.gte, 'value3'}].
54
+ Keypairs in the same dictionary are AND'ed together, dictionaries are OR'ed together. Keys should be suffixed
55
+ like <key>.<operation>, e.g. key1 >= value1 is equivalent to {'key1.gte': value}, where <operation> belongs to one
56
+ of the set {'lte', 'gte', 'gt', 'lt', 'ne' or ''}. Equivalence doesn't require an operator.
57
+ did_type :
58
+ The type of the did: 'all'(container, dataset or file)|'collection'(dataset or container)|'dataset'|'container'|'file'
59
+ long :
60
+ Long format option to display more information for each DID.
61
+ recursive :
62
+ Recursively list DIDs content.
56
63
  """
57
64
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), 'dids', 'search'])
58
65
 
@@ -103,15 +110,27 @@ class DIDClient(BaseClient):
103
110
  """
104
111
  Add data identifier for a dataset or container.
105
112
 
106
- :param scope: The scope name.
107
- :param name: The data identifier name.
108
- :param did_type: The data identifier type (dataset|container).
109
- :param statuses: Dictionary with statuses, e.g. {'monotonic':True}.
110
- :param meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
111
- :param rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
112
- :param lifetime: DID's lifetime (in seconds).
113
- :param dids: The content.
114
- :param rse: The RSE name when registering replicas.
113
+ Parameters
114
+ ----------
115
+ scope :
116
+ The scope name.
117
+ name :
118
+ The data identifier name.
119
+ did_type :
120
+ The data identifier type (dataset|container).
121
+ statuses :
122
+ Dictionary with statuses, e.g. {'monotonic':True}.
123
+ meta :
124
+ Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
125
+ rules :
126
+ Replication rules associated with the data identifier. A list of dictionaries,
127
+ e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
128
+ lifetime :
129
+ DID's lifetime (in seconds).
130
+ dids :
131
+ The content.
132
+ rse :
133
+ The RSE name when registering replicas.
115
134
  """
116
135
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name)])
117
136
  url = build_url(choice(self.list_hosts), path=path)
@@ -163,14 +182,25 @@ class DIDClient(BaseClient):
163
182
  """
164
183
  Add data identifier for a dataset.
165
184
 
166
- :param scope: The scope name.
167
- :param name: The data identifier name.
168
- :param statuses: Dictionary with statuses, e.g.g {'monotonic':True}.
169
- :param meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
170
- :param rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
171
- :param lifetime: DID's lifetime (in seconds).
172
- :param files: The content.
173
- :param rse: The RSE name when registering replicas.
185
+ Parameters
186
+ ----------
187
+ scope :
188
+ The scope name.
189
+ name :
190
+ The data identifier name.
191
+ statuses :
192
+ Dictionary with statuses, e.g. {'monotonic':True}.
193
+ meta :
194
+ Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
195
+ rules :
196
+ Replication rules associated with the data identifier. A list of dictionaries,
197
+ e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
198
+ lifetime :
199
+ DID's lifetime (in seconds).
200
+ files :
201
+ The content.
202
+ rse :
203
+ The RSE name when registering replicas.
174
204
  """
175
205
  return self.add_did(scope=scope, name=name, did_type='DATASET',
176
206
  statuses=statuses, meta=meta, rules=rules,
@@ -180,7 +210,10 @@ class DIDClient(BaseClient):
180
210
  """
181
211
  Bulk add datasets.
182
212
 
183
- :param dsns: A list of datasets.
213
+ Parameters
214
+ ----------
215
+ dsns :
216
+ A list of datasets.
184
217
  """
185
218
  return self.add_dids(dids=[dict(list(dsn.items()) + [('type', 'DATASET')]) for dsn in dsns])
186
219
 
@@ -196,12 +229,21 @@ class DIDClient(BaseClient):
196
229
  """
197
230
  Add data identifier for a container.
198
231
 
199
- :param scope: The scope name.
200
- :param name: The data identifier name.
201
- :param statuses: Dictionary with statuses, e.g.g {'monotonic':True}.
202
- :param meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
203
- :param rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
204
- :param lifetime: DID's lifetime (in seconds).
232
+ Parameters
233
+ ----------
234
+ scope :
235
+ The scope name.
236
+ name :
237
+ The data identifier name.
238
+ statuses :
239
+ Dictionary with statuses, e.g. {'monotonic':True}.
240
+ meta :
241
+ Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.
242
+ rules :
243
+ Replication rules associated with the data identifier. A list of dictionaries,
244
+ e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].
245
+ lifetime :
246
+ DID's lifetime (in seconds).
205
247
  """
206
248
  return self.add_did(scope=scope, name=name, did_type='CONTAINER', statuses=statuses, meta=meta, rules=rules, lifetime=lifetime)
207
249
 
@@ -209,7 +251,10 @@ class DIDClient(BaseClient):
209
251
  """
210
252
  Bulk add containers.
211
253
 
212
- :param cnts: A list of containers.
254
+ Parameters
255
+ ----------
256
+ cnts :
257
+ A list of containers.
213
258
  """
214
259
  return self.add_dids(dids=[dict(list(cnt.items()) + [('type', 'CONTAINER')]) for cnt in cnts])
215
260
 
@@ -223,10 +268,16 @@ class DIDClient(BaseClient):
223
268
  """
224
269
  Attach data identifier.
225
270
 
226
- :param scope: The scope name.
227
- :param name: The data identifier name.
228
- :param dids: The content.
229
- :param rse: The RSE name when registering replicas.
271
+ Parameters
272
+ ----------
273
+ scope :
274
+ The scope name.
275
+ name :
276
+ The data identifier name.
277
+ dids :
278
+ The content.
279
+ rse :
280
+ The RSE name when registering replicas.
230
281
  """
231
282
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'dids'])
232
283
  url = build_url(choice(self.list_hosts), path=path)
@@ -247,11 +298,16 @@ class DIDClient(BaseClient):
247
298
  dids: Optional["Sequence[Mapping[str, Any]]"] = None
248
299
  ) -> bool:
249
300
  """
250
- Detach data identifier
301
+ Detach data identifier.
251
302
 
252
- :param scope: The scope name.
253
- :param name: The data identifier name.
254
- :param dids: The content.
303
+ Parameters
304
+ ----------
305
+ scope :
306
+ The scope name.
307
+ name :
308
+ The data identifier name.
309
+ dids :
310
+ The content.
255
311
  """
256
312
 
257
313
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'dids'])
@@ -271,11 +327,14 @@ class DIDClient(BaseClient):
271
327
  """
272
328
  Add dids to dids.
273
329
 
274
- :param attachments: The attachments.
275
- attachments is: [attachment, attachment, ...]
276
- attachment is: {'scope': scope, 'name': name, 'dids': dids}
330
+ Parameters
331
+ ----------
332
+ attachments :
333
+ The attachments.
334
+ An attachment contains: "scope", "name", "dids".
277
335
  dids is: [{'scope': scope, 'name': name}, ...]
278
- :param ignore_duplicate: If True, ignore duplicate entries.
336
+ ignore_duplicate :
337
+ If True, ignore duplicate entries.
279
338
  """
280
339
  path = '/'.join([self.DIDS_BASEURL, 'attachments'])
281
340
  url = build_url(choice(self.list_hosts), path=path)
@@ -295,11 +354,14 @@ class DIDClient(BaseClient):
295
354
  """
296
355
  Add files to datasets.
297
356
 
298
- :param attachments: The attachments.
299
- attachments is: [attachment, attachment, ...]
300
- attachment is: {'scope': scope, 'name': name, 'dids': dids}
357
+ Parameters
358
+ ----------
359
+ attachments :
360
+ The attachments.
361
+ An attachment contains: "scope", "name", "dids".
301
362
  dids is: [{'scope': scope, 'name': name}, ...]
302
- :param ignore_duplicate: If True, ignore duplicate entries.
363
+ ignore_duplicate :
364
+ If True, ignore duplicate entries.
303
365
  """
304
366
  return self.attach_dids_to_dids(attachments=attachments,
305
367
  ignore_duplicate=ignore_duplicate)
@@ -311,9 +373,11 @@ class DIDClient(BaseClient):
311
373
  """
312
374
  Add datasets_to_containers.
313
375
 
314
- :param attachments: The attachments.
315
- attachments is: [attachment, attachment, ...]
316
- attachment is: {'scope': scope, 'name': name, 'dids': dids}
376
+ Parameters
377
+ ----------
378
+ attachments :
379
+ The attachments.
380
+ An attachment contains: "scope", "name", "dids".
317
381
  dids is: [{'scope': scope, 'name': name}, ...]
318
382
  """
319
383
  return self.attach_dids_to_dids(attachments=attachments)
@@ -325,9 +389,11 @@ class DIDClient(BaseClient):
325
389
  """
326
390
  Add containers_to_containers.
327
391
 
328
- :param attachments: The attachments.
329
- attachments is: [attachment, attachment, ...]
330
- attachment is: {'scope': scope, 'name': name, 'dids': dids}
392
+ Parameters
393
+ ----------
394
+ attachments :
395
+ The attachments.
396
+ An attachment contains: "scope", "name", "dids".
331
397
  dids is: [{'scope': scope, 'name': name}, ...]
332
398
  """
333
399
  return self.attach_dids_to_dids(attachments=attachments)
@@ -342,10 +408,16 @@ class DIDClient(BaseClient):
342
408
  """
343
409
  Add files to datasets.
344
410
 
345
- :param scope: The scope name.
346
- :param name: The dataset name.
347
- :param files: The content.
348
- :param rse: The RSE name when registering replicas.
411
+ Parameters
412
+ ----------
413
+ scope :
414
+ The scope name.
415
+ name :
416
+ The dataset name.
417
+ files :
418
+ The content.
419
+ rse :
420
+ The RSE name when registering replicas.
349
421
  """
350
422
  return self.attach_dids(scope=scope, name=name, dids=files, rse=rse)
351
423
 
@@ -358,9 +430,14 @@ class DIDClient(BaseClient):
358
430
  """
359
431
  Add files to archive.
360
432
 
361
- :param scope: The scope name.
362
- :param name: The dataset name.
363
- :param files: The content.
433
+ Parameters
434
+ ----------
435
+ scope :
436
+ The scope name.
437
+ name :
438
+ The dataset name.
439
+ files :
440
+ The content.
364
441
  """
365
442
  return self.attach_dids(scope=scope, name=name, dids=files)
366
443
 
@@ -373,9 +450,14 @@ class DIDClient(BaseClient):
373
450
  """
374
451
  Add datasets to container.
375
452
 
376
- :param scope: The scope name.
377
- :param name: The dataset name.
378
- :param dsns: The content.
453
+ Parameters
454
+ ----------
455
+ scope :
456
+ The scope name.
457
+ name :
458
+ The dataset name.
459
+ dsns :
460
+ The content.
379
461
  """
380
462
  return self.attach_dids(scope=scope, name=name, dids=dsns)
381
463
 
@@ -388,9 +470,14 @@ class DIDClient(BaseClient):
388
470
  """
389
471
  Add containers to container.
390
472
 
391
- :param scope: The scope name.
392
- :param name: The dataset name.
393
- :param cnts: The content.
473
+ Parameters
474
+ ----------
475
+ scope :
476
+ The scope name.
477
+ name :
478
+ The dataset name.
479
+ cnts :
480
+ The content.
394
481
  """
395
482
  return self.attach_dids(scope=scope, name=name, dids=cnts)
396
483
 
@@ -402,8 +489,12 @@ class DIDClient(BaseClient):
402
489
  """
403
490
  List data identifier contents.
404
491
 
405
- :param scope: The scope name.
406
- :param name: The data identifier name.
492
+ Parameters
493
+ ----------
494
+ scope :
495
+ The scope name.
496
+ name :
497
+ The data identifier name.
407
498
  """
408
499
 
409
500
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'dids'])
@@ -422,8 +513,13 @@ class DIDClient(BaseClient):
422
513
  """
423
514
  List data identifier contents history.
424
515
 
425
- :param scope: The scope name.
426
- :param name: The data identifier name.
516
+ Parameters
517
+ ----------
518
+ scope :
519
+ The scope name.
520
+ name :
521
+ The data identifier name.
522
+
427
523
  """
428
524
 
429
525
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'dids', 'history'])
@@ -443,9 +539,14 @@ class DIDClient(BaseClient):
443
539
  """
444
540
  List data identifier file contents.
445
541
 
446
- :param scope: The scope name.
447
- :param name: The data identifier name.
448
- :param long: A boolean to choose if GUID is returned or not.
542
+ Parameters
543
+ ----------
544
+ scope :
545
+ The scope name.
546
+ name :
547
+ The data identifier name.
548
+ long :
549
+ A boolean to choose if GUID is returned or not.
449
550
  """
450
551
 
451
552
  payload = {}
@@ -465,7 +566,10 @@ class DIDClient(BaseClient):
465
566
  """
466
567
  List data identifier file contents.
467
568
 
468
- :param dids: The list of DIDs.
569
+ Parameters
570
+ ----------
571
+ dids :
572
+ The list of DIDs.
469
573
  """
470
574
 
471
575
  data = {'dids': dids}
@@ -489,11 +593,17 @@ class DIDClient(BaseClient):
489
593
  """
490
594
  Retrieve a single data identifier.
491
595
 
492
- :param scope: The scope name.
493
- :param name: The data identifier name.
494
- :param dynamic_depth: The DID type as string ('FILE'/'DATASET') at which to stop the dynamic
495
- length/bytes calculation. If not set, the size will not be computed dynamically.
496
- :param dynamic: (Deprecated) same as dynamic_depth = 'FILE'
596
+ Parameters
597
+ ----------
598
+ scope :
599
+ The scope name.
600
+ name :
601
+ The data identifier name.
602
+ dynamic_depth :
603
+ The DID type ('FILE'/'DATASET') at which to stop the dynamic
604
+ length/bytes calculation. If not set, the size will not be computed dynamically.
605
+ dynamic :
606
+ Deprecated. Same as setting dynamic_depth='FILE'.
497
607
  """
498
608
 
499
609
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name)])
@@ -517,11 +627,16 @@ class DIDClient(BaseClient):
517
627
  plugin: str = 'DID_COLUMN'
518
628
  ) -> dict[str, Any]:
519
629
  """
520
- Get data identifier metadata
630
+ Get data identifier metadata.
521
631
 
522
- :param scope: The scope name.
523
- :param name: The data identifier name.
524
- :param plugin: Backend Metadata plugin the Rucio server should use to query data.
632
+ Parameters
633
+ ----------
634
+ scope :
635
+ The scope name.
636
+ name :
637
+ The data identifier name.
638
+ plugin :
639
+ Backend Metadata plugin the Rucio server should use to query data.
525
640
  """
526
641
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'meta'])
527
642
  url = build_url(choice(self.list_hosts), path=path)
@@ -543,9 +658,14 @@ class DIDClient(BaseClient):
543
658
  ) -> "Iterator[dict[str, Any]]":
544
659
  """
545
660
  Bulk get data identifier metadata
546
- :param dids: A list of dids.
547
- :param inherit: A boolean. If set to true, the metadata of the parent are concatenated.
548
- :param plugin: The metadata plugin to query, 'ALL' for all available plugins
661
+ Parameters
662
+ ----------
663
+ dids :
664
+ A list of dids.
665
+ inherit :
666
+ A boolean. If set to true, the metadata of the parent are concatenated.
667
+ plugin :
668
+ The metadata plugin to query, 'ALL' for all available plugins
549
669
  """
550
670
  data = {'dids': dids, 'inherit': inherit, 'plugin': plugin}
551
671
  path = '/'.join([self.DIDS_BASEURL, 'bulkmeta'])
@@ -565,13 +685,20 @@ class DIDClient(BaseClient):
565
685
  recursive: bool = False
566
686
  ) -> bool:
567
687
  """
568
- Set data identifier metadata
569
-
570
- :param scope: The scope name.
571
- :param name: The data identifier name.
572
- :param key: the key.
573
- :param value: the value.
574
- :param recursive: Option to propagate the metadata change to content.
688
+ Set data identifier metadata.
689
+
690
+ Parameters
691
+ ----------
692
+ scope :
693
+ The scope name.
694
+ name :
695
+ The data identifier name.
696
+ key :
697
+ The metadata key.
698
+ value :
699
+ The metadata value.
700
+ recursive :
701
+ Option to propagate the metadata change to content.
575
702
  """
576
703
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'meta', key])
577
704
  url = build_url(choice(self.list_hosts), path=path)
@@ -593,10 +720,16 @@ class DIDClient(BaseClient):
593
720
  """
594
721
  Set data identifier metadata in bulk.
595
722
 
596
- :param scope: The scope name.
597
- :param name: The data identifier name.
598
- :param meta: the metadata key-values.
599
- :param recursive: Option to propagate the metadata change to content.
723
+ Parameters
724
+ ----------
725
+ scope :
726
+ The scope name.
727
+ name :
728
+ The data identifier name.
729
+ meta :
730
+ The metadata key-value pairs.
731
+ recursive :
732
+ Option to propagate the metadata change to content.
600
733
  """
601
734
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'meta'])
602
735
  url = build_url(choice(self.list_hosts), path=path)
@@ -616,8 +749,13 @@ class DIDClient(BaseClient):
616
749
  """
617
750
  Set metadata to a list of data identifiers.
618
751
 
619
- :param dids: A list of dids including metadata, i.e. [{'scope': scope1, 'name': name1, 'meta': {key1: value1, key2: value2}] .
620
- :param recursive: Option to propagate the metadata update to content.
752
+ Parameters
753
+ ----------
754
+ dids :
755
+ A list of dids including metadata, i.e.
756
+ [{'scope': scope1, 'name': name1, 'meta': {key1: value1, key2: value2}}, ...].
757
+ recursive :
758
+ Option to propagate the metadata update to content.
621
759
  """
622
760
  path = '/'.join([self.DIDS_BASEURL, 'bulkdidsmeta'])
623
761
  url = build_url(choice(self.list_hosts), path=path)
@@ -636,11 +774,16 @@ class DIDClient(BaseClient):
636
774
  **kwargs
637
775
  ) -> bool:
638
776
  """
639
- Set data identifier status
777
+ Set data identifier status.
640
778
 
641
- :param scope: The scope name.
642
- :param name: The data identifier name.
643
- :param kwargs: Keyword arguments of the form status_name=value.
779
+ Parameters
780
+ ----------
781
+ scope :
782
+ The scope name.
783
+ name :
784
+ The data identifier name.
785
+ **kwargs
786
+ Keyword arguments of the form status_name=value.
644
787
  """
645
788
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'status'])
646
789
  url = build_url(choice(self.list_hosts), path=path)
@@ -658,10 +801,14 @@ class DIDClient(BaseClient):
658
801
  name: str
659
802
  ) -> bool:
660
803
  """
661
- close dataset/container
804
+ Close dataset/container.
662
805
 
663
- :param scope: The scope name.
664
- :param name: The dataset/container name.
806
+ Parameters
807
+ ----------
808
+ scope :
809
+ The scope name.
810
+ name :
811
+ The dataset/container name.
665
812
  """
666
813
  return self.set_status(scope=scope, name=name, open=False)
667
814
 
@@ -672,11 +819,16 @@ class DIDClient(BaseClient):
672
819
  key: str
673
820
  ) -> bool:
674
821
  """
675
- Delete data identifier metadata
822
+ Delete data identifier metadata.
676
823
 
677
- :param scope: The scope name.
678
- :param name: The data identifier.
679
- :param key: the key.
824
+ Parameters
825
+ ----------
826
+ scope :
827
+ The scope name.
828
+ name :
829
+ The data identifier name.
830
+ key :
831
+ The metadata key to be deleted.
680
832
  """
681
833
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'meta'])
682
834
  url = build_url(choice(self.list_hosts), path=path, params={'key': key})
@@ -696,8 +848,12 @@ class DIDClient(BaseClient):
696
848
  """
697
849
  List the associated rules of a data identifier.
698
850
 
699
- :param scope: The scope name.
700
- :param name: The data identifier name.
851
+ Parameters
852
+ ----------
853
+ scope :
854
+ The scope name.
855
+ name :
856
+ The data identifier name.
701
857
  """
702
858
 
703
859
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'rules'])
@@ -717,8 +873,12 @@ class DIDClient(BaseClient):
717
873
  """
718
874
  List the associated rules a file is affected from..
719
875
 
720
- :param scope: The scope name.
721
- :param name: The file name.
876
+ Parameters
877
+ ----------
878
+ scope :
879
+ The scope name.
880
+ name :
881
+ The data identifier name.
722
882
  """
723
883
 
724
884
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'associated_rules'])
@@ -733,9 +893,16 @@ class DIDClient(BaseClient):
733
893
  def get_dataset_by_guid(self, guid: str) -> "Iterator[dict[str, Any]]":
734
894
  """
735
895
  Get the parent datasets for a given GUID.
736
- :param guid: The GUID.
737
896
 
738
- :returns: A did
897
+ Parameters
898
+ ----------
899
+ guid :
900
+ The GUID.
901
+
902
+ Returns
903
+ -------
904
+
905
+ A did
739
906
  """
740
907
 
741
908
  path = '/'.join([self.DIDS_BASEURL, guid, 'guid'])
@@ -756,9 +923,14 @@ class DIDClient(BaseClient):
756
923
  """
757
924
  List data identifiers in a scope.
758
925
 
759
- :param scope: The scope name.
760
- :param name: The data identifier name.
761
- :param recursive: boolean, True or False.
926
+ Parameters
927
+ ----------
928
+ scope :
929
+ The scope name.
930
+ name :
931
+ The data identifier name.
932
+ recursive :
933
+ boolean, True or False.
762
934
  """
763
935
 
764
936
  payload = {}
@@ -784,8 +956,12 @@ class DIDClient(BaseClient):
784
956
  """
785
957
  List parent dataset/containers of a did.
786
958
 
787
- :param scope: The scope.
788
- :param name: The name.
959
+ Parameters
960
+ ----------
961
+ scope :
962
+ The scope.
963
+ name :
964
+ The name,
789
965
  """
790
966
 
791
967
  path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), quote_plus(name), 'parents'])
@@ -809,12 +985,18 @@ class DIDClient(BaseClient):
809
985
  """
810
986
  Create a sample from an input collection.
811
987
 
812
- :param input_scope: The scope of the input DID.
813
- :param input_name: The name of the input DID.
814
- :param output_scope: The scope of the output dataset.
815
- :param output_name: The name of the output dataset.
816
- :param account: The account.
817
- :param nbfiles: The number of files to register in the output dataset.
988
+ Parameters
989
+ ----------
990
+ input_scope :
991
+ The scope of the input DID.
992
+ input_name :
993
+ The name of the input DID.
994
+ output_scope :
995
+ The scope of the output dataset.
996
+ output_name :
997
+ The name of the output dataset.
998
+ nbfiles :
999
+ The number of files to register in the output dataset.
818
1000
  """
819
1001
  path = '/'.join([self.DIDS_BASEURL, 'sample'])
820
1002
  data = dumps({
@@ -836,7 +1018,10 @@ class DIDClient(BaseClient):
836
1018
  """
837
1019
  Resurrect a list of dids.
838
1020
 
839
- :param dids: A list of dids [{'scope': scope, 'name': name}, ...]
1021
+ Parameters
1022
+ ----------
1023
+ dids :
1024
+ A list of dids [{'scope': scope, 'name': name}, ...]
840
1025
  """
841
1026
  path = '/'.join([self.DIDS_BASEURL, 'resurrect'])
842
1027
  url = build_url(choice(self.list_hosts), path=path)
@@ -854,9 +1039,12 @@ class DIDClient(BaseClient):
854
1039
  ) -> "Iterator[dict[str, Any]]":
855
1040
  """
856
1041
  List archive contents.
857
-
858
- :param scope: The scope name.
859
- :param name: The data identifier name.
1042
+ Parameters
1043
+ ----------
1044
+ scope :
1045
+ The scope name.
1046
+ name :
1047
+ The data identifier name.
860
1048
  """
861
1049
  path = '/'.join([self.ARCHIVES_BASEURL, quote_plus(scope), quote_plus(name), 'files'])
862
1050
  url = build_url(choice(self.list_hosts), path=path)