@@ -25,7 +25,7 @@ class ApiClient:
25
25
API Key. If None, infer from CADS_API_KEY or CADS_API_RC.
26
26
verify: bool, default: True
27
27
Whether to verify the TLS certificate at the remote end.
28
- timeout: float | tuple[float, float], default: 60
28
+ timeout: float | tuple[float,float], default: 60
29
29
How many seconds to wait for the server to send data, as a float, or a (connect, read) tuple.
30
30
progress: bool, default: True
31
31
Whether to display the progress bar during download.
@@ -207,14 +207,14 @@ def estimate_costs(self, collection_id: str, **request: Any) -> dict[str, Any]:
207
207
208
208
def get_accepted_licences (
209
209
self ,
210
- scope : Literal ["all" , "dataset" , "portal" ] | None = None ,
210
+ scope : Literal [None , "all" , "dataset" , "portal" ] = None ,
211
211
) -> list [dict [str , Any ]]:
212
212
"""Retrieve acccepted licences.
213
213
214
214
Parameters
215
215
----------
216
- scope: str | None
217
- Licence scope. Options: ``"all", "dataset", "portal"``.
216
+ scope: {None, 'all', 'dataset', 'portal'}
217
+ Licence scope.
218
218
219
219
Returns
220
220
-------
@@ -243,7 +243,7 @@ def get_collection(self, collection_id: str) -> cads_api_client.Collection:
243
243
def get_collections (
244
244
self ,
245
245
limit : int | None = None ,
246
- sortby : Literal ["id" , "relevance" , "title" , "update" ] | None = None ,
246
+ sortby : Literal [None , "id" , "relevance" , "title" , "update" ] = None ,
247
247
query : str | None = None ,
248
248
keywords : list [str ] | None = None ,
249
249
) -> cads_api_client .Collections :
@@ -253,8 +253,8 @@ def get_collections(
253
253
----------
254
254
limit: int | None
255
255
Number of processes per page.
256
- sortby: str | None
257
- Field to sort results by. Options: ``"id", "relevance", "title", "update"``.
256
+ sortby: {None, 'id', 'relevance', 'title', 'update'}
257
+ Field to sort results by.
258
258
query: str | None
259
259
Full-text search query.
260
260
keywords: list[str] | None
@@ -276,19 +276,19 @@ def get_collections(
276
276
def get_jobs (
277
277
self ,
278
278
limit : int | None = None ,
279
- sortby : Literal ["created" , "-created" ] | None = None ,
280
- status : Literal ["accepted" , "running" , "successful" , "failed" ] | None = None ,
279
+ sortby : Literal [None , "created" , "-created" ] = None ,
280
+ status : Literal [None , "accepted" , "running" , "successful" , "failed" ] = None ,
281
281
) -> cads_api_client .Jobs :
282
282
"""Retrieve submitted jobs.
283
283
284
284
Parameters
285
285
----------
286
286
limit: int | None
287
287
Number of processes per page.
288
- sortby: str | None
289
- Field to sort results by. Options: ``"created", "-created"``.
290
- status: str | None
291
- Status of the results. Options: ``"accepted", "running", "successful", "failed"``.
288
+ sortby: {None, 'created', '-created'}
289
+ Field to sort results by.
290
+ status: {None, 'accepted', 'running', 'successful', 'failed'}
291
+ Status of the results.
292
292
293
293
Returns
294
294
-------
@@ -303,14 +303,14 @@ def get_jobs(
303
303
304
304
def get_licences (
305
305
self ,
306
- scope : Literal ["all" , "dataset" , "portal" ] | None = None ,
306
+ scope : Literal [None , "all" , "dataset" , "portal" ] = None ,
307
307
) -> list [dict [str , Any ]]:
308
308
"""Retrieve licences.
309
309
310
310
Parameters
311
311
----------
312
- scope: str | None
313
- Licence scope. Options: ``"all", "dataset", "portal"``.
312
+ scope: {None, 'all', 'dataset', 'portal'}
313
+ Licence scope.
314
314
315
315
Returns
316
316
-------
@@ -338,16 +338,18 @@ def get_process(self, collection_id: str) -> cads_api_client.Process:
338
338
return self ._retrieve_api .get_process (collection_id )
339
339
340
340
def get_processes (
341
- self , limit : int | None = None , sortby : Literal ["id" , "-id" ] | None = None
341
+ self ,
342
+ limit : int | None = None ,
343
+ sortby : Literal [None , "id" , "-id" ] = None ,
342
344
) -> cads_api_client .Processes :
343
345
"""Retrieve available processes.
344
346
345
347
Parameters
346
348
----------
347
349
limit: int | None
348
350
Number of processes per page.
349
- sortby: str | None
350
- Field to sort results by. Options: ``"id", "-id"``.
351
+ sortby: {None, 'id', '-id'}
352
+ Field to sort results by.
351
353
352
354
Returns
353
355
-------
0 commit comments