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
@@ -28,9 +28,15 @@ class ExportClient(BaseClient):
28
28
  def export_data(self, distance: bool = True) -> dict[str, Any]:
29
29
  """
30
30
  Export RSE data (RSE, settings, attributes and distance).
31
- :param distance: To include the distance.
31
+ Parameters
32
+ ----------
33
+ distance :
34
+ To include the distance. Default is True.
32
35
 
33
- :returns: A dict containing data
36
+ Returns
37
+ -------
38
+
39
+ A dict containing data
34
40
  """
35
41
  payload = {'distance': distance}
36
42
  path = '/'.join([self.EXPORT_BASEURL])
@@ -31,10 +31,17 @@ class FileClient(BaseClient):
31
31
  """
32
32
  List file replicas.
33
33
 
34
- :param scope: the scope.
35
- :param lfn: the lfn.
34
+ Parameters
35
+ ----------
36
+ scope :
37
+ The scope of the file.
38
+ lfn :
39
+ The LFN
36
40
 
37
- :return: List of replicas.
41
+ Returns
42
+ -------
43
+
44
+ List of replicas.
38
45
  """
39
46
  path = '/'.join([self.BASEURL, quote_plus(scope), quote_plus(lfn), 'rses'])
40
47
  url = build_url(choice(self.list_hosts), path=path)
@@ -29,7 +29,10 @@ class ImportClient(BaseClient):
29
29
  """
30
30
  Imports data into Rucio.
31
31
 
32
- :param data: a dict containing data to be imported into Rucio.
32
+ Parameters
33
+ ----------
34
+ data :
35
+ A dict containing data to be imported into Rucio.
33
36
  """
34
37
  path = '/'.join([self.IMPORT_BASEURL])
35
38
  url = build_url(choice(self.list_hosts), path=path)
@@ -45,26 +45,32 @@ class LifetimeClient(BaseClient):
45
45
  (files, datasets, containers, or archives) that need to be kept longer than usual. These exceptions
46
46
  can be filtered by their ID or approval state (this feature is not available yet).
47
47
 
48
- :param exception_id: The unique identifier of a specific exception. If provided, returns only that exception.
49
- :param states: Filter exceptions by their states. Possible values are:
50
- - `A` (APPROVED): Exception was approved
51
- - `R` (REJECTED): Exception was rejected
52
- - `W` (WAITING): Exception is waiting for approval by an admin (or other authorized account)
48
+ Parameters
49
+ ----------
50
+ exception_id :
51
+ The unique identifier of a specific exception. If provided, returns only that exception.
52
+ states :
53
+ Filter exceptions by their states. Possible values are:
54
+ * `A` (APPROVED): Exception was approved
55
+ * `R` (REJECTED): Exception was rejected
56
+ * `W` (WAITING): Exception is waiting for approval by an admin (or other authorized account)
57
+
58
+ Returns
59
+ -------
53
60
 
54
- :returns:
55
61
  An iterator of dictionaries containing the exception details:
