lambdadb 0.2.0__py3-none-any.whl → 0.2.2__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.

@@ -2,3 +2,4 @@
2
2
 
3
3
  from .sdkhooks import *
4
4
  from .types import *
5
+ from .registration import *
@@ -11,6 +11,7 @@ from .types import (
11
11
  AfterErrorHook,
12
12
  Hooks,
13
13
  )
14
+ from .registration import init_hooks
14
15
  from typing import List, Optional, Tuple
15
16
  from lambdadb.sdkconfiguration import SDKConfiguration
16
17
 
@@ -21,6 +22,7 @@ class SDKHooks(Hooks):
21
22
  self.before_request_hooks: List[BeforeRequestHook] = []
22
23
  self.after_success_hooks: List[AfterSuccessHook] = []
23
24
  self.after_error_hooks: List[AfterErrorHook] = []
25
+ init_hooks(self)
24
26
 
25
27
  def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
26
28
  self.sdk_init_hooks.append(hook)
lambdadb/_version.py CHANGED
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "lambdadb"
6
- __version__: str = "0.2.0"
6
+ __version__: str = "0.2.2"
7
7
  __openapi_doc_version__: str = "1.1.0"
8
- __gen_version__: str = "2.628.0"
9
- __user_agent__: str = "speakeasy-sdk/python 0.2.0 2.628.0 1.1.0 lambdadb"
8
+ __gen_version__: str = "2.632.2"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.2.2 2.632.2 1.1.0 lambdadb"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
lambdadb/collections.py CHANGED
@@ -1342,7 +1342,6 @@ class Collections(BaseSDK):
1342
1342
  include_vectors: Optional[bool] = False,
1343
1343
  sort: Optional[Union[List[models.Sort], List[models.SortTypedDict]]] = None,
1344
1344
  fields: Optional[List[str]] = None,
1345
- track_scores: Optional[bool] = False,
1346
1345
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1347
1346
  server_url: Optional[str] = None,
1348
1347
  timeout_ms: Optional[int] = None,
@@ -1358,7 +1357,6 @@ class Collections(BaseSDK):
1358
1357
  :param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
1359
1358
  :param sort: List of field name, sort direction pairs.
1360
1359
  :param fields: List of field name to include in results
1361
- :param track_scores: If your application needs to track scores with sorting, set trackScores to true.
1362
1360
  :param retries: Override the default retry configuration for this method
1363
1361
  :param server_url: Override the default server URL for this method
1364
1362
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1384,7 +1382,6 @@ class Collections(BaseSDK):
1384
1382
  include_vectors=include_vectors,
1385
1383
  sort=utils.get_pydantic_model(sort, Optional[List[models.Sort]]),
1386
1384
  fields=fields,
1387
- track_scores=track_scores,
1388
1385
  ),
1389
1386
  )
1390
1387
 
@@ -1497,7 +1494,6 @@ class Collections(BaseSDK):
1497
1494
  include_vectors: Optional[bool] = False,
1498
1495
  sort: Optional[Union[List[models.Sort], List[models.SortTypedDict]]] = None,
1499
1496
  fields: Optional[List[str]] = None,
1500
- track_scores: Optional[bool] = False,
1501
1497
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1502
1498
  server_url: Optional[str] = None,
1503
1499
  timeout_ms: Optional[int] = None,
@@ -1513,7 +1509,6 @@ class Collections(BaseSDK):
1513
1509
  :param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
1514
1510
  :param sort: List of field name, sort direction pairs.
1515
1511
  :param fields: List of field name to include in results
1516
- :param track_scores: If your application needs to track scores with sorting, set trackScores to true.
1517
1512
  :param retries: Override the default retry configuration for this method
1518
1513
  :param server_url: Override the default server URL for this method
1519
1514
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1539,7 +1534,6 @@ class Collections(BaseSDK):
1539
1534
  include_vectors=include_vectors,
1540
1535
  sort=utils.get_pydantic_model(sort, Optional[List[models.Sort]]),
1541
1536
  fields=fields,
1542
- track_scores=track_scores,
1543
1537
  ),
1544
1538
  )
1545
1539
 
@@ -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
lambdadb/sdk.py CHANGED
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
17
17
  from lambdadb.projects import Projects
18
18
 
19
19
 
20
- class Lambdadb(BaseSDK):
20
+ class LambdaDB(BaseSDK):
21
21
  r"""LambdaDB API: LambdaDB Open API Spec"""
22
22
 
23
23
  projects: "Projects"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lambdadb
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -98,9 +98,9 @@ It's also possible to write a standalone Python script without needing to set up
98
98
  # ]
