digitalhub 0.13.0b2__py3-none-any.whl → 0.13.0b4__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 digitalhub might be problematic. Click here for more details.
- digitalhub/__init__.py +1 -1
- digitalhub/context/api.py +5 -5
- digitalhub/context/builder.py +3 -5
- digitalhub/context/context.py +9 -1
- digitalhub/entities/_base/material/entity.py +3 -3
- digitalhub/entities/_commons/metrics.py +64 -30
- digitalhub/entities/_commons/utils.py +36 -9
- digitalhub/entities/_processors/base.py +150 -79
- digitalhub/entities/_processors/context.py +363 -212
- digitalhub/entities/_processors/utils.py +74 -30
- digitalhub/entities/artifact/utils.py +28 -13
- digitalhub/entities/dataitem/crud.py +10 -2
- digitalhub/entities/dataitem/table/entity.py +3 -3
- digitalhub/entities/dataitem/utils.py +84 -35
- digitalhub/entities/model/utils.py +28 -13
- digitalhub/entities/task/_base/models.py +12 -3
- digitalhub/factory/factory.py +25 -3
- digitalhub/factory/utils.py +11 -3
- digitalhub/runtimes/_base.py +1 -1
- digitalhub/runtimes/builder.py +18 -1
- digitalhub/stores/client/__init__.py +12 -0
- digitalhub/stores/client/_base/api_builder.py +14 -0
- digitalhub/stores/client/_base/client.py +93 -0
- digitalhub/stores/client/_base/key_builder.py +28 -0
- digitalhub/stores/client/_base/params_builder.py +14 -0
- digitalhub/stores/client/api.py +10 -5
- digitalhub/stores/client/builder.py +3 -1
- digitalhub/stores/client/dhcore/api_builder.py +17 -0
- digitalhub/stores/client/dhcore/client.py +276 -58
- digitalhub/stores/client/dhcore/configurator.py +336 -141
- digitalhub/stores/client/dhcore/error_parser.py +35 -1
- digitalhub/stores/client/dhcore/params_builder.py +113 -17
- digitalhub/stores/client/dhcore/utils.py +32 -14
- digitalhub/stores/client/local/api_builder.py +17 -0
- digitalhub/stores/client/local/client.py +6 -8
- digitalhub/stores/credentials/api.py +8 -8
- digitalhub/stores/credentials/configurator.py +176 -3
- digitalhub/stores/credentials/enums.py +17 -3
- digitalhub/stores/credentials/handler.py +73 -45
- digitalhub/stores/credentials/ini_module.py +59 -27
- digitalhub/stores/credentials/store.py +33 -1
- digitalhub/stores/data/_base/store.py +8 -3
- digitalhub/stores/data/api.py +20 -16
- digitalhub/stores/data/builder.py +69 -13
- digitalhub/stores/data/s3/configurator.py +64 -23
- digitalhub/stores/data/s3/store.py +30 -27
- digitalhub/stores/data/s3/utils.py +9 -9
- digitalhub/stores/data/sql/configurator.py +76 -25
- digitalhub/stores/data/sql/store.py +180 -91
- digitalhub/utils/exceptions.py +6 -0
- digitalhub/utils/file_utils.py +53 -30
- digitalhub/utils/generic_utils.py +41 -33
- digitalhub/utils/git_utils.py +24 -14
- digitalhub/utils/io_utils.py +19 -18
- digitalhub/utils/uri_utils.py +31 -31
- {digitalhub-0.13.0b2.dist-info → digitalhub-0.13.0b4.dist-info}/METADATA +1 -1
- {digitalhub-0.13.0b2.dist-info → digitalhub-0.13.0b4.dist-info}/RECORD +60 -61
- digitalhub/entities/_commons/types.py +0 -9
- {digitalhub-0.13.0b2.dist-info → digitalhub-0.13.0b4.dist-info}/WHEEL +0 -0
- {digitalhub-0.13.0b2.dist-info → digitalhub-0.13.0b4.dist-info}/licenses/AUTHORS +0 -0
- {digitalhub-0.13.0b2.dist-info → digitalhub-0.13.0b4.dist-info}/licenses/LICENSE +0 -0
|
@@ -20,11 +20,12 @@ if typing.TYPE_CHECKING:
|
|
|
20
20
|
|
|
21
21
|
class BaseEntityOperationsProcessor:
|
|
22
22
|
"""
|
|
23
|
-
Processor for
|
|
23
|
+
Processor for base entity operations.
|
|
24
24
|
|
|
25
|
-
This
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
This class handles CRUD operations and other entity management tasks
|
|
26
|
+
for base-level entities (primarily projects). It interacts with the
|
|
27
|
+
client layer to perform backend operations and manages entity lifecycle
|
|
28
|
+
including creation, reading, updating, deletion, and sharing.
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
##############################
|
|
@@ -39,23 +40,26 @@ class BaseEntityOperationsProcessor:
|
|
|
39
40
|
**kwargs,
|
|
40
41
|
) -> dict:
|
|
41
42
|
"""
|
|
42
|
-
Create
|
|
43
|
+
Create a base entity in the backend.
|
|
44
|
+
|
|
45
|
+
Builds the appropriate API endpoint and sends a create request
|
|
46
|
+
to the backend for base-level entities.
|
|
43
47
|
|
|
44
48
|
Parameters
|
|
45
49
|
----------
|
|
46
50
|
client : Client
|
|
47
|
-
|
|
51
|
+
The client instance to use for the API call.
|
|
48
52
|
entity_type : str
|
|
49
|
-
|
|
53
|
+
The type of entity to create (e.g., 'project').
|
|
50
54
|
entity_dict : dict
|
|
51
|
-
|
|
55
|
+
The entity data dictionary to create.
|
|
52
56
|
**kwargs : dict
|
|
53
|
-
|
|
57
|
+
Additional parameters to pass to the API call.
|
|
54
58
|
|
|
55
59
|
Returns
|
|
56
60
|
-------
|
|
57
61
|
dict
|
|
58
|
-
|
|
62
|
+
The created entity data returned from the backend.
|
|
59
63
|
"""
|
|
60
64
|
api = client.build_api(
|
|
61
65
|
ApiCategories.BASE.value,
|
|
@@ -70,19 +74,25 @@ class BaseEntityOperationsProcessor:
|
|
|
70
74
|
**kwargs,
|
|
71
75
|
) -> Project:
|
|
72
76
|
"""
|
|
73
|
-
Create
|
|
77
|
+
Create a project entity in the backend.
|
|
78
|
+
|
|
79
|
+
Creates a new project either from an existing entity object or
|
|
80
|
+
by building one from the provided parameters. Handles both
|
|
81
|
+
local and remote backend creation.
|
|
74
82
|
|
|
75
83
|
Parameters
|
|
76
84
|
----------
|
|
77
|
-
_entity : Project
|
|
78
|
-
|
|
85
|
+
_entity : Project, optional
|
|
86
|
+
An existing project entity object to create. If None,
|
|
87
|
+
a new entity will be built from kwargs.
|
|
79
88
|
**kwargs : dict
|
|
80
|
-
Parameters
|
|
89
|
+
Parameters for entity creation, including 'local' flag
|
|
90
|
+
and entity-specific parameters.
|
|
81
91
|
|
|
82
92
|
Returns
|
|
83
93
|
-------
|
|
84
94
|
Project
|
|
85
|
-
|
|
95
|
+
The created project entity with backend data populated.
|
|
86
96
|
"""
|
|
87
97
|
if _entity is not None:
|
|
88
98
|
client = _entity._client
|
|
@@ -102,23 +112,26 @@ class BaseEntityOperationsProcessor:
|
|
|
102
112
|
**kwargs,
|
|
103
113
|
) -> dict:
|
|
104
114
|
"""
|
|
105
|
-
Read
|
|
115
|
+
Read a base entity from the backend.
|
|
116
|
+
|
|
117
|
+
Builds the appropriate API endpoint and sends a read request
|
|
118
|
+
to retrieve entity data from the backend.
|
|
106
119
|
|
|
107
120
|
Parameters
|
|
108
121
|
----------
|
|
109
122
|
client : Client
|
|
110
|
-
|
|
123
|
+
The client instance to use for the API call.
|
|
111
124
|
entity_type : str
|
|
112
|
-
|
|
125
|
+
The type of entity to read (e.g., 'project').
|
|
113
126
|
entity_name : str
|
|
114
|
-
|
|
127
|
+
The name identifier of the entity to read.
|
|
115
128
|
**kwargs : dict
|
|
116
|
-
|
|
129
|
+
Additional parameters to pass to the API call.
|
|
117
130
|
|
|
118
131
|
Returns
|
|
119
132
|
-------
|
|
120
133
|
dict
|
|
121
|
-
|
|
134
|
+
The entity data retrieved from the backend.
|
|
122
135
|
"""
|
|
123
136
|
api = client.build_api(
|
|
124
137
|
ApiCategories.BASE.value,
|
|
@@ -135,21 +148,25 @@ class BaseEntityOperationsProcessor:
|
|
|
135
148
|
**kwargs,
|
|
136
149
|
) -> Project:
|
|
137
150
|
"""
|
|
138
|
-
Read
|
|
151
|
+
Read a project entity from the backend.
|
|
152
|
+
|
|
153
|
+
Retrieves project data from the backend and constructs a
|
|
154
|
+
Project entity object with the retrieved data.
|
|
139
155
|
|
|
140
156
|
Parameters
|
|
141
157
|
----------
|
|
142
158
|
entity_type : str
|
|
143
|
-
|
|
159
|
+
The type of entity to read (typically 'project').
|
|
144
160
|
entity_name : str
|
|
145
|
-
|
|
161
|
+
The name identifier of the project to read.
|
|
146
162
|
**kwargs : dict
|
|
147
|
-
|
|
163
|
+
Additional parameters including 'local' flag and
|
|
164
|
+
API call parameters.
|
|
148
165
|
|
|
149
166
|
Returns
|
|
150
167
|
-------
|
|
151
168
|
Project
|
|
152
|
-
|
|
169
|
+
The project entity object populated with backend data.
|
|
153
170
|
"""
|
|
154
171
|
client = get_client(kwargs.pop("local", False))
|
|
155
172
|
obj = self._read_base_entity(client, entity_type, entity_name, **kwargs)
|
|
@@ -162,19 +179,28 @@ class BaseEntityOperationsProcessor:
|
|
|
162
179
|
**kwargs,
|
|
163
180
|
) -> Project:
|
|
164
181
|
"""
|
|
165
|
-
Import
|
|
182
|
+
Import a project entity from a YAML file and create it in the backend.
|
|
183
|
+
|
|
184
|
+
Reads project configuration from a YAML file, creates a new project
|
|
185
|
+
entity in the backend, and imports any related entities defined
|
|
186
|
+
in the file. Raises an error if the project already exists.
|
|
166
187
|
|
|
167
188
|
Parameters
|
|
168
189
|
----------
|
|
169
190
|
file : str
|
|
170
|
-
Path to YAML file.
|
|
191
|
+
Path to the YAML file containing project configuration.
|
|
171
192
|
**kwargs : dict
|
|
172
|
-
Additional
|
|
193
|
+
Additional parameters including 'local' flag.
|
|
173
194
|
|
|
174
195
|
Returns
|
|
175
196
|
-------
|
|
176
197
|
Project
|
|
177
|
-
|
|
198
|
+
The imported and created project entity.
|
|
199
|
+
|
|
200
|
+
Raises
|
|
201
|
+
------
|
|
202
|
+
EntityError
|
|
203
|
+
If the project already exists in the backend.
|
|
178
204
|
"""
|
|
179
205
|
client = get_client(kwargs.pop("local", False))
|
|
180
206
|
obj: dict = read_yaml(file)
|
|
@@ -198,19 +224,23 @@ class BaseEntityOperationsProcessor:
|
|
|
198
224
|
**kwargs,
|
|
199
225
|
) -> Project:
|
|
200
226
|
"""
|
|
201
|
-
Load
|
|
227
|
+
Load a project entity from a YAML file and update it in the backend.
|
|
228
|
+
|
|
229
|
+
Reads project configuration from a YAML file and updates an existing
|
|
230
|
+
project in the backend. If the project doesn't exist, it creates a
|
|
231
|
+
new one. Also loads any related entities defined in the file.
|
|
202
232
|
|
|
203
233
|
Parameters
|
|
204
234
|
----------
|
|
205
235
|
file : str
|
|
206
|
-
Path to YAML file.
|
|
236
|
+
Path to the YAML file containing project configuration.
|
|
207
237
|
**kwargs : dict
|
|
208
|
-
Additional
|
|
238
|
+
Additional parameters including 'local' flag.
|
|
209
239
|
|
|
210
240
|
Returns
|
|
211
241
|
-------
|
|
212
242
|
Project
|
|
213
|
-
|
|
243
|
+
The loaded and updated project entity.
|
|
214
244
|
"""
|
|
215
245
|
client = get_client(kwargs.pop("local", False))
|
|
216
246
|
obj: dict = read_yaml(file)
|
|
@@ -234,21 +264,25 @@ class BaseEntityOperationsProcessor:
|
|
|
234
264
|
**kwargs,
|
|
235
265
|
) -> list[dict]:
|
|
236
266
|
"""
|
|
237
|
-
List
|
|
267
|
+
List base entities from the backend.
|
|
268
|
+
|
|
269
|
+
Builds the appropriate API endpoint and sends a list request
|
|
270
|
+
to retrieve multiple entities from the backend.
|
|
238
271
|
|
|
239
272
|
Parameters
|
|
240
273
|
----------
|
|
241
274
|
client : Client
|
|
242
|
-
|
|
275
|
+
The client instance to use for the API call.
|
|
243
276
|
entity_type : str
|
|
244
|
-
|
|
277
|
+
The type of entities to list (e.g., 'project').
|
|
245
278
|
**kwargs : dict
|
|
246
|
-
|
|
279
|
+
Additional parameters to pass to the API call for filtering
|
|
280
|
+
or pagination.
|
|
247
281
|
|
|
248
282
|
Returns
|
|
249
283
|
-------
|
|
250
284
|
list[dict]
|
|
251
|
-
List of
|
|
285
|
+
List of entity data dictionaries from the backend.
|
|
252
286
|
"""
|
|
253
287
|
api = client.build_api(
|
|
254
288
|
ApiCategories.BASE.value,
|
|
@@ -263,19 +297,23 @@ class BaseEntityOperationsProcessor:
|
|
|
263
297
|
**kwargs,
|
|
264
298
|
) -> list[Project]:
|
|
265
299
|
"""
|
|
266
|
-
List
|
|
300
|
+
List project entities from the backend.
|
|
301
|
+
|
|
302
|
+
Retrieves a list of projects from the backend and converts
|
|
303
|
+
them to Project entity objects.
|
|
267
304
|
|
|
268
305
|
Parameters
|
|
269
306
|
----------
|
|
270
307
|
entity_type : str
|
|
271
|
-
|
|
308
|
+
The type of entities to list (typically 'project').
|
|
272
309
|
**kwargs : dict
|
|
273
|
-
|
|
310
|
+
Additional parameters including 'local' flag and
|
|
311
|
+
API call parameters for filtering or pagination.
|
|
274
312
|
|
|
275
313
|
Returns
|
|
276
314
|
-------
|
|
277
315
|
list[Project]
|
|
278
|
-
List of objects.
|
|
316
|
+
List of project entity objects.
|
|
279
317
|
"""
|
|
280
318
|
client = get_client(kwargs.pop("local", False))
|
|
281
319
|
objs = self._list_base_entities(client, entity_type, **kwargs)
|
|
@@ -295,25 +333,28 @@ class BaseEntityOperationsProcessor:
|
|
|
295
333
|
**kwargs,
|
|
296
334
|
) -> dict:
|
|
297
335
|
"""
|
|
298
|
-
Update
|
|
336
|
+
Update a base entity in the backend.
|
|
337
|
+
|
|
338
|
+
Builds the appropriate API endpoint and sends an update request
|
|
339
|
+
to modify an existing entity in the backend.
|
|
299
340
|
|
|
300
341
|
Parameters
|
|
301
342
|
----------
|
|
302
343
|
client : Client
|
|
303
|
-
|
|
344
|
+
The client instance to use for the API call.
|
|
304
345
|
entity_type : str
|
|
305
|
-
|
|
346
|
+
The type of entity to update (e.g., 'project').
|
|
306
347
|
entity_name : str
|
|
307
|
-
|
|
348
|
+
The name identifier of the entity to update.
|
|
308
349
|
entity_dict : dict
|
|
309
|
-
|
|
350
|
+
The updated entity data dictionary.
|
|
310
351
|
**kwargs : dict
|
|
311
|
-
|
|
352
|
+
Additional parameters to pass to the API call.
|
|
312
353
|
|
|
313
354
|
Returns
|
|
314
355
|
-------
|
|
315
356
|
dict
|
|
316
|
-
|
|
357
|
+
The updated entity data returned from the backend.
|
|
317
358
|
"""
|
|
318
359
|
api = client.build_api(
|
|
319
360
|
ApiCategories.BASE.value,
|
|
@@ -331,23 +372,27 @@ class BaseEntityOperationsProcessor:
|
|
|
331
372
|
**kwargs,
|
|
332
373
|
) -> Project:
|
|
333
374
|
"""
|
|
334
|
-
Update
|
|
375
|
+
Update a project entity in the backend.
|
|
376
|
+
|
|
377
|
+
Updates an existing project with new data and returns the
|
|
378
|
+
updated Project entity object.
|
|
335
379
|
|
|
336
380
|
Parameters
|
|
337
381
|
----------
|
|
338
382
|
entity_type : str
|
|
339
|
-
|
|
383
|
+
The type of entity to update (typically 'project').
|
|
340
384
|
entity_name : str
|
|
341
|
-
|
|
385
|
+
The name identifier of the project to update.
|
|
342
386
|
entity_dict : dict
|
|
343
|
-
|
|
387
|
+
The updated project data dictionary.
|
|
344
388
|
**kwargs : dict
|
|
345
|
-
|
|
389
|
+
Additional parameters including 'local' flag and
|
|
390
|
+
API call parameters.
|
|
346
391
|
|
|
347
392
|
Returns
|
|
348
393
|
-------
|
|
349
394
|
Project
|
|
350
|
-
|
|
395
|
+
The updated project entity object.
|
|
351
396
|
"""
|
|
352
397
|
client = get_client(kwargs.pop("local", False))
|
|
353
398
|
obj = self._update_base_entity(client, entity_type, entity_name, entity_dict, **kwargs)
|
|
@@ -362,23 +407,27 @@ class BaseEntityOperationsProcessor:
|
|
|
362
407
|
**kwargs,
|
|
363
408
|
) -> dict:
|
|
364
409
|
"""
|
|
365
|
-
Delete
|
|
410
|
+
Delete a base entity from the backend.
|
|
411
|
+
|
|
412
|
+
Builds the appropriate API endpoint and parameters, then sends
|
|
413
|
+
a delete request to remove the entity from the backend.
|
|
366
414
|
|
|
367
415
|
Parameters
|
|
368
416
|
----------
|
|
369
417
|
client : Client
|
|
370
|
-
|
|
418
|
+
The client instance to use for the API call.
|
|
371
419
|
entity_type : str
|
|
372
|
-
|
|
420
|
+
The type of entity to delete (e.g., 'project').
|
|
373
421
|
entity_name : str
|
|
374
|
-
|
|
422
|
+
The name identifier of the entity to delete.
|
|
375
423
|
**kwargs : dict
|
|
376
|
-
|
|
424
|
+
Additional parameters to pass to the API call, such as
|
|
425
|
+
cascade deletion options.
|
|
377
426
|
|
|
378
427
|
Returns
|
|
379
428
|
-------
|
|
380
429
|
dict
|
|
381
|
-
Response from backend.
|
|
430
|
+
Response data from the backend delete operation.
|
|
382
431
|
"""
|
|
383
432
|
kwargs = client.build_parameters(
|
|
384
433
|
ApiCategories.BASE.value,
|
|
@@ -400,21 +449,25 @@ class BaseEntityOperationsProcessor:
|
|
|
400
449
|
**kwargs,
|
|
401
450
|
) -> dict:
|
|
402
451
|
"""
|
|
403
|
-
Delete
|
|
452
|
+
Delete a project entity from the backend.
|
|
453
|
+
|
|
454
|
+
Deletes a project from the backend and optionally cleans up
|
|
455
|
+
the associated context. Handles both local and remote backends.
|
|
404
456
|
|
|
405
457
|
Parameters
|
|
406
458
|
----------
|
|
407
459
|
entity_type : str
|
|
408
|
-
|
|
460
|
+
The type of entity to delete (typically 'project').
|
|
409
461
|
entity_name : str
|
|
410
|
-
|
|
462
|
+
The name identifier of the project to delete.
|
|
411
463
|
**kwargs : dict
|
|
412
|
-
|
|
464
|
+
Additional parameters including 'local' flag, 'clean_context'
|
|
465
|
+
flag (default True), and API call parameters.
|
|
413
466
|
|
|
414
467
|
Returns
|
|
415
468
|
-------
|
|
416
469
|
dict
|
|
417
|
-
Response from backend.
|
|
470
|
+
Response data from the backend delete operation.
|
|
418
471
|
"""
|
|
419
472
|
if kwargs.pop("clean_context", True):
|
|
420
473
|
delete_context(entity_name)
|
|
@@ -436,19 +489,22 @@ class BaseEntityOperationsProcessor:
|
|
|
436
489
|
entity_id: str,
|
|
437
490
|
) -> str:
|
|
438
491
|
"""
|
|
439
|
-
Build
|
|
492
|
+
Build a storage key for a base entity.
|
|
493
|
+
|
|
494
|
+
Creates a standardized key string that can be used to identify
|
|
495
|
+
and store the entity in various contexts.
|
|
440
496
|
|
|
441
497
|
Parameters
|
|
442
498
|
----------
|
|
443
499
|
client : Client
|
|
444
|
-
|
|
500
|
+
The client instance to use for key building.
|
|
445
501
|
entity_id : str
|
|
446
|
-
|
|
502
|
+
The unique identifier of the entity.
|
|
447
503
|
|
|
448
504
|
Returns
|
|
449
505
|
-------
|
|
450
506
|
str
|
|
451
|
-
|
|
507
|
+
The constructed entity key string.
|
|
452
508
|
"""
|
|
453
509
|
return client.build_key(ApiCategories.BASE.value, entity_id)
|
|
454
510
|
|
|
@@ -458,19 +514,22 @@ class BaseEntityOperationsProcessor:
|
|
|
458
514
|
**kwargs,
|
|
459
515
|
) -> str:
|
|
460
516
|
"""
|
|
461
|
-
Build
|
|
517
|
+
Build a storage key for a project entity.
|
|
518
|
+
|
|
519
|
+
Creates a standardized key string for project identification
|
|
520
|
+
and storage, handling both local and remote client contexts.
|
|
462
521
|
|
|
463
522
|
Parameters
|
|
464
523
|
----------
|
|
465
524
|
entity_id : str
|
|
466
|
-
|
|
525
|
+
The unique identifier of the project entity.
|
|
467
526
|
**kwargs : dict
|
|
468
|
-
|
|
527
|
+
Additional parameters including 'local' flag.
|
|
469
528
|
|
|
470
529
|
Returns
|
|
471
530
|
-------
|
|
472
531
|
str
|
|
473
|
-
|
|
532
|
+
The constructed project entity key string.
|
|
474
533
|
"""
|
|
475
534
|
client = get_client(kwargs.pop("local", False))
|
|
476
535
|
return self._build_base_entity_key(client, entity_id)
|
|
@@ -482,20 +541,32 @@ class BaseEntityOperationsProcessor:
|
|
|
482
541
|
**kwargs,
|
|
483
542
|
) -> None:
|
|
484
543
|
"""
|
|
485
|
-
Share
|
|
544
|
+
Share or unshare a project entity with a user.
|
|
545
|
+
|
|
546
|
+
Manages project access permissions by sharing the project with
|
|
547
|
+
a specified user or removing user access. Handles both sharing
|
|
548
|
+
and unsharing operations based on the 'unshare' parameter.
|
|
486
549
|
|
|
487
550
|
Parameters
|
|
488
551
|
----------
|
|
489
552
|
entity_type : str
|
|
490
|
-
|
|
553
|
+
The type of entity to share (typically 'project').
|
|
491
554
|
entity_name : str
|
|
492
|
-
|
|
555
|
+
The name identifier of the project to share.
|
|
493
556
|
**kwargs : dict
|
|
494
|
-
|
|
557
|
+
Additional parameters including:
|
|
558
|
+
- 'user': username to share with/unshare from
|
|
559
|
+
- 'unshare': boolean flag for unsharing (default False)
|
|
560
|
+
- 'local': boolean flag for local backend
|
|
495
561
|
|
|
496
562
|
Returns
|
|
497
563
|
-------
|
|
498
564
|
None
|
|
565
|
+
|
|
566
|
+
Raises
|
|
567
|
+
------
|
|
568
|
+
ValueError
|
|
569
|
+
If trying to unshare from a user who doesn't have access.
|
|
499
570
|
"""
|
|
500
571
|
client = get_client(kwargs.pop("local", False))
|
|
501
572
|
api = client.build_api(
|