56
- - `id`: The unique identifier of the exception
57
- - `scope`: The scope of the data identifier
58
- - `name`: The name of the data identifier
59
- - `did_type`: Type of the data identifier:
60
- `F` (file), `D` (dataset), `C` (container), `A` (archive),
61
- `X` (deleted file), `Y` (deleted dataset), `Z` (deleted container)
62
- - `account`: The account that requested the exception
63
- - `pattern`: Pattern used for matching data identifiers
64
- - `comments`: User provided comments explaining the exception
65
- - `state`: Current state of the exception
66
- - `created_at`: When the exception was created (returned as timestamp string)
67
- - `expires_at`: When the exception expires (returned as timestamp string)
62
+ * `id`: The unique identifier of the exception
63
+ * `scope`: The scope of the data identifier
64
+ * `name`: The name of the data identifier
65
+ * `did_type`: Type of the data identifier:
66
+ `F` (file), `D` (dataset), `C` (container), `A` (archive),
67
+ `X` (deleted file), `Y` (deleted dataset), `Z` (deleted container)
68
+ * `account`: The account that requested the exception
69
+ * `pattern`: Pattern used for matching data identifiers
70
+ * `comments`: User provided comments explaining the exception
71
+ * `state`: Current state of the exception
72
+ * `created_at`: When the exception was created (returned as timestamp string)
73
+ * `expires_at`: When the exception expires (returned as timestamp string)
68
74
  """
69
75
 
70
76
  path = self.LIFETIME_BASEURL + '/'
@@ -98,19 +104,30 @@ class LifetimeClient(BaseClient):
98
104
  maximum extension periods. The request includes details about which DIDs should have extended
99
105
  lifetimes, who is requesting it, and why it's needed.
100
106
 
101
- :param dids: List of dictionaries containing the data identifiers to be excepted.
102
- Each dictionary must contain:
103
- - `scope`: The scope of the data identifier
104
- - `name`: The name of the data identifier
105
- :param account: The account requesting the exception
106
- :param pattern: Associated pattern for the exception request
107
- :param comments: Justification for why the exception is needed (e.g. "Needed for my XYZ analysis..")
108
- :param expires_at: When the exception should expire (datetime object)
109
-
110
- :returns: A dictionary containing:
111
- - `exceptions`: Dictionary mapping exception IDs to lists of DIDs that were successfully added
112
- - `unknown`: List of DIDs that could not be found
113
- - `not_affected`: List of DIDs that did not qualify for an exception
107
+ Parameters
108
+ ----------
109
+ dids :
110
+ List of dictionaries containing the data identifiers to be excepted.
111
+ Each dictionary must contain:
112
+ * **scope** : The scope of the data identifier
113
+ * **name** : The name of the data identifier
114
+ account :
115
+ The account requesting the exception
116
+ pattern :
117
+ Associated pattern for the exception request
118
+ comments :
119
+ Justification for why the exception is needed (e.g. "Needed for my XYZ analysis..")
120
+ expires_at :
121
+ When the exception should expire (datetime object)
122
+
123
+ Returns
124
+ -------
125
+
126
+ A dictionary containing:
127
+ * **exceptions** : Dictionary mapping exception IDs to lists of DIDs that were successfully added
128
+ * **unknown** : List of DIDs that could not be found
129
+ * **not_affected** : List of DIDs that did not qualify for an exception
130
+
114
131
  """
115
132
 
116
133
  path = self.LIFETIME_BASEURL + '/'
@@ -38,8 +38,13 @@ class LockClient(BaseClient):
38
38
  """
39
39
  Get a dataset locks of the specified dataset.
40
40
 
41
- :param scope: the scope of the did of the locks to list.
42
- :param name: the name of the did of the locks to list.
41
+ Parameters
42
+ ----------
43
+ scope :
44
+ The scope of the did of the locks to list.
45
+ name :
46
+ The name of the did of the locks to list.
47
+
43
48
  """
44
49
 
45
50
  path = '/'.join([self.LOCKS_BASEURL, quote_plus(scope), quote_plus(name)])
@@ -62,10 +67,17 @@ class LockClient(BaseClient):
62
67
  """
63
68
  Get list of locks for for all the files found, recursively, in the listed datasets or containers.
64
69
 
65
- :param dids: list of dictionaries {"scope":..., "name":..., "type":...}
66
- type can be either "dataset" or "container"
67
- type is optional, but if specified, improves the query performance
68
- :returns: list of dictionaries with lock info
70
+ Parameters
71
+ ----------
72
+ dids :
73
+ list of dictionaries {"scope":..., "name":..., "type":...}
74
+ type can be either "dataset" or "container"
75
+ type is optional, but if specified, improves the query performance
76
+
77
+ Returns
78
+ -------
79
+
80
+ list of dictionaries with lock info
69
81
  """
70
82
 
71
83
  # convert did list to list of dictionaries
@@ -92,7 +104,10 @@ class LockClient(BaseClient):
92
104
  """
93
105
  Get all dataset locks of the specified rse.
94
106
 
95
- :param rse: the rse of the locks to list.
107
+ Parameters
108
+ ----------
109
+ rse :
110
+ The rse of the locks to list
96
111
  """
97
112
 
98
113
  path = '/'.join([self.LOCKS_BASEURL, rse])
