lambdadb 0.1.3__py3-none-any.whl → 0.2.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 lambdadb might be problematic. Click here for more details.
- lambdadb/_hooks/__init__.py +0 -1
- lambdadb/_hooks/sdkhooks.py +4 -6
- lambdadb/_hooks/types.py +8 -2
- lambdadb/_version.py +4 -4
- lambdadb/basesdk.py +12 -20
- lambdadb/collections.py +12 -6
- lambdadb/docs.py +10 -0
- lambdadb/models/__init__.py +0 -87
- lambdadb/models/querycollectionop.py +0 -5
- lambdadb/projects.py +0 -1211
- lambdadb/sdk.py +2 -7
- lambdadb/sdkconfiguration.py +0 -7
- lambdadb/utils/forms.py +49 -28
- {lambdadb-0.1.3.dist-info → lambdadb-0.2.1.dist-info}/METADATA +74 -89
- {lambdadb-0.1.3.dist-info → lambdadb-0.2.1.dist-info}/RECORD +17 -23
- lambdadb/models/createprojectop.py +0 -39
- lambdadb/models/deleteprojectop.py +0 -52
- lambdadb/models/getprojectop.py +0 -39
- lambdadb/models/listprojectsop.py +0 -38
- lambdadb/models/projectresponse.py +0 -38
- lambdadb/models/updateprojectop.py +0 -58
- {lambdadb-0.1.3.dist-info → lambdadb-0.2.1.dist-info}/LICENSE +0 -0
- {lambdadb-0.1.3.dist-info → lambdadb-0.2.1.dist-info}/WHEEL +0 -0
lambdadb/_hooks/__init__.py
CHANGED
lambdadb/_hooks/sdkhooks.py
CHANGED
|
@@ -11,9 +11,8 @@ from .types import (
|
|
|
11
11
|
AfterErrorHook,
|
|
12
12
|
Hooks,
|
|
13
13
|
)
|
|
14
|
-
from .registration import init_hooks
|
|
15
14
|
from typing import List, Optional, Tuple
|
|
16
|
-
from lambdadb.
|
|
15
|
+
from lambdadb.sdkconfiguration import SDKConfiguration
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
class SDKHooks(Hooks):
|
|
@@ -22,7 +21,6 @@ class SDKHooks(Hooks):
|
|
|
22
21
|
self.before_request_hooks: List[BeforeRequestHook] = []
|
|
23
22
|
self.after_success_hooks: List[AfterSuccessHook] = []
|
|
24
23
|
self.after_error_hooks: List[AfterErrorHook] = []
|
|
25
|
-
init_hooks(self)
|
|
26
24
|
|
|
27
25
|
def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
|
|
28
26
|
self.sdk_init_hooks.append(hook)
|
|
@@ -36,10 +34,10 @@ class SDKHooks(Hooks):
|
|
|
36
34
|
def register_after_error_hook(self, hook: AfterErrorHook) -> None:
|
|
37
35
|
self.after_error_hooks.append(hook)
|
|
38
36
|
|
|
39
|
-
def sdk_init(self,
|
|
37
|
+
def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
|
|
40
38
|
for hook in self.sdk_init_hooks:
|
|
41
|
-
|
|
42
|
-
return
|
|
39
|
+
config = hook.sdk_init(config)
|
|
40
|
+
return config
|
|
43
41
|
|
|
44
42
|
def before_request(
|
|
45
43
|
self, hook_ctx: BeforeRequestContext, request: httpx.Request
|
lambdadb/_hooks/types.py
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
import httpx
|
|
5
|
-
from lambdadb.
|
|
5
|
+
from lambdadb.sdkconfiguration import SDKConfiguration
|
|
6
6
|
from typing import Any, Callable, List, Optional, Tuple, Union
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class HookContext:
|
|
10
|
+
config: SDKConfiguration
|
|
10
11
|
base_url: str
|
|
11
12
|
operation_id: str
|
|
12
13
|
oauth2_scopes: Optional[List[str]] = None
|
|
@@ -14,11 +15,13 @@ class HookContext:
|
|
|
14
15
|
|
|
15
16
|
def __init__(
|
|
16
17
|
self,
|
|
18
|
+
config: SDKConfiguration,
|
|
17
19
|
base_url: str,
|
|
18
20
|
operation_id: str,
|
|
19
21
|
oauth2_scopes: Optional[List[str]],
|
|
20
22
|
security_source: Optional[Union[Any, Callable[[], Any]]],
|
|
21
23
|
):
|
|
24
|
+
self.config = config
|
|
22
25
|
self.base_url = base_url
|
|
23
26
|
self.operation_id = operation_id
|
|
24
27
|
self.oauth2_scopes = oauth2_scopes
|
|
@@ -28,6 +31,7 @@ class HookContext:
|
|
|
28
31
|
class BeforeRequestContext(HookContext):
|
|
29
32
|
def __init__(self, hook_ctx: HookContext):
|
|
30
33
|
super().__init__(
|
|
34
|
+
hook_ctx.config,
|
|
31
35
|
hook_ctx.base_url,
|
|
32
36
|
hook_ctx.operation_id,
|
|
33
37
|
hook_ctx.oauth2_scopes,
|
|
@@ -38,6 +42,7 @@ class BeforeRequestContext(HookContext):
|
|
|
38
42
|
class AfterSuccessContext(HookContext):
|
|
39
43
|
def __init__(self, hook_ctx: HookContext):
|
|
40
44
|
super().__init__(
|
|
45
|
+
hook_ctx.config,
|
|
41
46
|
hook_ctx.base_url,
|
|
42
47
|
hook_ctx.operation_id,
|
|
43
48
|
hook_ctx.oauth2_scopes,
|
|
@@ -48,6 +53,7 @@ class AfterSuccessContext(HookContext):
|
|
|
48
53
|
class AfterErrorContext(HookContext):
|
|
49
54
|
def __init__(self, hook_ctx: HookContext):
|
|
50
55
|
super().__init__(
|
|
56
|
+
hook_ctx.config,
|
|
51
57
|
hook_ctx.base_url,
|
|
52
58
|
hook_ctx.operation_id,
|
|
53
59
|
hook_ctx.oauth2_scopes,
|
|
@@ -57,7 +63,7 @@ class AfterErrorContext(HookContext):
|
|
|
57
63
|
|
|
58
64
|
class SDKInitHook(ABC):
|
|
59
65
|
@abstractmethod
|
|
60
|
-
def sdk_init(self,
|
|
66
|
+
def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
|
|
61
67
|
pass
|
|
62
68
|
|
|
63
69
|
|
lambdadb/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "lambdadb"
|
|
6
|
-
__version__: str = "0.1
|
|
7
|
-
__openapi_doc_version__: str = "1.
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.1
|
|
6
|
+
__version__: str = "0.2.1"
|
|
7
|
+
__openapi_doc_version__: str = "1.1.0"
|
|
8
|
+
__gen_version__: str = "2.628.0"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.2.1 2.628.0 1.1.0 lambdadb"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
lambdadb/basesdk.py
CHANGED
|
@@ -214,12 +214,12 @@ class BaseSDK:
|
|
|
214
214
|
client = self.sdk_configuration.client
|
|
215
215
|
logger = self.sdk_configuration.debug_logger
|
|
216
216
|
|
|
217
|
+
hooks = self.sdk_configuration.__dict__["_hooks"]
|
|
218
|
+
|
|
217
219
|
def do():
|
|
218
220
|
http_res = None
|
|
219
221
|
try:
|
|
220
|
-
req =
|
|
221
|
-
BeforeRequestContext(hook_ctx), request
|
|
222
|
-
)
|
|
222
|
+
req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
|
|
223
223
|
logger.debug(
|
|
224
224
|
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
|
225
225
|
req.method,
|
|
@@ -233,9 +233,7 @@ class BaseSDK:
|
|
|
233
233
|
|
|
234
234
|
http_res = client.send(req, stream=stream)
|
|
235
235
|
except Exception as e:
|
|
236
|
-
_, e =
|
|
237
|
-
AfterErrorContext(hook_ctx), None, e
|
|
238
|
-
)
|
|
236
|
+
_, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
|
|
239
237
|
if e is not None:
|
|
240
238
|
logger.debug("Request Exception", exc_info=True)
|
|
241
239
|
raise e
|
|
@@ -253,7 +251,7 @@ class BaseSDK:
|
|
|
253
251
|
)
|
|
254
252
|
|
|
255
253
|
if utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
256
|
-
result, err =
|
|
254
|
+
result, err = hooks.after_error(
|
|
257
255
|
AfterErrorContext(hook_ctx), http_res, None
|
|
258
256
|
)
|
|
259
257
|
if err is not None:
|
|
@@ -273,9 +271,7 @@ class BaseSDK:
|
|
|
273
271
|
http_res = do()
|
|
274
272
|
|
|
275
273
|
if not utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
276
|
-
http_res =
|
|
277
|
-
AfterSuccessContext(hook_ctx), http_res
|
|
278
|
-
)
|
|
274
|
+
http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
|
|
279
275
|
|
|
280
276
|
return http_res
|
|
281
277
|
|
|
@@ -290,12 +286,12 @@ class BaseSDK:
|
|
|
290
286
|
client = self.sdk_configuration.async_client
|
|
291
287
|
logger = self.sdk_configuration.debug_logger
|
|
292
288
|
|
|
289
|
+
hooks = self.sdk_configuration.__dict__["_hooks"]
|
|
290
|
+
|
|
293
291
|
async def do():
|
|
294
292
|
http_res = None
|
|
295
293
|
try:
|
|
296
|
-
req =
|
|
297
|
-
BeforeRequestContext(hook_ctx), request
|
|
298
|
-
)
|
|
294
|
+
req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
|
|
299
295
|
logger.debug(
|
|
300
296
|
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
|
301
297
|
req.method,
|
|
@@ -309,9 +305,7 @@ class BaseSDK:
|
|
|
309
305
|
|
|
310
306
|
http_res = await client.send(req, stream=stream)
|
|
311
307
|
except Exception as e:
|
|
312
|
-
_, e =
|
|
313
|
-
AfterErrorContext(hook_ctx), None, e
|
|
314
|
-
)
|
|
308
|
+
_, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
|
|
315
309
|
if e is not None:
|
|
316
310
|
logger.debug("Request Exception", exc_info=True)
|
|
317
311
|
raise e
|
|
@@ -329,7 +323,7 @@ class BaseSDK:
|
|
|
329
323
|
)
|
|
330
324
|
|
|
331
325
|
if utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
332
|
-
result, err =
|
|
326
|
+
result, err = hooks.after_error(
|
|
333
327
|
AfterErrorContext(hook_ctx), http_res, None
|
|
334
328
|
)
|
|
335
329
|
if err is not None:
|
|
@@ -351,8 +345,6 @@ class BaseSDK:
|
|
|
351
345
|
http_res = await do()
|
|
352
346
|
|
|
353
347
|
if not utils.match_status_codes(error_status_codes, http_res.status_code):
|
|
354
|
-
http_res =
|
|
355
|
-
AfterSuccessContext(hook_ctx), http_res
|
|
356
|
-
)
|
|
348
|
+
http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
|
|
357
349
|
|
|
358
350
|
return http_res
|
lambdadb/collections.py
CHANGED
|
@@ -82,6 +82,7 @@ class Collections(BaseSDK):
|
|
|
82
82
|
|
|
83
83
|
http_res = self.do_request(
|
|
84
84
|
hook_ctx=HookContext(
|
|
85
|
+
config=self.sdk_configuration,
|
|
85
86
|
base_url=base_url or "",
|
|
86
87
|
operation_id="listcollections",
|
|
87
88
|
oauth2_scopes=[],
|
|
@@ -198,6 +199,7 @@ class Collections(BaseSDK):
|
|
|
198
199
|
|
|
199
200
|
http_res = await self.do_request_async(
|
|
200
201
|
hook_ctx=HookContext(
|
|
202
|
+
config=self.sdk_configuration,
|
|
201
203
|
base_url=base_url or "",
|
|
202
204
|
operation_id="listcollections",
|
|
203
205
|
oauth2_scopes=[],
|
|
@@ -348,6 +350,7 @@ class Collections(BaseSDK):
|
|
|
348
350
|
|
|
349
351
|
http_res = self.do_request(
|
|
350
352
|
hook_ctx=HookContext(
|
|
353
|
+
config=self.sdk_configuration,
|
|
351
354
|
base_url=base_url or "",
|
|
352
355
|
operation_id="createCollection",
|
|
353
356
|
oauth2_scopes=[],
|
|
@@ -503,6 +506,7 @@ class Collections(BaseSDK):
|
|
|
503
506
|
|
|
504
507
|
http_res = await self.do_request_async(
|
|
505
508
|
hook_ctx=HookContext(
|
|
509
|
+
config=self.sdk_configuration,
|
|
506
510
|
base_url=base_url or "",
|
|
507
511
|
operation_id="createCollection",
|
|
508
512
|
oauth2_scopes=[],
|
|
@@ -627,6 +631,7 @@ class Collections(BaseSDK):
|
|
|
627
631
|
|
|
628
632
|
http_res = self.do_request(
|
|
629
633
|
hook_ctx=HookContext(
|
|
634
|
+
config=self.sdk_configuration,
|
|
630
635
|
base_url=base_url or "",
|
|
631
636
|
operation_id="deleteCollection",
|
|
632
637
|
oauth2_scopes=[],
|
|
@@ -746,6 +751,7 @@ class Collections(BaseSDK):
|
|
|
746
751
|
|
|
747
752
|
http_res = await self.do_request_async(
|
|
748
753
|
hook_ctx=HookContext(
|
|
754
|
+
config=self.sdk_configuration,
|
|
749
755
|
base_url=base_url or "",
|
|
750
756
|
operation_id="deleteCollection",
|
|
751
757
|
oauth2_scopes=[],
|
|
@@ -865,6 +871,7 @@ class Collections(BaseSDK):
|
|
|
865
871
|
|
|
866
872
|
http_res = self.do_request(
|
|
867
873
|
hook_ctx=HookContext(
|
|
874
|
+
config=self.sdk_configuration,
|
|
868
875
|
base_url=base_url or "",
|
|
869
876
|
operation_id="getCollection",
|
|
870
877
|
oauth2_scopes=[],
|
|
@@ -984,6 +991,7 @@ class Collections(BaseSDK):
|
|
|
984
991
|
|
|
985
992
|
http_res = await self.do_request_async(
|
|
986
993
|
hook_ctx=HookContext(
|
|
994
|
+
config=self.sdk_configuration,
|
|
987
995
|
base_url=base_url or "",
|
|
988
996
|
operation_id="getCollection",
|
|
989
997
|
oauth2_scopes=[],
|
|
@@ -1120,6 +1128,7 @@ class Collections(BaseSDK):
|
|
|
1120
1128
|
|
|
1121
1129
|
http_res = self.do_request(
|
|
1122
1130
|
hook_ctx=HookContext(
|
|
1131
|
+
config=self.sdk_configuration,
|
|
1123
1132
|
base_url=base_url or "",
|
|
1124
1133
|
operation_id="updateCollection",
|
|
1125
1134
|
oauth2_scopes=[],
|
|
@@ -1261,6 +1270,7 @@ class Collections(BaseSDK):
|
|
|
1261
1270
|
|
|
1262
1271
|
http_res = await self.do_request_async(
|
|
1263
1272
|
hook_ctx=HookContext(
|
|
1273
|
+
config=self.sdk_configuration,
|
|
1264
1274
|
base_url=base_url or "",
|
|
1265
1275
|
operation_id="updateCollection",
|
|
1266
1276
|
oauth2_scopes=[],
|
|
@@ -1332,7 +1342,6 @@ class Collections(BaseSDK):
|
|
|
1332
1342
|
include_vectors: Optional[bool] = False,
|
|
1333
1343
|
sort: Optional[Union[List[models.Sort], List[models.SortTypedDict]]] = None,
|
|
1334
1344
|
fields: Optional[List[str]] = None,
|
|
1335
|
-
track_scores: Optional[bool] = False,
|
|
1336
1345
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1337
1346
|
server_url: Optional[str] = None,
|
|
1338
1347
|
timeout_ms: Optional[int] = None,
|
|
@@ -1348,7 +1357,6 @@ class Collections(BaseSDK):
|
|
|
1348
1357
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1349
1358
|
:param sort: List of field name, sort direction pairs.
|
|
1350
1359
|
:param fields: List of field name to include in results
|
|
1351
|
-
:param track_scores: If your application needs to track scores with sorting, set trackScores to true.
|
|
1352
1360
|
:param retries: Override the default retry configuration for this method
|
|
1353
1361
|
:param server_url: Override the default server URL for this method
|
|
1354
1362
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1374,7 +1382,6 @@ class Collections(BaseSDK):
|
|
|
1374
1382
|
include_vectors=include_vectors,
|
|
1375
1383
|
sort=utils.get_pydantic_model(sort, Optional[List[models.Sort]]),
|
|
1376
1384
|
fields=fields,
|
|
1377
|
-
track_scores=track_scores,
|
|
1378
1385
|
),
|
|
1379
1386
|
)
|
|
1380
1387
|
|
|
@@ -1415,6 +1422,7 @@ class Collections(BaseSDK):
|
|
|
1415
1422
|
|
|
1416
1423
|
http_res = self.do_request(
|
|
1417
1424
|
hook_ctx=HookContext(
|
|
1425
|
+
config=self.sdk_configuration,
|
|
1418
1426
|
base_url=base_url or "",
|
|
1419
1427
|
operation_id="queryCollection",
|
|
1420
1428
|
oauth2_scopes=[],
|
|
@@ -1486,7 +1494,6 @@ class Collections(BaseSDK):
|
|
|
1486
1494
|
include_vectors: Optional[bool] = False,
|
|
1487
1495
|
sort: Optional[Union[List[models.Sort], List[models.SortTypedDict]]] = None,
|
|
1488
1496
|
fields: Optional[List[str]] = None,
|
|
1489
|
-
track_scores: Optional[bool] = False,
|
|
1490
1497
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1491
1498
|
server_url: Optional[str] = None,
|
|
1492
1499
|
timeout_ms: Optional[int] = None,
|
|
@@ -1502,7 +1509,6 @@ class Collections(BaseSDK):
|
|
|
1502
1509
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1503
1510
|
:param sort: List of field name, sort direction pairs.
|
|
1504
1511
|
:param fields: List of field name to include in results
|
|
1505
|
-
:param track_scores: If your application needs to track scores with sorting, set trackScores to true.
|
|
1506
1512
|
:param retries: Override the default retry configuration for this method
|
|
1507
1513
|
:param server_url: Override the default server URL for this method
|
|
1508
1514
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1528,7 +1534,6 @@ class Collections(BaseSDK):
|
|
|
1528
1534
|
include_vectors=include_vectors,
|
|
1529
1535
|
sort=utils.get_pydantic_model(sort, Optional[List[models.Sort]]),
|
|
1530
1536
|
fields=fields,
|
|
1531
|
-
track_scores=track_scores,
|
|
1532
1537
|
),
|
|
1533
1538
|
)
|
|
1534
1539
|
|
|
@@ -1569,6 +1574,7 @@ class Collections(BaseSDK):
|
|
|
1569
1574
|
|
|
1570
1575
|
http_res = await self.do_request_async(
|
|
1571
1576
|
hook_ctx=HookContext(
|
|
1577
|
+
config=self.sdk_configuration,
|
|
1572
1578
|
base_url=base_url or "",
|
|
1573
1579
|
operation_id="queryCollection",
|
|
1574
1580
|
oauth2_scopes=[],
|
lambdadb/docs.py
CHANGED
|
@@ -81,6 +81,7 @@ class Docs(BaseSDK):
|
|
|
81
81
|
|
|
82
82
|
http_res = self.do_request(
|
|
83
83
|
hook_ctx=HookContext(
|
|
84
|
+
config=self.sdk_configuration,
|
|
84
85
|
base_url=base_url or "",
|
|
85
86
|
operation_id="upsertDocs",
|
|
86
87
|
oauth2_scopes=[],
|
|
@@ -213,6 +214,7 @@ class Docs(BaseSDK):
|
|
|
213
214
|
|
|
214
215
|
http_res = await self.do_request_async(
|
|
215
216
|
hook_ctx=HookContext(
|
|
217
|
+
config=self.sdk_configuration,
|
|
216
218
|
base_url=base_url or "",
|
|
217
219
|
operation_id="upsertDocs",
|
|
218
220
|
oauth2_scopes=[],
|
|
@@ -337,6 +339,7 @@ class Docs(BaseSDK):
|
|
|
337
339
|
|
|
338
340
|
http_res = self.do_request(
|
|
339
341
|
hook_ctx=HookContext(
|
|
342
|
+
config=self.sdk_configuration,
|
|
340
343
|
base_url=base_url or "",
|
|
341
344
|
operation_id="getBulkUpsertDocs",
|
|
342
345
|
oauth2_scopes=[],
|
|
@@ -456,6 +459,7 @@ class Docs(BaseSDK):
|
|
|
456
459
|
|
|
457
460
|
http_res = await self.do_request_async(
|
|
458
461
|
hook_ctx=HookContext(
|
|
462
|
+
config=self.sdk_configuration,
|
|
459
463
|
base_url=base_url or "",
|
|
460
464
|
operation_id="getBulkUpsertDocs",
|
|
461
465
|
oauth2_scopes=[],
|
|
@@ -587,6 +591,7 @@ class Docs(BaseSDK):
|
|
|
587
591
|
|
|
588
592
|
http_res = self.do_request(
|
|
589
593
|
hook_ctx=HookContext(
|
|
594
|
+
config=self.sdk_configuration,
|
|
590
595
|
base_url=base_url or "",
|
|
591
596
|
operation_id="bulkUpsertDocs",
|
|
592
597
|
oauth2_scopes=[],
|
|
@@ -723,6 +728,7 @@ class Docs(BaseSDK):
|
|
|
723
728
|
|
|
724
729
|
http_res = await self.do_request_async(
|
|
725
730
|
hook_ctx=HookContext(
|
|
731
|
+
config=self.sdk_configuration,
|
|
726
732
|
base_url=base_url or "",
|
|
727
733
|
operation_id="bulkUpsertDocs",
|
|
728
734
|
oauth2_scopes=[],
|
|
@@ -857,6 +863,7 @@ class Docs(BaseSDK):
|
|
|
857
863
|
|
|
858
864
|
http_res = self.do_request(
|
|
859
865
|
hook_ctx=HookContext(
|
|
866
|
+
config=self.sdk_configuration,
|
|
860
867
|
base_url=base_url or "",
|
|
861
868
|
operation_id="deleteDocs",
|
|
862
869
|
oauth2_scopes=[],
|
|
@@ -991,6 +998,7 @@ class Docs(BaseSDK):
|
|
|
991
998
|
|
|
992
999
|
http_res = await self.do_request_async(
|
|
993
1000
|
hook_ctx=HookContext(
|
|
1001
|
+
config=self.sdk_configuration,
|
|
994
1002
|
base_url=base_url or "",
|
|
995
1003
|
operation_id="deleteDocs",
|
|
996
1004
|
oauth2_scopes=[],
|
|
@@ -1129,6 +1137,7 @@ class Docs(BaseSDK):
|
|
|
1129
1137
|
|
|
1130
1138
|
http_res = self.do_request(
|
|
1131
1139
|
hook_ctx=HookContext(
|
|
1140
|
+
config=self.sdk_configuration,
|
|
1132
1141
|
base_url=base_url or "",
|
|
1133
1142
|
operation_id="fetchDocs",
|
|
1134
1143
|
oauth2_scopes=[],
|
|
@@ -1267,6 +1276,7 @@ class Docs(BaseSDK):
|
|
|
1267
1276
|
|
|
1268
1277
|
http_res = await self.do_request_async(
|
|
1269
1278
|
hook_ctx=HookContext(
|
|
1279
|
+
config=self.sdk_configuration,
|
|
1270
1280
|
base_url=base_url or "",
|
|
1271
1281
|
operation_id="fetchDocs",
|
|
1272
1282
|
oauth2_scopes=[],
|
lambdadb/models/__init__.py
CHANGED
|
@@ -19,12 +19,6 @@ if TYPE_CHECKING:
|
|
|
19
19
|
CreateCollectionRequestBodyTypedDict,
|
|
20
20
|
CreateCollectionRequestTypedDict,
|
|
21
21
|
)
|
|
22
|
-
from .createprojectop import (
|
|
23
|
-
CreateProjectRequest,
|
|
24
|
-
CreateProjectRequestTypedDict,
|
|
25
|
-
CreateProjectSecurity,
|
|
26
|
-
CreateProjectSecurityTypedDict,
|
|
27
|
-
)
|
|
28
22
|
from .deletecollectionop import (
|
|
29
23
|
DeleteCollectionRequest,
|
|
30
24
|
DeleteCollectionRequestTypedDict,
|
|
@@ -45,14 +39,6 @@ if TYPE_CHECKING:
|
|
|
45
39
|
RequestBody2,
|
|
46
40
|
RequestBody2TypedDict,
|
|
47
41
|
)
|
|
48
|
-
from .deleteprojectop import (
|
|
49
|
-
DeleteProjectRequest,
|
|
50
|
-
DeleteProjectRequestTypedDict,
|
|
51
|
-
DeleteProjectResponse,
|
|
52
|
-
DeleteProjectResponseTypedDict,
|
|
53
|
-
DeleteProjectSecurity,
|
|
54
|
-
DeleteProjectSecurityTypedDict,
|
|
55
|
-
)
|
|
56
42
|
from .fetchdocsop import (
|
|
57
43
|
FetchDocsDoc,
|
|
58
44
|
FetchDocsDocDoc,
|
|
@@ -74,12 +60,6 @@ if TYPE_CHECKING:
|
|
|
74
60
|
HTTPMethod,
|
|
75
61
|
)
|
|
76
62
|
from .getcollectionop import GetCollectionRequest, GetCollectionRequestTypedDict
|
|
77
|
-
from .getprojectop import (
|
|
78
|
-
GetProjectRequest,
|
|
79
|
-
GetProjectRequestTypedDict,
|
|
80
|
-
GetProjectSecurity,
|
|
81
|
-
GetProjectSecurityTypedDict,
|
|
82
|
-
)
|
|
83
63
|
from .indexconfigs_union import (
|
|
84
64
|
Analyzer,
|
|
85
65
|
IndexConfigs,
|
|
@@ -101,13 +81,6 @@ if TYPE_CHECKING:
|
|
|
101
81
|
ListcollectionsResponse,
|
|
102
82
|
ListcollectionsResponseTypedDict,
|
|
103
83
|
)
|
|
104
|
-
from .listprojectsop import (
|
|
105
|
-
ListProjectsResponse,
|
|
106
|
-
ListProjectsResponseTypedDict,
|
|
107
|
-
ListProjectsSecurity,
|
|
108
|
-
ListProjectsSecurityTypedDict,
|
|
109
|
-
)
|
|
110
|
-
from .projectresponse import ProjectResponse, ProjectResponseTypedDict
|
|
111
84
|
from .querycollectionop import (
|
|
112
85
|
Query,
|
|
113
86
|
QueryCollectionDoc,
|
|
@@ -132,14 +105,6 @@ if TYPE_CHECKING:
|
|
|
132
105
|
UpdateCollectionRequestBodyTypedDict,
|
|
133
106
|
UpdateCollectionRequestTypedDict,
|
|
134
107
|
)
|
|
135
|
-
from .updateprojectop import (
|
|
136
|
-
UpdateProjectRequest,
|
|
137
|
-
UpdateProjectRequestBody,
|
|
138
|
-
UpdateProjectRequestBodyTypedDict,
|
|
139
|
-
UpdateProjectRequestTypedDict,
|
|
140
|
-
UpdateProjectSecurity,
|
|
141
|
-
UpdateProjectSecurityTypedDict,
|
|
142
|
-
)
|
|
143
108
|
from .upsertdocsop import (
|
|
144
109
|
UpsertDocsDoc,
|
|
145
110
|
UpsertDocsDocTypedDict,
|
|
@@ -165,10 +130,6 @@ __all__ = [
|
|
|
165
130
|
"CreateCollectionRequestBody",
|
|
166
131
|
"CreateCollectionRequestBodyTypedDict",
|
|
167
132
|
"CreateCollectionRequestTypedDict",
|
|
168
|
-
"CreateProjectRequest",
|
|
169
|
-
"CreateProjectRequestTypedDict",
|
|
170
|
-
"CreateProjectSecurity",
|
|
171
|
-
"CreateProjectSecurityTypedDict",
|
|
172
133
|
"DeleteCollectionRequest",
|
|
173
134
|
"DeleteCollectionRequestTypedDict",
|
|
174
135
|
"DeleteCollectionResponse",
|
|
@@ -179,12 +140,6 @@ __all__ = [
|
|
|
179
140
|
"DeleteDocsRequestTypedDict",
|
|
180
141
|
"DeleteDocsResponse",
|
|
181
142
|
"DeleteDocsResponseTypedDict",
|
|
182
|
-
"DeleteProjectRequest",
|
|
183
|
-
"DeleteProjectRequestTypedDict",
|
|
184
|
-
"DeleteProjectResponse",
|
|
185
|
-
"DeleteProjectResponseTypedDict",
|
|
186
|
-
"DeleteProjectSecurity",
|
|
187
|
-
"DeleteProjectSecurityTypedDict",
|
|
188
143
|
"FetchDocsDoc",
|
|
189
144
|
"FetchDocsDocDoc",
|
|
190
145
|
"FetchDocsDocDocTypedDict",
|
|
@@ -204,10 +159,6 @@ __all__ = [
|
|
|
204
159
|
"GetBulkUpsertDocsType",
|
|
205
160
|
"GetCollectionRequest",
|
|
206
161
|
"GetCollectionRequestTypedDict",
|
|
207
|
-
"GetProjectRequest",
|
|
208
|
-
"GetProjectRequestTypedDict",
|
|
209
|
-
"GetProjectSecurity",
|
|
210
|
-
"GetProjectSecurityTypedDict",
|
|
211
162
|
"HTTPMethod",
|
|
212
163
|
"IndexConfigs",
|
|
213
164
|
"IndexConfigsText",
|
|
@@ -217,16 +168,10 @@ __all__ = [
|
|
|
217
168
|
"IndexConfigsUnionTypedDict",
|
|
218
169
|
"IndexConfigsVector",
|
|
219
170
|
"IndexConfigsVectorTypedDict",
|
|
220
|
-
"ListProjectsResponse",
|
|
221
|
-
"ListProjectsResponseTypedDict",
|
|
222
|
-
"ListProjectsSecurity",
|
|
223
|
-
"ListProjectsSecurityTypedDict",
|
|
224
171
|
"ListcollectionsRequest",
|
|
225
172
|
"ListcollectionsRequestTypedDict",
|
|
226
173
|
"ListcollectionsResponse",
|
|
227
174
|
"ListcollectionsResponseTypedDict",
|
|
228
|
-
"ProjectResponse",
|
|
229
|
-
"ProjectResponseTypedDict",
|
|
230
175
|
"Query",
|
|
231
176
|
"QueryCollectionDoc",
|
|
232
177
|
"QueryCollectionDocDoc",
|
|
@@ -256,12 +201,6 @@ __all__ = [
|
|
|
256
201
|
"UpdateCollectionRequestBody",
|
|
257
202
|
"UpdateCollectionRequestBodyTypedDict",
|
|
258
203
|
"UpdateCollectionRequestTypedDict",
|
|
259
|
-
"UpdateProjectRequest",
|
|
260
|
-
"UpdateProjectRequestBody",
|
|
261
|
-
"UpdateProjectRequestBodyTypedDict",
|
|
262
|
-
"UpdateProjectRequestTypedDict",
|
|
263
|
-
"UpdateProjectSecurity",
|
|
264
|
-
"UpdateProjectSecurityTypedDict",
|
|
265
204
|
"UpsertDocsDoc",
|
|
266
205
|
"UpsertDocsDocTypedDict",
|
|
267
206
|
"UpsertDocsRequest",
|
|
@@ -285,10 +224,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
285
224
|
"CreateCollectionRequestBody": ".createcollectionop",
|
|
286
225
|
"CreateCollectionRequestBodyTypedDict": ".createcollectionop",
|
|
287
226
|
"CreateCollectionRequestTypedDict": ".createcollectionop",
|
|
288
|
-
"CreateProjectRequest": ".createprojectop",
|
|
289
|
-
"CreateProjectRequestTypedDict": ".createprojectop",
|
|
290
|
-
"CreateProjectSecurity": ".createprojectop",
|
|
291
|
-
"CreateProjectSecurityTypedDict": ".createprojectop",
|
|
292
227
|
"DeleteCollectionRequest": ".deletecollectionop",
|
|
293
228
|
"DeleteCollectionRequestTypedDict": ".deletecollectionop",
|
|
294
229
|
"DeleteCollectionResponse": ".deletecollectionop",
|
|
@@ -305,12 +240,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
305
240
|
"RequestBody1TypedDict": ".deletedocsop",
|
|
306
241
|
"RequestBody2": ".deletedocsop",
|
|
307
242
|
"RequestBody2TypedDict": ".deletedocsop",
|
|
308
|
-
"DeleteProjectRequest": ".deleteprojectop",
|
|
309
|
-
"DeleteProjectRequestTypedDict": ".deleteprojectop",
|
|
310
|
-
"DeleteProjectResponse": ".deleteprojectop",
|
|
311
|
-
"DeleteProjectResponseTypedDict": ".deleteprojectop",
|
|
312
|
-
"DeleteProjectSecurity": ".deleteprojectop",
|
|
313
|
-
"DeleteProjectSecurityTypedDict": ".deleteprojectop",
|
|
314
243
|
"FetchDocsDoc": ".fetchdocsop",
|
|
315
244
|
"FetchDocsDocDoc": ".fetchdocsop",
|
|
316
245
|
"FetchDocsDocDocTypedDict": ".fetchdocsop",
|
|
@@ -329,10 +258,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
329
258
|
"HTTPMethod": ".getbulkupsertdocsop",
|
|
330
259
|
"GetCollectionRequest": ".getcollectionop",
|
|
331
260
|
"GetCollectionRequestTypedDict": ".getcollectionop",
|
|
332
|
-
"GetProjectRequest": ".getprojectop",
|
|
333
|
-
"GetProjectRequestTypedDict": ".getprojectop",
|
|
334
|
-
"GetProjectSecurity": ".getprojectop",
|
|
335
|
-
"GetProjectSecurityTypedDict": ".getprojectop",
|
|
336
261
|
"Analyzer": ".indexconfigs_union",
|
|
337
262
|
"IndexConfigs": ".indexconfigs_union",
|
|
338
263
|
"IndexConfigsText": ".indexconfigs_union",
|
|
@@ -350,12 +275,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
350
275
|
"ListcollectionsRequestTypedDict": ".listcollectionsop",
|
|
351
276
|
"ListcollectionsResponse": ".listcollectionsop",
|
|
352
277
|
"ListcollectionsResponseTypedDict": ".listcollectionsop",
|
|
353
|
-
"ListProjectsResponse": ".listprojectsop",
|
|
354
|
-
"ListProjectsResponseTypedDict": ".listprojectsop",
|
|
355
|
-
"ListProjectsSecurity": ".listprojectsop",
|
|
356
|
-
"ListProjectsSecurityTypedDict": ".listprojectsop",
|
|
357
|
-
"ProjectResponse": ".projectresponse",
|
|
358
|
-
"ProjectResponseTypedDict": ".projectresponse",
|
|
359
278
|
"Query": ".querycollectionop",
|
|
360
279
|
"QueryCollectionDoc": ".querycollectionop",
|
|
361
280
|
"QueryCollectionDocDoc": ".querycollectionop",
|
|
@@ -377,12 +296,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
377
296
|
"UpdateCollectionRequestBody": ".updatecollectionop",
|
|
378
297
|
"UpdateCollectionRequestBodyTypedDict": ".updatecollectionop",
|
|
379
298
|
"UpdateCollectionRequestTypedDict": ".updatecollectionop",
|
|
380
|
-
"UpdateProjectRequest": ".updateprojectop",
|
|
381
|
-
"UpdateProjectRequestBody": ".updateprojectop",
|
|
382
|
-
"UpdateProjectRequestBodyTypedDict": ".updateprojectop",
|
|
383
|
-
"UpdateProjectRequestTypedDict": ".updateprojectop",
|
|
384
|
-
"UpdateProjectSecurity": ".updateprojectop",
|
|
385
|
-
"UpdateProjectSecurityTypedDict": ".updateprojectop",
|
|
386
299
|
"UpsertDocsDoc": ".upsertdocsop",
|
|
387
300
|
"UpsertDocsDocTypedDict": ".upsertdocsop",
|
|
388
301
|
"UpsertDocsRequest": ".upsertdocsop",
|
|
@@ -37,8 +37,6 @@ class QueryCollectionRequestBodyTypedDict(TypedDict):
|
|
|
37
37
|
r"""List of field name, sort direction pairs."""
|
|
38
38
|
fields: NotRequired[List[str]]
|
|
39
39
|
r"""List of field name to include in results"""
|
|
40
|
-
track_scores: NotRequired[bool]
|
|
41
|
-
r"""If your application needs to track scores with sorting, set trackScores to true."""
|
|
42
40
|
|
|
43
41
|
|
|
44
42
|
class QueryCollectionRequestBody(BaseModel):
|
|
@@ -64,9 +62,6 @@ class QueryCollectionRequestBody(BaseModel):
|
|
|
64
62
|
fields: Optional[List[str]] = None
|
|
65
63
|
r"""List of field name to include in results"""
|
|
66
64
|
|
|
67
|
-
track_scores: Annotated[Optional[bool], pydantic.Field(alias="trackScores")] = False
|
|
68
|
-
r"""If your application needs to track scores with sorting, set trackScores to true."""
|
|
69
|
-
|
|
70
65
|
|
|
71
66
|
class QueryCollectionRequestTypedDict(TypedDict):
|
|
72
67
|
project_name: str
|