lambdadb 0.5.2__tar.gz → 0.5.4__tar.gz
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 lambdadb might be problematic. Click here for more details.
- {lambdadb-0.5.2 → lambdadb-0.5.4}/PKG-INFO +6 -6
- {lambdadb-0.5.2 → lambdadb-0.5.4}/README-PYPI.md +5 -5
- {lambdadb-0.5.2 → lambdadb-0.5.4}/pyproject.toml +1 -1
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/_version.py +3 -3
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/collections.py +73 -88
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/docs.py +71 -74
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/querycollectionop.py +12 -12
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/sdk.py +3 -3
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/sdkconfiguration.py +1 -1
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/__init__.py +0 -3
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/serializers.py +1 -18
- lambdadb-0.5.4/src/lambdadb/utils/unmarshal_json_response.py +24 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/LICENSE +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/py.typed +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/__init__.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/_hooks/__init__.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/_hooks/registration.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/_hooks/sdkhooks.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/_hooks/types.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/basesdk.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/__init__.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/apierror.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/badrequest_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/internalservererror.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/lambdadberror.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/no_response_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/resourcealreadyexists_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/resourcenotfound_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/responsevalidationerror.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/toomanyrequests_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/errors/unauthenticated_error.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/httpclient.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/__init__.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/bulkupsertdocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/collectionresponse.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/createcollectionop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/deletecollectionop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/deletedocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/fetchdocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/getbulkupsertdocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/getcollectionop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/indexconfigs_union.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/listcollectionsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/messageresponse.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/security.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/status.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/updatecollectionop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/updatedocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/models/upsertdocsop.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/py.typed +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/types/__init__.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/types/basemodel.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/annotations.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/datetimes.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/enums.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/eventstreaming.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/forms.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/headers.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/logger.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/metadata.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/queryparams.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/requestbodies.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/retries.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/security.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/url.py +0 -0
- {lambdadb-0.5.2 → lambdadb-0.5.4}/src/lambdadb/utils/values.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: lambdadb
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -339,11 +339,11 @@ with LambdaDB(
|
|
|
339
339
|
|
|
340
340
|
### Server Variables
|
|
341
341
|
|
|
342
|
-
The default server `https://{
|
|
342
|
+
The default server `https://{projectHost}` contains variables and is set to `https://api.lambdadb.com/projects/default` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
|
343
343
|
|
|
344
|
-
| Variable
|
|
345
|
-
|
|
|
346
|
-
| `
|
|
344
|
+
| Variable | Parameter | Default | Description |
|
|
345
|
+
| ------------- | ------------------- | ------------------------------------- | -------------------------- |
|
|
346
|
+
| `projectHost` | `project_host: str` | `"api.lambdadb.com/projects/default"` | The project URL of the API |
|
|
347
347
|
|
|
348
348
|
#### Example
|
|
349
349
|
|
|
@@ -352,7 +352,7 @@ from lambdadb import LambdaDB
|
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
with LambdaDB(
|
|
355
|
-
|
|
355
|
+
project_host="<value>"
|
|
356
356
|
project_api_key="<YOUR_PROJECT_API_KEY>",
|
|
357
357
|
) as lambda_db:
|
|
358
358
|
|
|
@@ -322,11 +322,11 @@ with LambdaDB(
|
|
|
322
322
|
|
|
323
323
|
### Server Variables
|
|
324
324
|
|
|
325
|
-
The default server `https://{
|
|
325
|
+
The default server `https://{projectHost}` contains variables and is set to `https://api.lambdadb.com/projects/default` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
|
326
326
|
|
|
327
|
-
| Variable
|
|
328
|
-
|
|
|
329
|
-
| `
|
|
327
|
+
| Variable | Parameter | Default | Description |
|
|
328
|
+
| ------------- | ------------------- | ------------------------------------- | -------------------------- |
|
|
329
|
+
| `projectHost` | `project_host: str` | `"api.lambdadb.com/projects/default"` | The project URL of the API |
|
|
330
330
|
|
|
331
331
|
#### Example
|
|
332
332
|
|
|
@@ -335,7 +335,7 @@ from lambdadb import LambdaDB
|
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
with LambdaDB(
|
|
338
|
-
|
|
338
|
+
project_host="<value>"
|
|
339
339
|
project_api_key="<YOUR_PROJECT_API_KEY>",
|
|
340
340
|
) as lambda_db:
|
|
341
341
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "lambdadb"
|
|
6
|
-
__version__: str = "0.5.
|
|
6
|
+
__version__: str = "0.5.4"
|
|
7
7
|
__openapi_doc_version__: str = "1.1.1"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.5.
|
|
8
|
+
__gen_version__: str = "2.657.1"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.5.4 2.657.1 1.1.1 lambdadb"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -7,6 +7,7 @@ from lambdadb._hooks import HookContext
|
|
|
7
7
|
from lambdadb.docs import Docs
|
|
8
8
|
from lambdadb.types import OptionalNullable, UNSET
|
|
9
9
|
from lambdadb.utils import get_security_from_env
|
|
10
|
+
from lambdadb.utils.unmarshal_json_response import unmarshal_json_response
|
|
10
11
|
from typing import Any, Dict, List, Mapping, Optional, Union
|
|
11
12
|
|
|
12
13
|
|
|
@@ -90,26 +91,24 @@ class Collections(BaseSDK):
|
|
|
90
91
|
|
|
91
92
|
response_data: Any = None
|
|
92
93
|
if utils.match_response(http_res, "200", "application/json"):
|
|
93
|
-
return
|
|
94
|
-
models.ListCollectionsResponse, http_res
|
|
95
|
-
)
|
|
94
|
+
return unmarshal_json_response(models.ListCollectionsResponse, http_res)
|
|
96
95
|
if utils.match_response(http_res, "401", "application/json"):
|
|
97
|
-
response_data =
|
|
96
|
+
response_data = unmarshal_json_response(
|
|
98
97
|
errors.UnauthenticatedErrorData, http_res
|
|
99
98
|
)
|
|
100
99
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
101
100
|
if utils.match_response(http_res, "404", "application/json"):
|
|
102
|
-
response_data =
|
|
101
|
+
response_data = unmarshal_json_response(
|
|
103
102
|
errors.ResourceNotFoundErrorData, http_res
|
|
104
103
|
)
|
|
105
104
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
106
105
|
if utils.match_response(http_res, "429", "application/json"):
|
|
107
|
-
response_data =
|
|
106
|
+
response_data = unmarshal_json_response(
|
|
108
107
|
errors.TooManyRequestsErrorData, http_res
|
|
109
108
|
)
|
|
110
109
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
111
110
|
if utils.match_response(http_res, "500", "application/json"):
|
|
112
|
-
response_data =
|
|
111
|
+
response_data = unmarshal_json_response(
|
|
113
112
|
errors.InternalServerErrorData, http_res
|
|
114
113
|
)
|
|
115
114
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -191,26 +190,24 @@ class Collections(BaseSDK):
|
|
|
191
190
|
|
|
192
191
|
response_data: Any = None
|
|
193
192
|
if utils.match_response(http_res, "200", "application/json"):
|
|
194
|
-
return
|
|
195
|
-
models.ListCollectionsResponse, http_res
|
|
196
|
-
)
|
|
193
|
+
return unmarshal_json_response(models.ListCollectionsResponse, http_res)
|
|
197
194
|
if utils.match_response(http_res, "401", "application/json"):
|
|
198
|
-
response_data =
|
|
195
|
+
response_data = unmarshal_json_response(
|
|
199
196
|
errors.UnauthenticatedErrorData, http_res
|
|
200
197
|
)
|
|
201
198
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
202
199
|
if utils.match_response(http_res, "404", "application/json"):
|
|
203
|
-
response_data =
|
|
200
|
+
response_data = unmarshal_json_response(
|
|
204
201
|
errors.ResourceNotFoundErrorData, http_res
|
|
205
202
|
)
|
|
206
203
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
207
204
|
if utils.match_response(http_res, "429", "application/json"):
|
|
208
|
-
response_data =
|
|
205
|
+
response_data = unmarshal_json_response(
|
|
209
206
|
errors.TooManyRequestsErrorData, http_res
|
|
210
207
|
)
|
|
211
208
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
212
209
|
if utils.match_response(http_res, "500", "application/json"):
|
|
213
|
-
response_data =
|
|
210
|
+
response_data = unmarshal_json_response(
|
|
214
211
|
errors.InternalServerErrorData, http_res
|
|
215
212
|
)
|
|
216
213
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -324,31 +321,29 @@ class Collections(BaseSDK):
|
|
|
324
321
|
|
|
325
322
|
response_data: Any = None
|
|
326
323
|
if utils.match_response(http_res, "202", "application/json"):
|
|
327
|
-
return
|
|
328
|
-
models.CreateCollectionResponse, http_res
|
|
329
|
-
)
|
|
324
|
+
return unmarshal_json_response(models.CreateCollectionResponse, http_res)
|
|
330
325
|
if utils.match_response(http_res, "400", "application/json"):
|
|
331
|
-
response_data =
|
|
326
|
+
response_data = unmarshal_json_response(
|
|
332
327
|
errors.BadRequestErrorData, http_res
|
|
333
328
|
)
|
|
334
329
|
raise errors.BadRequestError(response_data, http_res)
|
|
335
330
|
if utils.match_response(http_res, "401", "application/json"):
|
|
336
|
-
response_data =
|
|
331
|
+
response_data = unmarshal_json_response(
|
|
337
332
|
errors.UnauthenticatedErrorData, http_res
|
|
338
333
|
)
|
|
339
334
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
340
335
|
if utils.match_response(http_res, "409", "application/json"):
|
|
341
|
-
response_data =
|
|
336
|
+
response_data = unmarshal_json_response(
|
|
342
337
|
errors.ResourceAlreadyExistsErrorData, http_res
|
|
343
338
|
)
|
|
344
339
|
raise errors.ResourceAlreadyExistsError(response_data, http_res)
|
|
345
340
|
if utils.match_response(http_res, "429", "application/json"):
|
|
346
|
-
response_data =
|
|
341
|
+
response_data = unmarshal_json_response(
|
|
347
342
|
errors.TooManyRequestsErrorData, http_res
|
|
348
343
|
)
|
|
349
344
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
350
345
|
if utils.match_response(http_res, "500", "application/json"):
|
|
351
|
-
response_data =
|
|
346
|
+
response_data = unmarshal_json_response(
|
|
352
347
|
errors.InternalServerErrorData, http_res
|
|
353
348
|
)
|
|
354
349
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -462,31 +457,29 @@ class Collections(BaseSDK):
|
|
|
462
457
|
|
|
463
458
|
response_data: Any = None
|
|
464
459
|
if utils.match_response(http_res, "202", "application/json"):
|
|
465
|
-
return
|
|
466
|
-
models.CreateCollectionResponse, http_res
|
|
467
|
-
)
|
|
460
|
+
return unmarshal_json_response(models.CreateCollectionResponse, http_res)
|
|
468
461
|
if utils.match_response(http_res, "400", "application/json"):
|
|
469
|
-
response_data =
|
|
462
|
+
response_data = unmarshal_json_response(
|
|
470
463
|
errors.BadRequestErrorData, http_res
|
|
471
464
|
)
|
|
472
465
|
raise errors.BadRequestError(response_data, http_res)
|
|
473
466
|
if utils.match_response(http_res, "401", "application/json"):
|
|
474
|
-
response_data =
|
|
467
|
+
response_data = unmarshal_json_response(
|
|
475
468
|
errors.UnauthenticatedErrorData, http_res
|
|
476
469
|
)
|
|
477
470
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
478
471
|
if utils.match_response(http_res, "409", "application/json"):
|
|
479
|
-
response_data =
|
|
472
|
+
response_data = unmarshal_json_response(
|
|
480
473
|
errors.ResourceAlreadyExistsErrorData, http_res
|
|
481
474
|
)
|
|
482
475
|
raise errors.ResourceAlreadyExistsError(response_data, http_res)
|
|
483
476
|
if utils.match_response(http_res, "429", "application/json"):
|
|
484
|
-
response_data =
|
|
477
|
+
response_data = unmarshal_json_response(
|
|
485
478
|
errors.TooManyRequestsErrorData, http_res
|
|
486
479
|
)
|
|
487
480
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
488
481
|
if utils.match_response(http_res, "500", "application/json"):
|
|
489
|
-
response_data =
|
|
482
|
+
response_data = unmarshal_json_response(
|
|
490
483
|
errors.InternalServerErrorData, http_res
|
|
491
484
|
)
|
|
492
485
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -575,24 +568,24 @@ class Collections(BaseSDK):
|
|
|
575
568
|
|
|
576
569
|
response_data: Any = None
|
|
577
570
|
if utils.match_response(http_res, "202", "application/json"):
|
|
578
|
-
return
|
|
571
|
+
return unmarshal_json_response(models.MessageResponse, http_res)
|
|
579
572
|
if utils.match_response(http_res, "401", "application/json"):
|
|
580
|
-
response_data =
|
|
573
|
+
response_data = unmarshal_json_response(
|
|
581
574
|
errors.UnauthenticatedErrorData, http_res
|
|
582
575
|
)
|
|
583
576
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
584
577
|
if utils.match_response(http_res, "404", "application/json"):
|
|
585
|
-
response_data =
|
|
578
|
+
response_data = unmarshal_json_response(
|
|
586
579
|
errors.ResourceNotFoundErrorData, http_res
|
|
587
580
|
)
|
|
588
581
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
589
582
|
if utils.match_response(http_res, "429", "application/json"):
|
|
590
|
-
response_data =
|
|
583
|
+
response_data = unmarshal_json_response(
|
|
591
584
|
errors.TooManyRequestsErrorData, http_res
|
|
592
585
|
)
|
|
593
586
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
594
587
|
if utils.match_response(http_res, "500", "application/json"):
|
|
595
|
-
response_data =
|
|
588
|
+
response_data = unmarshal_json_response(
|
|
596
589
|
errors.InternalServerErrorData, http_res
|
|
597
590
|
)
|
|
598
591
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -681,24 +674,24 @@ class Collections(BaseSDK):
|
|
|
681
674
|
|
|
682
675
|
response_data: Any = None
|
|
683
676
|
if utils.match_response(http_res, "202", "application/json"):
|
|
684
|
-
return
|
|
677
|
+
return unmarshal_json_response(models.MessageResponse, http_res)
|
|
685
678
|
if utils.match_response(http_res, "401", "application/json"):
|
|
686
|
-
response_data =
|
|
679
|
+
response_data = unmarshal_json_response(
|
|
687
680
|
errors.UnauthenticatedErrorData, http_res
|
|
688
681
|
)
|
|
689
682
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
690
683
|
if utils.match_response(http_res, "404", "application/json"):
|
|
691
|
-
response_data =
|
|
684
|
+
response_data = unmarshal_json_response(
|
|
692
685
|
errors.ResourceNotFoundErrorData, http_res
|
|
693
686
|
)
|
|
694
687
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
695
688
|
if utils.match_response(http_res, "429", "application/json"):
|
|
696
|
-
response_data =
|
|
689
|
+
response_data = unmarshal_json_response(
|
|
697
690
|
errors.TooManyRequestsErrorData, http_res
|
|
698
691
|
)
|
|
699
692
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
700
693
|
if utils.match_response(http_res, "500", "application/json"):
|
|
701
|
-
response_data =
|
|
694
|
+
response_data = unmarshal_json_response(
|
|
702
695
|
errors.InternalServerErrorData, http_res
|
|
703
696
|
)
|
|
704
697
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -787,24 +780,24 @@ class Collections(BaseSDK):
|
|
|
787
780
|
|
|
788
781
|
response_data: Any = None
|
|
789
782
|
if utils.match_response(http_res, "200", "application/json"):
|
|
790
|
-
return
|
|
783
|
+
return unmarshal_json_response(models.GetCollectionResponse, http_res)
|
|
791
784
|
if utils.match_response(http_res, "401", "application/json"):
|
|
792
|
-
response_data =
|
|
785
|
+
response_data = unmarshal_json_response(
|
|
793
786
|
errors.UnauthenticatedErrorData, http_res
|
|
794
787
|
)
|
|
795
788
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
796
789
|
if utils.match_response(http_res, "404", "application/json"):
|
|
797
|
-
response_data =
|
|
790
|
+
response_data = unmarshal_json_response(
|
|
798
791
|
errors.ResourceNotFoundErrorData, http_res
|
|
799
792
|
)
|
|
800
793
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
801
794
|
if utils.match_response(http_res, "429", "application/json"):
|
|
802
|
-
response_data =
|
|
795
|
+
response_data = unmarshal_json_response(
|
|
803
796
|
errors.TooManyRequestsErrorData, http_res
|
|
804
797
|
)
|
|
805
798
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
806
799
|
if utils.match_response(http_res, "500", "application/json"):
|
|
807
|
-
response_data =
|
|
800
|
+
response_data = unmarshal_json_response(
|
|
808
801
|
errors.InternalServerErrorData, http_res
|
|
809
802
|
)
|
|
810
803
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -893,24 +886,24 @@ class Collections(BaseSDK):
|
|
|
893
886
|
|
|
894
887
|
response_data: Any = None
|
|
895
888
|
if utils.match_response(http_res, "200", "application/json"):
|
|
896
|
-
return
|
|
889
|
+
return unmarshal_json_response(models.GetCollectionResponse, http_res)
|
|
897
890
|
if utils.match_response(http_res, "401", "application/json"):
|
|
898
|
-
response_data =
|
|
891
|
+
response_data = unmarshal_json_response(
|
|
899
892
|
errors.UnauthenticatedErrorData, http_res
|
|
900
893
|
)
|
|
901
894
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
902
895
|
if utils.match_response(http_res, "404", "application/json"):
|
|
903
|
-
response_data =
|
|
896
|
+
response_data = unmarshal_json_response(
|
|
904
897
|
errors.ResourceNotFoundErrorData, http_res
|
|
905
898
|
)
|
|
906
899
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
907
900
|
if utils.match_response(http_res, "429", "application/json"):
|
|
908
|
-
response_data =
|
|
901
|
+
response_data = unmarshal_json_response(
|
|
909
902
|
errors.TooManyRequestsErrorData, http_res
|
|
910
903
|
)
|
|
911
904
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
912
905
|
if utils.match_response(http_res, "500", "application/json"):
|
|
913
|
-
response_data =
|
|
906
|
+
response_data = unmarshal_json_response(
|
|
914
907
|
errors.InternalServerErrorData, http_res
|
|
915
908
|
)
|
|
916
909
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1016,31 +1009,29 @@ class Collections(BaseSDK):
|
|
|
1016
1009
|
|
|
1017
1010
|
response_data: Any = None
|
|
1018
1011
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1019
|
-
return
|
|
1020
|
-
models.UpdateCollectionResponse, http_res
|
|
1021
|
-
)
|
|
1012
|
+
return unmarshal_json_response(models.UpdateCollectionResponse, http_res)
|
|
1022
1013
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1023
|
-
response_data =
|
|
1014
|
+
response_data = unmarshal_json_response(
|
|
1024
1015
|
errors.BadRequestErrorData, http_res
|
|
1025
1016
|
)
|
|
1026
1017
|
raise errors.BadRequestError(response_data, http_res)
|
|
1027
1018
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1028
|
-
response_data =
|
|
1019
|
+
response_data = unmarshal_json_response(
|
|
1029
1020
|
errors.UnauthenticatedErrorData, http_res
|
|
1030
1021
|
)
|
|
1031
1022
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
1032
1023
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1033
|
-
response_data =
|
|
1024
|
+
response_data = unmarshal_json_response(
|
|
1034
1025
|
errors.ResourceNotFoundErrorData, http_res
|
|
1035
1026
|
)
|
|
1036
1027
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
1037
1028
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1038
|
-
response_data =
|
|
1029
|
+
response_data = unmarshal_json_response(
|
|
1039
1030
|
errors.TooManyRequestsErrorData, http_res
|
|
1040
1031
|
)
|
|
1041
1032
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
1042
1033
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1043
|
-
response_data =
|
|
1034
|
+
response_data = unmarshal_json_response(
|
|
1044
1035
|
errors.InternalServerErrorData, http_res
|
|
1045
1036
|
)
|
|
1046
1037
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1146,31 +1137,29 @@ class Collections(BaseSDK):
|
|
|
1146
1137
|
|
|
1147
1138
|
response_data: Any = None
|
|
1148
1139
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1149
|
-
return
|
|
1150
|
-
models.UpdateCollectionResponse, http_res
|
|
1151
|
-
)
|
|
1140
|
+
return unmarshal_json_response(models.UpdateCollectionResponse, http_res)
|
|
1152
1141
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1153
|
-
response_data =
|
|
1142
|
+
response_data = unmarshal_json_response(
|
|
1154
1143
|
errors.BadRequestErrorData, http_res
|
|
1155
1144
|
)
|
|
1156
1145
|
raise errors.BadRequestError(response_data, http_res)
|
|
1157
1146
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1158
|
-
response_data =
|
|
1147
|
+
response_data = unmarshal_json_response(
|
|
1159
1148
|
errors.UnauthenticatedErrorData, http_res
|
|
1160
1149
|
)
|
|
1161
1150
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
1162
1151
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1163
|
-
response_data =
|
|
1152
|
+
response_data = unmarshal_json_response(
|
|
1164
1153
|
errors.ResourceNotFoundErrorData, http_res
|
|
1165
1154
|
)
|
|
1166
1155
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
1167
1156
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1168
|
-
response_data =
|
|
1157
|
+
response_data = unmarshal_json_response(
|
|
1169
1158
|
errors.TooManyRequestsErrorData, http_res
|
|
1170
1159
|
)
|
|
1171
1160
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
1172
1161
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1173
|
-
response_data =
|
|
1162
|
+
response_data = unmarshal_json_response(
|
|
1174
1163
|
errors.InternalServerErrorData, http_res
|
|
1175
1164
|
)
|
|
1176
1165
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1187,8 +1176,8 @@ class Collections(BaseSDK):
|
|
|
1187
1176
|
self,
|
|
1188
1177
|
*,
|
|
1189
1178
|
collection_name: str,
|
|
1190
|
-
|
|
1191
|
-
|
|
1179
|
+
query: Dict[str, Any],
|
|
1180
|
+
size: Optional[int] = None,
|
|
1192
1181
|
consistent_read: Optional[bool] = False,
|
|
1193
1182
|
include_vectors: Optional[bool] = False,
|
|
1194
1183
|
sort: Optional[List[Dict[str, Any]]] = None,
|
|
@@ -1201,8 +1190,8 @@ class Collections(BaseSDK):
|
|
|
1201
1190
|
r"""Search a collection with a query and return the most similar documents.
|
|
1202
1191
|
|
|
1203
1192
|
:param collection_name: Collection name.
|
|
1204
|
-
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1205
1193
|
:param query: Query object.
|
|
1194
|
+
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1206
1195
|
:param consistent_read: If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.
|
|
1207
1196
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1208
1197
|
:param sort: List of field name, sort direction pairs.
|
|
@@ -1286,31 +1275,29 @@ class Collections(BaseSDK):
|
|
|
1286
1275
|
|
|
1287
1276
|
response_data: Any = None
|
|
1288
1277
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1289
|
-
return
|
|
1290
|
-
models.QueryCollectionResponse, http_res
|
|
1291
|
-
)
|
|
1278
|
+
return unmarshal_json_response(models.QueryCollectionResponse, http_res)
|
|
1292
1279
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1293
|
-
response_data =
|
|
1280
|
+
response_data = unmarshal_json_response(
|
|
1294
1281
|
errors.BadRequestErrorData, http_res
|
|
1295
1282
|
)
|
|
1296
1283
|
raise errors.BadRequestError(response_data, http_res)
|
|
1297
1284
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1298
|
-
response_data =
|
|
1285
|
+
response_data = unmarshal_json_response(
|
|
1299
1286
|
errors.UnauthenticatedErrorData, http_res
|
|
1300
1287
|
)
|
|
1301
1288
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
1302
1289
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1303
|
-
response_data =
|
|
1290
|
+
response_data = unmarshal_json_response(
|
|
1304
1291
|
errors.ResourceNotFoundErrorData, http_res
|
|
1305
1292
|
)
|
|
1306
1293
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
1307
1294
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1308
|
-
response_data =
|
|
1295
|
+
response_data = unmarshal_json_response(
|
|
1309
1296
|
errors.TooManyRequestsErrorData, http_res
|
|
1310
1297
|
)
|
|
1311
1298
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
1312
1299
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1313
|
-
response_data =
|
|
1300
|
+
response_data = unmarshal_json_response(
|
|
1314
1301
|
errors.InternalServerErrorData, http_res
|
|
1315
1302
|
)
|
|
1316
1303
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1327,8 +1314,8 @@ class Collections(BaseSDK):
|
|
|
1327
1314
|
self,
|
|
1328
1315
|
*,
|
|
1329
1316
|
collection_name: str,
|
|
1330
|
-
|
|
1331
|
-
|
|
1317
|
+
query: Dict[str, Any],
|
|
1318
|
+
size: Optional[int] = None,
|
|
1332
1319
|
consistent_read: Optional[bool] = False,
|
|
1333
1320
|
include_vectors: Optional[bool] = False,
|
|
1334
1321
|
sort: Optional[List[Dict[str, Any]]] = None,
|
|
@@ -1341,8 +1328,8 @@ class Collections(BaseSDK):
|
|
|
1341
1328
|
r"""Search a collection with a query and return the most similar documents.
|
|
1342
1329
|
|
|
1343
1330
|
:param collection_name: Collection name.
|
|
1344
|
-
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1345
1331
|
:param query: Query object.
|
|
1332
|
+
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1346
1333
|
:param consistent_read: If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.
|
|
1347
1334
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1348
1335
|
:param sort: List of field name, sort direction pairs.
|
|
@@ -1426,31 +1413,29 @@ class Collections(BaseSDK):
|
|
|
1426
1413
|
|
|
1427
1414
|
response_data: Any = None
|
|
1428
1415
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1429
|
-
return
|
|
1430
|
-
models.QueryCollectionResponse, http_res
|
|
1431
|
-
)
|
|
1416
|
+
return unmarshal_json_response(models.QueryCollectionResponse, http_res)
|
|
1432
1417
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1433
|
-
response_data =
|
|
1418
|
+
response_data = unmarshal_json_response(
|
|
1434
1419
|
errors.BadRequestErrorData, http_res
|
|
1435
1420
|
)
|
|
1436
1421
|
raise errors.BadRequestError(response_data, http_res)
|
|
1437
1422
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1438
|
-
response_data =
|
|
1423
|
+
response_data = unmarshal_json_response(
|
|
1439
1424
|
errors.UnauthenticatedErrorData, http_res
|
|
1440
1425
|
)
|
|
1441
1426
|
raise errors.UnauthenticatedError(response_data, http_res)
|
|
1442
1427
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1443
|
-
response_data =
|
|
1428
|
+
response_data = unmarshal_json_response(
|
|
1444
1429
|
errors.ResourceNotFoundErrorData, http_res
|
|
1445
1430
|
)
|
|
1446
1431
|
raise errors.ResourceNotFoundError(response_data, http_res)
|
|
1447
1432
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1448
|
-
response_data =
|
|
1433
|
+
response_data = unmarshal_json_response(
|
|
1449
1434
|
errors.TooManyRequestsErrorData, http_res
|
|
1450
1435
|
)
|
|
1451
1436
|
raise errors.TooManyRequestsError(response_data, http_res)
|
|
1452
1437
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1453
|
-
response_data =
|
|
1438
|
+
response_data = unmarshal_json_response(
|
|
1454
1439
|
errors.InternalServerErrorData, http_res
|
|
1455
1440
|
)
|
|
1456
1441
|
raise errors.InternalServerError(response_data, http_res)
|