99
99
  # ///
100
100
 
101
- from lambdadb import Lambdadb
101
+ from lambdadb import LambdaDB
102
102
 
103
- sdk = Lambdadb(
103
+ sdk = LambdaDB(
104
104
  # SDK arguments
105
105
  )
106
106
 
@@ -128,14 +128,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
128
128
 
129
129
  ```python
130
130
  # Synchronous Example
131
- from lambdadb import Lambdadb
131
+ from lambdadb import LambdaDB
132
132
 
133
133
 
134
- with Lambdadb(
134
+ with LambdaDB(
135
135
  project_api_key="<YOUR_PROJECT_API_KEY>",
136
- ) as l_client:
136
+ ) as lambda_db:
137
137
 
138
- res = l_client.projects.collections.list(project_name="<value>")
138
+ res = lambda_db.projects.collections.list(project_name="<value>")
139
139
 
140
140
  # Handle response
141
141
  print(res)
@@ -147,15 +147,15 @@ The same SDK client can also be used to make asychronous requests by importing a
147
147
  ```python
148
148
  # Asynchronous Example
149
149
  import asyncio
150
- from lambdadb import Lambdadb
150
+ from lambdadb import LambdaDB
151
151
 
152
152
  async def main():
153
153
 
154
- async with Lambdadb(
154
+ async with LambdaDB(
155
155
  project_api_key="<YOUR_PROJECT_API_KEY>",
156
- ) as l_client:
156
+ ) as lambda_db:
157
157
 
158
- res = await l_client.projects.collections.list_async(project_name="<value>")
158
+ res = await lambda_db.projects.collections.list_async(project_name="<value>")
159
159
 
160
160
  # Handle response
161
161
  print(res)
@@ -177,14 +177,14 @@ This SDK supports the following security scheme globally:
177
177
 
178
178
  To authenticate with the API the `project_api_key` parameter must be set when initializing the SDK client instance. For example:
179
179
  ```python
180
- from lambdadb import Lambdadb
180
+ from lambdadb import LambdaDB
181
181
 
182
182
 
183
- with Lambdadb(
183
+ with LambdaDB(
184
184
  project_api_key="<YOUR_PROJECT_API_KEY>",
185
- ) as l_client:
185
+ ) as lambda_db:
186
186
 
187
- res = l_client.projects.collections.list(project_name="<value>")
187
+ res = lambda_db.projects.collections.list(project_name="<value>")
188
188
 
189
189
  # Handle response
190
190
  print(res)
@@ -229,15 +229,15 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
229
229
 
230
230
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
231
231
  ```python
232
- from lambdadb import Lambdadb
232
+ from lambdadb import LambdaDB
233
233
  from lambdadb.utils import BackoffStrategy, RetryConfig
234
234
 
235
235
 
236
- with Lambdadb(
236
+ with LambdaDB(
237
237
  project_api_key="<YOUR_PROJECT_API_KEY>",
238
- ) as l_client:
238
+ ) as lambda_db:
239
239
 
240
- res = l_client.projects.collections.list(project_name="<value>",
240
+ res = lambda_db.projects.collections.list(project_name="<value>",
241
241
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
242
242
 
243
243
  # Handle response
@@ -247,16 +247,16 @@ with Lambdadb(
247
247
 
248
248
  If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
249
249
  ```python
250
- from lambdadb import Lambdadb
250
+ from lambdadb import LambdaDB
251
251
  from lambdadb.utils import BackoffStrategy, RetryConfig
252
252
 
253
253
 
254
- with Lambdadb(
254
+ with LambdaDB(
255
255
  retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
256
256
  project_api_key="<YOUR_PROJECT_API_KEY>",
257
- ) as l_client:
257
+ ) as lambda_db:
258
258
 
259
- res = l_client.projects.collections.list(project_name="<value>")
259
+ res = lambda_db.projects.collections.list(project_name="<value>")
260
260
 
261
261
  # Handle response
262
262
  print(res)
@@ -291,16 +291,16 @@ When custom error responses are specified for an operation, the SDK may also rai
291
291
  ### Example
292
292
 
293
293
  ```python
294
- from lambdadb import Lambdadb, errors
294
+ from lambdadb import LambdaDB, errors
295
295
 
296
296
 
297
- with Lambdadb(
297
+ with LambdaDB(
298
298
  project_api_key="<YOUR_PROJECT_API_KEY>",
299
- ) as l_client:
299
+ ) as lambda_db:
300
300
  res = None
301
301
  try:
302
302
 
303
- res = l_client.projects.collections.list(project_name="<value>")
303
+ res = lambda_db.projects.collections.list(project_name="<value>")
304
304
 
305
305
  # Handle response
306
306
  print(res)
@@ -330,15 +330,15 @@ with Lambdadb(
330
330
 
331
331
  The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
332
332
  ```python
333
- from lambdadb import Lambdadb
333
+ from lambdadb import LambdaDB
334
334
 
335
335
 
336
- with Lambdadb(
336
+ with LambdaDB(
337
337
  server_url="https://{baseUrl}",
338
338
  project_api_key="<YOUR_PROJECT_API_KEY>",
339
- ) as l_client:
339
+ ) as lambda_db:
340
340
 
341
- res = l_client.projects.collections.list(project_name="<value>")
341
+ res = lambda_db.projects.collections.list(project_name="<value>")
342
342
 
343
343
  # Handle response
344
344
  print(res)
@@ -355,16 +355,16 @@ This allows you to wrap the client with your own custom logic, such as adding cu
355
355
 
356
356
  For example, you could specify a header for every request that this sdk makes as follows:
357
357
  ```python
358
- from lambdadb import Lambdadb
358
+ from lambdadb import LambdaDB
359
359
  import httpx
360
360
 
361
361
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
362
- s = Lambdadb(client=http_client)
362
+ s = LambdaDB(client=http_client)
363
363
  ```
364
364
 
365
365
  or you could wrap the client with your own custom logic:
366
366
  ```python
367
- from lambdadb import Lambdadb
367
+ from lambdadb import LambdaDB
368
368
  from lambdadb.httpclient import AsyncHttpClient
369
369
  import httpx
370
370
 
@@ -423,33 +423,33 @@ class CustomClient(AsyncHttpClient):
423
423
  extensions=extensions,
424
424
  )
425
425
 
426
- s = Lambdadb(async_client=CustomClient(httpx.AsyncClient()))
426
+ s = LambdaDB(async_client=CustomClient(httpx.AsyncClient()))
427
427
  ```
428
428
  <!-- End Custom HTTP Client [http-client] -->
429
429
 
430
430
  <!-- Start Resource Management [resource-management] -->
431
431
  ## Resource Management
432
432
 
433
- The `Lambdadb` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
433
+ The `LambdaDB` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
434
434
 
435
435
  [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
436
436
 
437
437
  ```python
438
- from lambdadb import Lambdadb
438
+ from lambdadb import LambdaDB
439
439
  def main():
440
440
 
441
- with Lambdadb(
441
+ with LambdaDB(
442
442
  project_api_key="<YOUR_PROJECT_API_KEY>",
443
- ) as l_client:
443
+ ) as lambda_db:
444
444
  # Rest of application here...
445
445
 
446
446
 
447
447
  # Or when using async:
448
448
  async def amain():
449
449
 
450
- async with Lambdadb(
450
+ async with LambdaDB(
451
451
  project_api_key="<YOUR_PROJECT_API_KEY>",
452
- ) as l_client:
452
+ ) as lambda_db:
453
453
  # Rest of application here...
454
454
  ```
455
455
  <!-- End Resource Management [resource-management] -->
@@ -461,11 +461,11 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
461
461
 
462
462
  You can pass your own logger class directly into your SDK.
463
463
  ```python
464
- from lambdadb import Lambdadb
464
+ from lambdadb import LambdaDB
465
465
  import logging
466
466
 
467
467
  logging.basicConfig(level=logging.DEBUG)
468
- s = Lambdadb(debug_logger=logging.getLogger("lambdadb"))
468
+ s = LambdaDB(debug_logger=logging.getLogger("lambdadb"))
469
469
  ```
470
470
 
471
471
  You can also enable a default debug logger by setting an environment variable `LAMBDADB_DEBUG` to true.
@@ -1,11 +1,11 @@
1
1
  lambdadb/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
2
- lambdadb/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
2
+ lambdadb/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
3
3
  lambdadb/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
4
- lambdadb/_hooks/sdkhooks.py,sha256=KGhPvIuUjurDBQOT6t-aWgiu1YDRXpn-OMz6_PkUdFk,2463
4
+ lambdadb/_hooks/sdkhooks.py,sha256=mQSdQD3xgGGt-Cq94M1Lb1DSONJG4hNowN_rX_0Xask,2525
5
5
  lambdadb/_hooks/types.py,sha256=09dUW5q4HN9aVFAhskDLQqjxLPBfDD97uuucmdcBa6Q,2987
6
- lambdadb/_version.py,sha256=9hZg4PkIlz2tuq8jxeXakBDfOC8LtKIEXV6_U2th84c,458
6
+ lambdadb/_version.py,sha256=5EaaD8p26qJZ3-fFR_6qylyJC7P04GrXmCYl6sv8sjA,458
7
7
  lambdadb/basesdk.py,sha256=Uo8ZEdXVHmS_j1F9on47XeJD6sj9plIrna_6Oo_1I-I,11853
8
- lambdadb/collections.py,sha256=c3YcLTKm9kkNo9ZSJolYvEJHViqt7nM1RZ3x4fc6e4I,69413
8
+ lambdadb/collections.py,sha256=ridtbk8Ft0O1lIcpX7-_-5zDV8B0bOcttoxlv5eMeZ0,69015
9
9
  lambdadb/docs.py,sha256=jtrogN__GPuavf2bySAjklPLvtm0JMDezkY2qSlc83k,57368
10
10
  lambdadb/errors/__init__.py,sha256=V406LU9TLJQ0eocD79_PpsCjOmH6DAUnBTKd0Ra23uQ,2637
11
11
  lambdadb/errors/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
@@ -27,14 +27,14 @@ lambdadb/models/getbulkupsertdocsop.py,sha256=oUkcvIkrM_wIxrCoB_X-jBL9QqA_qpo7ol
27
27
  lambdadb/models/getcollectionop.py,sha256=9X_4fW9sYfXVe_gPqCbnKBEr0z7ss_wNrhRdSXhNSRU,865
28
28
  lambdadb/models/indexconfigs_union.py,sha256=fAq_wlTU1p_mdbq_ZuCFIb_DldfvL__Tphc36ocUl0w,2020
29
29
  lambdadb/models/listcollectionsop.py,sha256=Q7OM34dUCRQhft3vg4FLlnRIXWhUAhxG4rX_nIrL9_8,1081
30
- lambdadb/models/querycollectionop.py,sha256=ZS-tHGqw6gRDstMEHg7NuWdmuMInLwRIvKnrbKgMGU8,4797
30
+ lambdadb/models/querycollectionop.py,sha256=lFvTMo8twoEE7DflLuBItGpYllTNxSjfeSm6tfCP0rc,4487
31
31
  lambdadb/models/security.py,sha256=nP-VTWFY6O-UPNPsWcsg38JcXr2zSy_m7qieDix6SxA,698
32
32
  lambdadb/models/status.py,sha256=pl66KcDT9ao6yLXXXOBqerh_StjpNiJb34Yf7VoijEI,250
33
33
  lambdadb/models/updatecollectionop.py,sha256=AH-xDQYtywu6rn5clKKXIuamXk3iYdwSfN5kCi5Ygtk,1470
34
34
  lambdadb/models/upsertdocsop.py,sha256=6oMppMfQtgyVoUrNZ6S_qWFMZmkmPBqQumGWzN78nNk,1684
35
35
  lambdadb/projects.py,sha256=C3NlfWplO4rsiejfCOzdSghCI3HqayA-H6gfsEeab3c,516
36
36
  lambdadb/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
37
- lambdadb/sdk.py,sha256=IxNrSAABHB12ncsSOFVweuSOSwHECQQwhq1CK4G-5Iw,6076
37
+ lambdadb/sdk.py,sha256=7_6aZ5thoMJJbtQDI8h1-kgVl7qRzJsxF4FjFi311RA,6076
38
38
  lambdadb/sdkconfiguration.py,sha256=-sHtaoBluBcNOYRTKxLMnovJazRm3ZWV9VOYCSS0UNY,1589
39
39
  lambdadb/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
40
40
  lambdadb/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
@@ -54,7 +54,7 @@ lambdadb/utils/security.py,sha256=Dq3M6Ee_x_uWRPZ7vvM4XQNxjCMSlphrRn6qVs1pljU,60
54
54
  lambdadb/utils/serializers.py,sha256=hiHBXM1AY8_N2Z_rvFfNSYwvLBkSQlPGFp8poasdU4s,5986
55
55
  lambdadb/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
56
56
  lambdadb/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
57
- lambdadb-0.2.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
58
- lambdadb-0.2.0.dist-info/METADATA,sha256=VYSiLCGH_MeiEALgq8o_vQ69rNFh1oR4fjWbQN52XzE,18666
59
- lambdadb-0.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
60
- lambdadb-0.2.0.dist-info/RECORD,,
57
+ lambdadb-0.2.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
58
+ lambdadb-0.2.2.dist-info/METADATA,sha256=Kh6hdhMO1MYvsSFRprXp0RcfJo0SZVaJRyRU3VLhB9w,18682
59
+ lambdadb-0.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
60
+ lambdadb-0.2.2.dist-info/RECORD,,