label-studio-sdk 1.0.0__py3-none-any.whl → 1.0.1__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 label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +30 -4
- label_studio_sdk/_extensions/pager_ext.py +49 -0
- label_studio_sdk/_legacy/objects.py +46 -7
- label_studio_sdk/_legacy/schema/label_config_schema.json +14 -14
- label_studio_sdk/actions/__init__.py +25 -0
- label_studio_sdk/actions/client.py +79 -6
- label_studio_sdk/actions/types/__init__.py +25 -0
- label_studio_sdk/actions/types/actions_create_request_filters.py +43 -0
- label_studio_sdk/actions/types/actions_create_request_filters_conjunction.py +5 -0
- label_studio_sdk/actions/types/actions_create_request_filters_items_item.py +49 -0
- label_studio_sdk/actions/types/actions_create_request_filters_items_item_filter.py +31 -0
- label_studio_sdk/actions/types/actions_create_request_filters_items_item_operator.py +23 -0
- label_studio_sdk/actions/types/actions_create_request_id.py +19 -0
- label_studio_sdk/actions/types/actions_create_request_ordering_item.py +31 -0
- label_studio_sdk/actions/types/actions_create_request_selected_items.py +10 -0
- label_studio_sdk/actions/types/actions_create_request_selected_items_excluded.py +39 -0
- label_studio_sdk/actions/types/actions_create_request_selected_items_included.py +39 -0
- label_studio_sdk/base_client.py +183 -0
- label_studio_sdk/client.py +17 -175
- label_studio_sdk/core/client_wrapper.py +1 -1
- label_studio_sdk/core/http_client.py +5 -1
- label_studio_sdk/export_storage/azure/client.py +176 -10
- label_studio_sdk/export_storage/azure/types/azure_create_response.py +15 -0
- label_studio_sdk/export_storage/azure/types/azure_update_response.py +15 -0
- label_studio_sdk/export_storage/gcs/client.py +180 -14
- label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +16 -1
- label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +16 -1
- label_studio_sdk/export_storage/local/client.py +168 -22
- label_studio_sdk/export_storage/local/types/local_create_response.py +12 -2
- label_studio_sdk/export_storage/local/types/local_update_response.py +12 -2
- label_studio_sdk/export_storage/redis/client.py +234 -30
- label_studio_sdk/export_storage/redis/types/redis_create_response.py +20 -5
- label_studio_sdk/export_storage/redis/types/redis_update_response.py +20 -5
- label_studio_sdk/export_storage/s3/client.py +214 -26
- label_studio_sdk/export_storage/s3/types/s3create_response.py +15 -0
- label_studio_sdk/export_storage/s3/types/s3update_response.py +15 -0
- label_studio_sdk/import_storage/azure/client.py +266 -90
- label_studio_sdk/import_storage/azure/types/azure_create_response.py +28 -18
- label_studio_sdk/import_storage/azure/types/azure_update_response.py +28 -18
- label_studio_sdk/import_storage/gcs/client.py +270 -94
- label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +28 -18
- label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +28 -18
- label_studio_sdk/import_storage/local/client.py +168 -22
- label_studio_sdk/import_storage/local/types/local_create_response.py +12 -2
- label_studio_sdk/import_storage/local/types/local_update_response.py +12 -2
- label_studio_sdk/import_storage/redis/client.py +206 -50
- label_studio_sdk/import_storage/redis/types/redis_create_response.py +20 -10
- label_studio_sdk/import_storage/redis/types/redis_update_response.py +20 -10
- label_studio_sdk/import_storage/s3/client.py +336 -110
- label_studio_sdk/import_storage/s3/types/s3create_response.py +35 -25
- label_studio_sdk/import_storage/s3/types/s3update_response.py +35 -25
- label_studio_sdk/{_legacy/label_interface → label_interface}/base.py +10 -0
- label_studio_sdk/{_legacy/label_interface → label_interface}/control_tags.py +109 -71
- label_studio_sdk/{_legacy/label_interface → label_interface}/interface.py +96 -50
- label_studio_sdk/{_legacy/label_interface → label_interface}/object_tags.py +8 -13
- label_studio_sdk/label_interface/region.py +75 -0
- label_studio_sdk/projects/client.py +4 -2
- label_studio_sdk/projects/client_ext.py +19 -0
- label_studio_sdk/tasks/client.py +26 -2
- label_studio_sdk/tasks/client_ext.py +18 -0
- label_studio_sdk/types/annotation.py +5 -5
- label_studio_sdk/types/task.py +1 -1
- label_studio_sdk/views/__init__.py +8 -4
- label_studio_sdk/views/types/__init__.py +8 -4
- label_studio_sdk/views/types/views_create_request_data.py +2 -2
- label_studio_sdk/views/types/views_create_request_data_filters.py +5 -5
- label_studio_sdk/views/types/views_create_request_data_filters_conjunction.py +1 -1
- label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +10 -8
- label_studio_sdk/views/types/views_create_request_data_filters_items_item_filter.py +31 -0
- label_studio_sdk/views/types/views_create_request_data_filters_items_item_operator.py +23 -0
- label_studio_sdk/views/types/views_create_request_data_ordering_item.py +27 -34
- label_studio_sdk/views/types/views_update_request_data.py +2 -2
- label_studio_sdk/views/types/views_update_request_data_filters.py +5 -5
- label_studio_sdk/views/types/views_update_request_data_filters_conjunction.py +1 -1
- label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +10 -8
- label_studio_sdk/views/types/views_update_request_data_filters_items_item_filter.py +31 -0
- label_studio_sdk/views/types/views_update_request_data_filters_items_item_operator.py +23 -0
- label_studio_sdk/views/types/views_update_request_data_ordering_item.py +27 -34
- {label_studio_sdk-1.0.0.dist-info → label_studio_sdk-1.0.1.dist-info}/METADATA +17 -161
- {label_studio_sdk-1.0.0.dist-info → label_studio_sdk-1.0.1.dist-info}/RECORD +84 -67
- label_studio_sdk/_legacy/label_interface/region.py +0 -43
- label_studio_sdk/views/types/views_create_request_data_ordering_item_direction.py +0 -5
- label_studio_sdk/views/types/views_update_request_data_ordering_item_direction.py +0 -5
- /label_studio_sdk/{_legacy/label_interface → label_interface}/__init__.py +0 -0
- /label_studio_sdk/{_legacy/label_interface → label_interface}/data_examples.json +0 -0
- /label_studio_sdk/{_legacy/label_interface → label_interface}/label_tags.py +0 -0
- {label_studio_sdk-1.0.0.dist-info → label_studio_sdk-1.0.1.dist-info}/WHEEL +0 -0
|
@@ -66,12 +66,15 @@ class RedisClient:
|
|
|
66
66
|
def create(
|
|
67
67
|
self,
|
|
68
68
|
*,
|
|
69
|
+
db: typing.Optional[int] = OMIT,
|
|
70
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
71
|
+
title: typing.Optional[str] = OMIT,
|
|
72
|
+
description: typing.Optional[str] = OMIT,
|
|
69
73
|
project: typing.Optional[int] = OMIT,
|
|
70
74
|
path: typing.Optional[str] = OMIT,
|
|
71
75
|
host: typing.Optional[str] = OMIT,
|
|
72
76
|
port: typing.Optional[str] = OMIT,
|
|
73
77
|
password: typing.Optional[str] = OMIT,
|
|
74
|
-
db: typing.Optional[int] = OMIT,
|
|
75
78
|
request_options: typing.Optional[RequestOptions] = None,
|
|
76
79
|
) -> RedisCreateResponse:
|
|
77
80
|
"""
|
|
@@ -83,6 +86,18 @@ class RedisClient:
|
|
|
83
86
|
|
|
84
87
|
Parameters
|
|
85
88
|
----------
|
|
89
|
+
db : typing.Optional[int]
|
|
90
|
+
Database ID of database to use
|
|
91
|
+
|
|
92
|
+
can_delete_objects : typing.Optional[bool]
|
|
93
|
+
Deletion from storage enabled.
|
|
94
|
+
|
|
95
|
+
title : typing.Optional[str]
|
|
96
|
+
Storage title
|
|
97
|
+
|
|
98
|
+
description : typing.Optional[str]
|
|
99
|
+
Storage description
|
|
100
|
+
|
|
86
101
|
project : typing.Optional[int]
|
|
87
102
|
Project ID
|
|
88
103
|
|
|
@@ -98,9 +113,6 @@ class RedisClient:
|
|
|
98
113
|
password : typing.Optional[str]
|
|
99
114
|
Server Password (optional)
|
|
100
115
|
|
|
101
|
-
db : typing.Optional[int]
|
|
102
|
-
Database ID of database to use
|
|
103
|
-
|
|
104
116
|
request_options : typing.Optional[RequestOptions]
|
|
105
117
|
Request-specific configuration.
|
|
106
118
|
|
|
@@ -121,7 +133,17 @@ class RedisClient:
|
|
|
121
133
|
_response = self._client_wrapper.httpx_client.request(
|
|
122
134
|
"api/storages/export/redis",
|
|
123
135
|
method="POST",
|
|
124
|
-
json={
|
|
136
|
+
json={
|
|
137
|
+
"db": db,
|
|
138
|
+
"can_delete_objects": can_delete_objects,
|
|
139
|
+
"title": title,
|
|
140
|
+
"description": description,
|
|
141
|
+
"project": project,
|
|
142
|
+
"path": path,
|
|
143
|
+
"host": host,
|
|
144
|
+
"port": port,
|
|
145
|
+
"password": password,
|
|
146
|
+
},
|
|
125
147
|
request_options=request_options,
|
|
126
148
|
omit=OMIT,
|
|
127
149
|
)
|
|
@@ -133,19 +155,62 @@ class RedisClient:
|
|
|
133
155
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
134
156
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
135
157
|
|
|
136
|
-
def validate(
|
|
158
|
+
def validate(
|
|
159
|
+
self,
|
|
160
|
+
*,
|
|
161
|
+
id: typing.Optional[int] = OMIT,
|
|
162
|
+
db: typing.Optional[int] = OMIT,
|
|
163
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
164
|
+
title: typing.Optional[str] = OMIT,
|
|
165
|
+
description: typing.Optional[str] = OMIT,
|
|
166
|
+
project: typing.Optional[int] = OMIT,
|
|
167
|
+
path: typing.Optional[str] = OMIT,
|
|
168
|
+
host: typing.Optional[str] = OMIT,
|
|
169
|
+
port: typing.Optional[str] = OMIT,
|
|
170
|
+
password: typing.Optional[str] = OMIT,
|
|
171
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
172
|
+
) -> None:
|
|
137
173
|
"""
|
|
138
174
|
Validate a specific Redis export storage connection. This is useful to ensure that the storage configuration settings are correct and operational before attempting to export data.
|
|
139
175
|
|
|
140
176
|
Parameters
|
|
141
177
|
----------
|
|
178
|
+
id : typing.Optional[int]
|
|
179
|
+
Storage ID. If set, storage with specified ID will be updated
|
|
180
|
+
|
|
181
|
+
db : typing.Optional[int]
|
|
182
|
+
Database ID of database to use
|
|
183
|
+
|
|
184
|
+
can_delete_objects : typing.Optional[bool]
|
|
185
|
+
Deletion from storage enabled.
|
|
186
|
+
|
|
187
|
+
title : typing.Optional[str]
|
|
188
|
+
Storage title
|
|
189
|
+
|
|
190
|
+
description : typing.Optional[str]
|
|
191
|
+
Storage description
|
|
192
|
+
|
|
193
|
+
project : typing.Optional[int]
|
|
194
|
+
Project ID
|
|
195
|
+
|
|
196
|
+
path : typing.Optional[str]
|
|
197
|
+
Storage prefix (optional)
|
|
198
|
+
|
|
199
|
+
host : typing.Optional[str]
|
|
200
|
+
Server Host IP (optional)
|
|
201
|
+
|
|
202
|
+
port : typing.Optional[str]
|
|
203
|
+
Server Port (optional)
|
|
204
|
+
|
|
205
|
+
password : typing.Optional[str]
|
|
206
|
+
Server Password (optional)
|
|
207
|
+
|
|
142
208
|
request_options : typing.Optional[RequestOptions]
|
|
143
209
|
Request-specific configuration.
|
|
144
210
|
|
|
145
211
|
Returns
|
|
146
212
|
-------
|
|
147
|
-
|
|
148
|
-
|
|
213
|
+
None
|
|
149
214
|
|
|
150
215
|
Examples
|
|
151
216
|
--------
|
|
@@ -157,10 +222,25 @@ class RedisClient:
|
|
|
157
222
|
client.export_storage.redis.validate()
|
|
158
223
|
"""
|
|
159
224
|
_response = self._client_wrapper.httpx_client.request(
|
|
160
|
-
"api/storages/export/redis/validate",
|
|
225
|
+
"api/storages/export/redis/validate",
|
|
226
|
+
method="POST",
|
|
227
|
+
json={
|
|
228
|
+
"id": id,
|
|
229
|
+
"db": db,
|
|
230
|
+
"can_delete_objects": can_delete_objects,
|
|
231
|
+
"title": title,
|
|
232
|
+
"description": description,
|
|
233
|
+
"project": project,
|
|
234
|
+
"path": path,
|
|
235
|
+
"host": host,
|
|
236
|
+
"port": port,
|
|
237
|
+
"password": password,
|
|
238
|
+
},
|
|
239
|
+
request_options=request_options,
|
|
240
|
+
omit=OMIT,
|
|
161
241
|
)
|
|
162
242
|
if 200 <= _response.status_code < 300:
|
|
163
|
-
return
|
|
243
|
+
return
|
|
164
244
|
try:
|
|
165
245
|
_response_json = _response.json()
|
|
166
246
|
except JSONDecodeError:
|
|
@@ -252,12 +332,15 @@ class RedisClient:
|
|
|
252
332
|
self,
|
|
253
333
|
id: int,
|
|
254
334
|
*,
|
|
335
|
+
db: typing.Optional[int] = OMIT,
|
|
336
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
337
|
+
title: typing.Optional[str] = OMIT,
|
|
338
|
+
description: typing.Optional[str] = OMIT,
|
|
255
339
|
project: typing.Optional[int] = OMIT,
|
|
256
340
|
path: typing.Optional[str] = OMIT,
|
|
257
341
|
host: typing.Optional[str] = OMIT,
|
|
258
342
|
port: typing.Optional[str] = OMIT,
|
|
259
343
|
password: typing.Optional[str] = OMIT,
|
|
260
|
-
db: typing.Optional[int] = OMIT,
|
|
261
344
|
request_options: typing.Optional[RequestOptions] = None,
|
|
262
345
|
) -> RedisUpdateResponse:
|
|
263
346
|
"""
|
|
@@ -270,6 +353,18 @@ class RedisClient:
|
|
|
270
353
|
id : int
|
|
271
354
|
A unique integer value identifying this redis export storage.
|
|
272
355
|
|
|
356
|
+
db : typing.Optional[int]
|
|
357
|
+
Database ID of database to use
|
|
358
|
+
|
|
359
|
+
can_delete_objects : typing.Optional[bool]
|
|
360
|
+
Deletion from storage enabled.
|
|
361
|
+
|
|
362
|
+
title : typing.Optional[str]
|
|
363
|
+
Storage title
|
|
364
|
+
|
|
365
|
+
description : typing.Optional[str]
|
|
366
|
+
Storage description
|
|
367
|
+
|
|
273
368
|
project : typing.Optional[int]
|
|
274
369
|
Project ID
|
|
275
370
|
|
|
@@ -285,9 +380,6 @@ class RedisClient:
|
|
|
285
380
|
password : typing.Optional[str]
|
|
286
381
|
Server Password (optional)
|
|
287
382
|
|
|
288
|
-
db : typing.Optional[int]
|
|
289
|
-
Database ID of database to use
|
|
290
|
-
|
|
291
383
|
request_options : typing.Optional[RequestOptions]
|
|
292
384
|
Request-specific configuration.
|
|
293
385
|
|
|
@@ -310,7 +402,17 @@ class RedisClient:
|
|
|
310
402
|
_response = self._client_wrapper.httpx_client.request(
|
|
311
403
|
f"api/storages/export/redis/{jsonable_encoder(id)}",
|
|
312
404
|
method="PATCH",
|
|
313
|
-
json={
|
|
405
|
+
json={
|
|
406
|
+
"db": db,
|
|
407
|
+
"can_delete_objects": can_delete_objects,
|
|
408
|
+
"title": title,
|
|
409
|
+
"description": description,
|
|
410
|
+
"project": project,
|
|
411
|
+
"path": path,
|
|
412
|
+
"host": host,
|
|
413
|
+
"port": port,
|
|
414
|
+
"password": password,
|
|
415
|
+
},
|
|
314
416
|
request_options=request_options,
|
|
315
417
|
omit=OMIT,
|
|
316
418
|
)
|
|
@@ -415,12 +517,15 @@ class AsyncRedisClient:
|
|
|
415
517
|
async def create(
|
|
416
518
|
self,
|
|
417
519
|
*,
|
|
520
|
+
db: typing.Optional[int] = OMIT,
|
|
521
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
522
|
+
title: typing.Optional[str] = OMIT,
|
|
523
|
+
description: typing.Optional[str] = OMIT,
|
|
418
524
|
project: typing.Optional[int] = OMIT,
|
|
419
525
|
path: typing.Optional[str] = OMIT,
|
|
420
526
|
host: typing.Optional[str] = OMIT,
|
|
421
527
|
port: typing.Optional[str] = OMIT,
|
|
422
528
|
password: typing.Optional[str] = OMIT,
|
|
423
|
-
db: typing.Optional[int] = OMIT,
|
|
424
529
|
request_options: typing.Optional[RequestOptions] = None,
|
|
425
530
|
) -> RedisCreateResponse:
|
|
426
531
|
"""
|
|
@@ -432,6 +537,18 @@ class AsyncRedisClient:
|
|
|
432
537
|
|
|
433
538
|
Parameters
|
|
434
539
|
----------
|
|
540
|
+
db : typing.Optional[int]
|
|
541
|
+
Database ID of database to use
|
|
542
|
+
|
|
543
|
+
can_delete_objects : typing.Optional[bool]
|
|
544
|
+
Deletion from storage enabled.
|
|
545
|
+
|
|
546
|
+
title : typing.Optional[str]
|
|
547
|
+
Storage title
|
|
548
|
+
|
|
549
|
+
description : typing.Optional[str]
|
|
550
|
+
Storage description
|
|
551
|
+
|
|
435
552
|
project : typing.Optional[int]
|
|
436
553
|
Project ID
|
|
437
554
|
|
|
@@ -447,9 +564,6 @@ class AsyncRedisClient:
|
|
|
447
564
|
password : typing.Optional[str]
|
|
448
565
|
Server Password (optional)
|
|
449
566
|
|
|
450
|
-
db : typing.Optional[int]
|
|
451
|
-
Database ID of database to use
|
|
452
|
-
|
|
453
567
|
request_options : typing.Optional[RequestOptions]
|
|
454
568
|
Request-specific configuration.
|
|
455
569
|
|
|
@@ -470,7 +584,17 @@ class AsyncRedisClient:
|
|
|
470
584
|
_response = await self._client_wrapper.httpx_client.request(
|
|
471
585
|
"api/storages/export/redis",
|
|
472
586
|
method="POST",
|
|
473
|
-
json={
|
|
587
|
+
json={
|
|
588
|
+
"db": db,
|
|
589
|
+
"can_delete_objects": can_delete_objects,
|
|
590
|
+
"title": title,
|
|
591
|
+
"description": description,
|
|
592
|
+
"project": project,
|
|
593
|
+
"path": path,
|
|
594
|
+
"host": host,
|
|
595
|
+
"port": port,
|
|
596
|
+
"password": password,
|
|
597
|
+
},
|
|
474
598
|
request_options=request_options,
|
|
475
599
|
omit=OMIT,
|
|
476
600
|
)
|
|
@@ -482,19 +606,62 @@ class AsyncRedisClient:
|
|
|
482
606
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
483
607
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
484
608
|
|
|
485
|
-
async def validate(
|
|
609
|
+
async def validate(
|
|
610
|
+
self,
|
|
611
|
+
*,
|
|
612
|
+
id: typing.Optional[int] = OMIT,
|
|
613
|
+
db: typing.Optional[int] = OMIT,
|
|
614
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
615
|
+
title: typing.Optional[str] = OMIT,
|
|
616
|
+
description: typing.Optional[str] = OMIT,
|
|
617
|
+
project: typing.Optional[int] = OMIT,
|
|
618
|
+
path: typing.Optional[str] = OMIT,
|
|
619
|
+
host: typing.Optional[str] = OMIT,
|
|
620
|
+
port: typing.Optional[str] = OMIT,
|
|
621
|
+
password: typing.Optional[str] = OMIT,
|
|
622
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
623
|
+
) -> None:
|
|
486
624
|
"""
|
|
487
625
|
Validate a specific Redis export storage connection. This is useful to ensure that the storage configuration settings are correct and operational before attempting to export data.
|
|
488
626
|
|
|
489
627
|
Parameters
|
|
490
628
|
----------
|
|
629
|
+
id : typing.Optional[int]
|
|
630
|
+
Storage ID. If set, storage with specified ID will be updated
|
|
631
|
+
|
|
632
|
+
db : typing.Optional[int]
|
|
633
|
+
Database ID of database to use
|
|
634
|
+
|
|
635
|
+
can_delete_objects : typing.Optional[bool]
|
|
636
|
+
Deletion from storage enabled.
|
|
637
|
+
|
|
638
|
+
title : typing.Optional[str]
|
|
639
|
+
Storage title
|
|
640
|
+
|
|
641
|
+
description : typing.Optional[str]
|
|
642
|
+
Storage description
|
|
643
|
+
|
|
644
|
+
project : typing.Optional[int]
|
|
645
|
+
Project ID
|
|
646
|
+
|
|
647
|
+
path : typing.Optional[str]
|
|
648
|
+
Storage prefix (optional)
|
|
649
|
+
|
|
650
|
+
host : typing.Optional[str]
|
|
651
|
+
Server Host IP (optional)
|
|
652
|
+
|
|
653
|
+
port : typing.Optional[str]
|
|
654
|
+
Server Port (optional)
|
|
655
|
+
|
|
656
|
+
password : typing.Optional[str]
|
|
657
|
+
Server Password (optional)
|
|
658
|
+
|
|
491
659
|
request_options : typing.Optional[RequestOptions]
|
|
492
660
|
Request-specific configuration.
|
|
493
661
|
|
|
494
662
|
Returns
|
|
495
663
|
-------
|
|
496
|
-
|
|
497
|
-
|
|
664
|
+
None
|
|
498
665
|
|
|
499
666
|
Examples
|
|
500
667
|
--------
|
|
@@ -506,10 +673,25 @@ class AsyncRedisClient:
|
|
|
506
673
|
await client.export_storage.redis.validate()
|
|
507
674
|
"""
|
|
508
675
|
_response = await self._client_wrapper.httpx_client.request(
|
|
509
|
-
"api/storages/export/redis/validate",
|
|
676
|
+
"api/storages/export/redis/validate",
|
|
677
|
+
method="POST",
|
|
678
|
+
json={
|
|
679
|
+
"id": id,
|
|
680
|
+
"db": db,
|
|
681
|
+
"can_delete_objects": can_delete_objects,
|
|
682
|
+
"title": title,
|
|
683
|
+
"description": description,
|
|
684
|
+
"project": project,
|
|
685
|
+
"path": path,
|
|
686
|
+
"host": host,
|
|
687
|
+
"port": port,
|
|
688
|
+
"password": password,
|
|
689
|
+
},
|
|
690
|
+
request_options=request_options,
|
|
691
|
+
omit=OMIT,
|
|
510
692
|
)
|
|
511
693
|
if 200 <= _response.status_code < 300:
|
|
512
|
-
return
|
|
694
|
+
return
|
|
513
695
|
try:
|
|
514
696
|
_response_json = _response.json()
|
|
515
697
|
except JSONDecodeError:
|
|
@@ -601,12 +783,15 @@ class AsyncRedisClient:
|
|
|
601
783
|
self,
|
|
602
784
|
id: int,
|
|
603
785
|
*,
|
|
786
|
+
db: typing.Optional[int] = OMIT,
|
|
787
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
788
|
+
title: typing.Optional[str] = OMIT,
|
|
789
|
+
description: typing.Optional[str] = OMIT,
|
|
604
790
|
project: typing.Optional[int] = OMIT,
|
|
605
791
|
path: typing.Optional[str] = OMIT,
|
|
606
792
|
host: typing.Optional[str] = OMIT,
|
|
607
793
|
port: typing.Optional[str] = OMIT,
|
|
608
794
|
password: typing.Optional[str] = OMIT,
|
|
609
|
-
db: typing.Optional[int] = OMIT,
|
|
610
795
|
request_options: typing.Optional[RequestOptions] = None,
|
|
611
796
|
) -> RedisUpdateResponse:
|
|
612
797
|
"""
|
|
@@ -619,6 +804,18 @@ class AsyncRedisClient:
|
|
|
619
804
|
id : int
|
|
620
805
|
A unique integer value identifying this redis export storage.
|
|
621
806
|
|
|
807
|
+
db : typing.Optional[int]
|
|
808
|
+
Database ID of database to use
|
|
809
|
+
|
|
810
|
+
can_delete_objects : typing.Optional[bool]
|
|
811
|
+
Deletion from storage enabled.
|
|
812
|
+
|
|
813
|
+
title : typing.Optional[str]
|
|
814
|
+
Storage title
|
|
815
|
+
|
|
816
|
+
description : typing.Optional[str]
|
|
817
|
+
Storage description
|
|
818
|
+
|
|
622
819
|
project : typing.Optional[int]
|
|
623
820
|
Project ID
|
|
624
821
|
|
|
@@ -634,9 +831,6 @@ class AsyncRedisClient:
|
|
|
634
831
|
password : typing.Optional[str]
|
|
635
832
|
Server Password (optional)
|
|
636
833
|
|
|
637
|
-
db : typing.Optional[int]
|
|
638
|
-
Database ID of database to use
|
|
639
|
-
|
|
640
834
|
request_options : typing.Optional[RequestOptions]
|
|
641
835
|
Request-specific configuration.
|
|
642
836
|
|
|
@@ -659,7 +853,17 @@ class AsyncRedisClient:
|
|
|
659
853
|
_response = await self._client_wrapper.httpx_client.request(
|
|
660
854
|
f"api/storages/export/redis/{jsonable_encoder(id)}",
|
|
661
855
|
method="PATCH",
|
|
662
|
-
json={
|
|
856
|
+
json={
|
|
857
|
+
"db": db,
|
|
858
|
+
"can_delete_objects": can_delete_objects,
|
|
859
|
+
"title": title,
|
|
860
|
+
"description": description,
|
|
861
|
+
"project": project,
|
|
862
|
+
"path": path,
|
|
863
|
+
"host": host,
|
|
864
|
+
"port": port,
|
|
865
|
+
"password": password,
|
|
866
|
+
},
|
|
663
867
|
request_options=request_options,
|
|
664
868
|
omit=OMIT,
|
|
665
869
|
)
|
|
@@ -8,6 +8,26 @@ from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class RedisCreateResponse(pydantic_v1.BaseModel):
|
|
11
|
+
db: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Database ID of database to use
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
can_delete_objects: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Deletion from storage enabled.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
title: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Storage title
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
description: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Storage description
|
|
29
|
+
"""
|
|
30
|
+
|
|
11
31
|
project: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
12
32
|
"""
|
|
13
33
|
Project ID
|
|
@@ -33,11 +53,6 @@ class RedisCreateResponse(pydantic_v1.BaseModel):
|
|
|
33
53
|
Server Password (optional)
|
|
34
54
|
"""
|
|
35
55
|
|
|
36
|
-
db: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
37
|
-
"""
|
|
38
|
-
Database ID of database to use
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
56
|
def json(self, **kwargs: typing.Any) -> str:
|
|
42
57
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
43
58
|
return super().json(**kwargs_with_defaults)
|
|
@@ -8,6 +8,26 @@ from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class RedisUpdateResponse(pydantic_v1.BaseModel):
|
|
11
|
+
db: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Database ID of database to use
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
can_delete_objects: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Deletion from storage enabled.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
title: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Storage title
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
description: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Storage description
|
|
29
|
+
"""
|
|
30
|
+
|
|
11
31
|
project: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
12
32
|
"""
|
|
13
33
|
Project ID
|
|
@@ -33,11 +53,6 @@ class RedisUpdateResponse(pydantic_v1.BaseModel):
|
|
|
33
53
|
Server Password (optional)
|
|
34
54
|
"""
|
|
35
55
|
|
|
36
|
-
db: typing.Optional[int] = pydantic_v1.Field(default=None)
|
|
37
|
-
"""
|
|
38
|
-
Database ID of database to use
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
56
|
def json(self, **kwargs: typing.Any) -> str:
|
|
42
57
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
43
58
|
return super().json(**kwargs_with_defaults)
|