@@ -35,13 +35,26 @@ class MetaConventionClient(BaseClient):
35
35
  """
36
36
  Sends the request to add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).
37
37
 
38
- :param key: the name for the new key.
39
- :param key_type: the type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).
40
- :param value_type: the type of the value, if defined.
41
- :param value_regexp: the regular expression that values should match, if defined.
42
-
43
- :return: True if key was created successfully.
44
- :raises Duplicate: if key already exists.
38
+ Parameters
39
+ ----------
40
+ key :
41
+ The name for the new key.
42
+
43
+ key_type :
44
+ The type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).
45
+ value_type :
46
+ The type of the value, if defined.
47
+ value_regexp :
48
+ The regular expression that values should match, if defined.
49
+
50
+ Returns
51
+ -------
52
+ True if key was created successfully.
53
+
54
+ Raises
55
+ -------
56
+ Duplicate
57
+ If key already exists..
45
58
  """
46
59
 
47
60
  path = '/'.join([self.META_BASEURL, quote_plus(key)])
@@ -62,7 +75,9 @@ class MetaConventionClient(BaseClient):
62
75
  """
63
76
  Sends the request to list all keys for DID Metadata Conventions.
64
77
 
65
- :return: a list containing the names of all keys.
78
+ Returns
79
+ -------
80
+ A list containing the names of all keys.
66
81
  """
67
82
  path = self.META_BASEURL + '/'
68
83
  url = build_url(choice(self.list_hosts), path=path)
@@ -77,9 +92,10 @@ class MetaConventionClient(BaseClient):
77
92
  def list_values(self, key: str) -> Optional[list[str]]:
78
93
  """
79
94
  Sends the request to lists all allowed values for a DID key (all values for a key in DID Metadata Conventions).
80
- .
81
95
 
82
- :return: a list containing the names of all values for a key.
96
+ Returns
97
+ -------
98
+ A list containing the names of all values for a key
83
99
  """
84
100
  path = '/'.join([self.META_BASEURL, quote_plus(key)]) + '/'
85
101
  url = build_url(choice(self.list_hosts), path=path)
@@ -95,11 +111,21 @@ class MetaConventionClient(BaseClient):
95
111
  """
96
112
  Sends the request to add a value for a key in DID Metadata Convention.
97
113
 
98
- :param key: the name for key.
99
- :param value: the value.
100
-
101
- :return: True if value was created successfully.
102
- :raises Duplicate: if valid already exists.
114
+ Parameters
115
+ ----------
116
+ key :
117
+ The name for key.
118
+ value :
119
+ The value to be added.
120
+
121
+ Returns
122
+ -------
123
+ True if value was created successfully.
124
+
125
+ Raises
126
+ -------
127
+ Duplicate
128
+ If value already exists.
103
129
  """
104
130
 
105
131
  path = '/'.join([self.META_BASEURL, quote_plus(key)]) + '/'
@@ -116,8 +142,12 @@ class MetaConventionClient(BaseClient):
116
142
  """
117
143
  Delete a key in the DID Metadata Conventions table.
118
144
 
119
- :param key: the name for key.
120
- :param value: the value.
145
+ Parameters
146
+ ---------
147
+ key :
148
+ The name for the key
149
+ value :
150
+ The value
121
151
  """
122
152
  pass
123
153
 
@@ -125,7 +155,10 @@ class MetaConventionClient(BaseClient):
125
155
  """
126
156
  Delete an allowed key.
127
157
 
128
- :param key: the name for key.
158
+ Parameters
159
+ ----------
160
+ key :
161
+ The name for the key.
129
162
  """
130
163
  pass
131
164
 
@@ -133,8 +166,13 @@ class MetaConventionClient(BaseClient):
133
166
  """
134
167
  Update a key.
135
168
 
136
- :param key: the name for key.
137
- :param type_: the type of the value, if defined.
138
- :param regexp: the regular expression that values should match, if defined.
169
+ Parameters
170
+ ----------
171
+ key :
172
+ The name for the key.
173
+ type_ :
174
+ The type of the value, if defined.
175
+ regexp :
176
+ The regular expression that values should match, if defined.
139
177
  """
140
178
  pass
@@ -28,7 +28,9 @@ class PingClient(BaseClient):
28
28
  """
29
29
  Sends a ping request to the rucio server.
30
30
 
31
- :return: Dictonnary with server information
31
+ Returns
32
+ --------
33
+ Dictionary with server information
32
34
  """
33
35
 
34
36
  headers = None