lambdadb 0.3.0__tar.gz → 0.3.2__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.3.0 → lambdadb-0.3.2}/PKG-INFO +9 -8
- {lambdadb-0.3.0 → lambdadb-0.3.2}/README-PYPI.md +8 -7
- {lambdadb-0.3.0 → lambdadb-0.3.2}/pyproject.toml +1 -1
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/_version.py +3 -3
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/collections.py +16 -16
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/docs.py +276 -10
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/__init__.py +50 -28
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/deletedocsop.py +5 -34
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/fetchdocsop.py +2 -2
- lambdadb-0.3.2/src/lambdadb/models/filter_.py +24 -0
- lambdadb-0.3.2/src/lambdadb/models/ids.py +16 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/indexconfigs_union.py +1 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/listcollectionsop.py +4 -4
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/querycollectionop.py +2 -2
- lambdadb-0.3.2/src/lambdadb/models/updatedocsop.py +67 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/LICENSE +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/py.typed +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/__init__.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/_hooks/__init__.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/_hooks/registration.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/_hooks/sdkhooks.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/_hooks/types.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/basesdk.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/__init__.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/apierror.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/badrequest_error.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/internalservererror.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/resourcealreadyexists_error.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/resourcenotfound_error.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/toomanyrequests_error.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/errors/unauthenticated_error.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/httpclient.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/bulkupsertdocsop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/collectionresponse.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/createcollectionop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/deletecollectionop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/getbulkupsertdocsop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/getcollectionop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/security.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/status.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/updatecollectionop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/models/upsertdocsop.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/py.typed +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/sdk.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/sdkconfiguration.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/types/__init__.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/types/basemodel.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/__init__.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/annotations.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/datetimes.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/enums.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/eventstreaming.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/forms.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/headers.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/logger.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/metadata.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/queryparams.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/requestbodies.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/retries.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/security.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/serializers.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/url.py +0 -0
- {lambdadb-0.3.0 → lambdadb-0.3.2}/src/lambdadb/utils/values.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: lambdadb
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -201,19 +201,20 @@ with LambdaDB(
|
|
|
201
201
|
### [collections](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md)
|
|
202
202
|
|
|
203
203
|
* [list](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#list) - List all collections in an existing project.
|
|
204
|
-
* [create](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#create) - Create
|
|
204
|
+
* [create](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#create) - Create a collection.
|
|
205
205
|
* [delete](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#delete) - Delete an existing collection.
|
|
206
206
|
* [get](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#get) - Get metadata of an existing collection.
|
|
207
|
-
* [update](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#update) - Configure
|
|
208
|
-
* [query](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#query) - Search
|
|
207
|
+
* [update](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#update) - Configure a collection.
|
|
208
|
+
* [query](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#query) - Search a collection with a query and return the most similar documents.
|
|
209
209
|
|
|
210
210
|
#### [collections.docs](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md)
|
|
211
211
|
|
|
212
|
-
* [upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#upsert) - Upsert documents into
|
|
212
|
+
* [upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#upsert) - Upsert documents into a collection. Note that the maximum supported payload size is 6MB.
|
|
213
213
|
* [get_bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#get_bulk_upsert) - Request required info to upload documents.
|
|
214
|
-
* [bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#bulk_upsert) - Bulk upsert documents into
|
|
215
|
-
* [
|
|
216
|
-
* [
|
|
214
|
+
* [bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#bulk_upsert) - Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
215
|
+
* [update_docs](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#update_docs) - Update documents in a collection. Note that the maximum supported payload size is 6MB.
|
|
216
|
+
* [delete](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#delete) - Delete documents by document IDs or query filter from a collection.
|
|
217
|
+
* [fetch](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#fetch) - Lookup and return documents by document IDs from a collection.
|
|
217
218
|
|
|
218
219
|
|
|
219
220
|
</details>
|
|
@@ -184,19 +184,20 @@ with LambdaDB(
|
|
|
184
184
|
### [collections](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md)
|
|
185
185
|
|
|
186
186
|
* [list](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#list) - List all collections in an existing project.
|
|
187
|
-
* [create](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#create) - Create
|
|
187
|
+
* [create](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#create) - Create a collection.
|
|
188
188
|
* [delete](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#delete) - Delete an existing collection.
|
|
189
189
|
* [get](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#get) - Get metadata of an existing collection.
|
|
190
|
-
* [update](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#update) - Configure
|
|
191
|
-
* [query](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#query) - Search
|
|
190
|
+
* [update](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#update) - Configure a collection.
|
|
191
|
+
* [query](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/collections/README.md#query) - Search a collection with a query and return the most similar documents.
|
|
192
192
|
|
|
193
193
|
#### [collections.docs](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md)
|
|
194
194
|
|
|
195
|
-
* [upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#upsert) - Upsert documents into
|
|
195
|
+
* [upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#upsert) - Upsert documents into a collection. Note that the maximum supported payload size is 6MB.
|
|
196
196
|
* [get_bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#get_bulk_upsert) - Request required info to upload documents.
|
|
197
|
-
* [bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#bulk_upsert) - Bulk upsert documents into
|
|
198
|
-
* [
|
|
199
|
-
* [
|
|
197
|
+
* [bulk_upsert](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#bulk_upsert) - Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
198
|
+
* [update_docs](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#update_docs) - Update documents in a collection. Note that the maximum supported payload size is 6MB.
|
|
199
|
+
* [delete](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#delete) - Delete documents by document IDs or query filter from a collection.
|
|
200
|
+
* [fetch](https://github.com/lambdadb/lambdadb-python-client/blob/master/docs/sdks/docs/README.md#fetch) - Lookup and return documents by document IDs from a collection.
|
|
200
201
|
|
|
201
202
|
|
|
202
203
|
</details>
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "lambdadb"
|
|
6
|
-
__version__: str = "0.3.
|
|
6
|
+
__version__: str = "0.3.2"
|
|
7
7
|
__openapi_doc_version__: str = "1.1.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.3.
|
|
8
|
+
__gen_version__: str = "2.644.1"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.3.2 2.644.1 1.1.0 lambdadb"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -29,7 +29,7 @@ class Collections(BaseSDK):
|
|
|
29
29
|
server_url: Optional[str] = None,
|
|
30
30
|
timeout_ms: Optional[int] = None,
|
|
31
31
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
32
|
-
) -> models.
|
|
32
|
+
) -> models.ListCollectionsResponse:
|
|
33
33
|
r"""List all collections in an existing project.
|
|
34
34
|
|
|
35
35
|
:param project_name: Project name.
|
|
@@ -48,7 +48,7 @@ class Collections(BaseSDK):
|
|
|
48
48
|
else:
|
|
49
49
|
base_url = self._get_url(base_url, url_variables)
|
|
50
50
|
|
|
51
|
-
request = models.
|
|
51
|
+
request = models.ListCollectionsRequest(
|
|
52
52
|
project_name=project_name,
|
|
53
53
|
)
|
|
54
54
|
|
|
@@ -84,7 +84,7 @@ class Collections(BaseSDK):
|
|
|
84
84
|
hook_ctx=HookContext(
|
|
85
85
|
config=self.sdk_configuration,
|
|
86
86
|
base_url=base_url or "",
|
|
87
|
-
operation_id="
|
|
87
|
+
operation_id="listCollections",
|
|
88
88
|
oauth2_scopes=[],
|
|
89
89
|
security_source=get_security_from_env(
|
|
90
90
|
self.sdk_configuration.security, models.Security
|
|
@@ -97,7 +97,7 @@ class Collections(BaseSDK):
|
|
|
97
97
|
|
|
98
98
|
response_data: Any = None
|
|
99
99
|
if utils.match_response(http_res, "200", "application/json"):
|
|
100
|
-
return utils.unmarshal_json(http_res.text, models.
|
|
100
|
+
return utils.unmarshal_json(http_res.text, models.ListCollectionsResponse)
|
|
101
101
|
if utils.match_response(http_res, "401", "application/json"):
|
|
102
102
|
response_data = utils.unmarshal_json(
|
|
103
103
|
http_res.text, errors.UnauthenticatedErrorData
|
|
@@ -146,7 +146,7 @@ class Collections(BaseSDK):
|
|
|
146
146
|
server_url: Optional[str] = None,
|
|
147
147
|
timeout_ms: Optional[int] = None,
|
|
148
148
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
149
|
-
) -> models.
|
|
149
|
+
) -> models.ListCollectionsResponse:
|
|
150
150
|
r"""List all collections in an existing project.
|
|
151
151
|
|
|
152
152
|
:param project_name: Project name.
|
|
@@ -165,7 +165,7 @@ class Collections(BaseSDK):
|
|
|
165
165
|
else:
|
|
166
166
|
base_url = self._get_url(base_url, url_variables)
|
|
167
167
|
|
|
168
|
-
request = models.
|
|
168
|
+
request = models.ListCollectionsRequest(
|
|
169
169
|
project_name=project_name,
|
|
170
170
|
)
|
|
171
171
|
|
|
@@ -201,7 +201,7 @@ class Collections(BaseSDK):
|
|
|
201
201
|
hook_ctx=HookContext(
|
|
202
202
|
config=self.sdk_configuration,
|
|
203
203
|
base_url=base_url or "",
|
|
204
|
-
operation_id="
|
|
204
|
+
operation_id="listCollections",
|
|
205
205
|
oauth2_scopes=[],
|
|
206
206
|
security_source=get_security_from_env(
|
|
207
207
|
self.sdk_configuration.security, models.Security
|
|
@@ -214,7 +214,7 @@ class Collections(BaseSDK):
|
|
|
214
214
|
|
|
215
215
|
response_data: Any = None
|
|
216
216
|
if utils.match_response(http_res, "200", "application/json"):
|
|
217
|
-
return utils.unmarshal_json(http_res.text, models.
|
|
217
|
+
return utils.unmarshal_json(http_res.text, models.ListCollectionsResponse)
|
|
218
218
|
if utils.match_response(http_res, "401", "application/json"):
|
|
219
219
|
response_data = utils.unmarshal_json(
|
|
220
220
|
http_res.text, errors.UnauthenticatedErrorData
|
|
@@ -275,7 +275,7 @@ class Collections(BaseSDK):
|
|
|
275
275
|
timeout_ms: Optional[int] = None,
|
|
276
276
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
277
277
|
) -> models.CollectionResponse:
|
|
278
|
-
r"""Create
|
|
278
|
+
r"""Create a collection.
|
|
279
279
|
|
|
280
280
|
:param project_name: Project name.
|
|
281
281
|
:param collection_name: Collection name must be unique within a project and the supported maximum length is 52.
|
|
@@ -431,7 +431,7 @@ class Collections(BaseSDK):
|
|
|
431
431
|
timeout_ms: Optional[int] = None,
|
|
432
432
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
433
433
|
) -> models.CollectionResponse:
|
|
434
|
-
r"""Create
|
|
434
|
+
r"""Create a collection.
|
|
435
435
|
|
|
436
436
|
:param project_name: Project name.
|
|
437
437
|
:param collection_name: Collection name must be unique within a project and the supported maximum length is 52.
|
|
@@ -1061,7 +1061,7 @@ class Collections(BaseSDK):
|
|
|
1061
1061
|
timeout_ms: Optional[int] = None,
|
|
1062
1062
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1063
1063
|
) -> models.CollectionResponse:
|
|
1064
|
-
r"""Configure
|
|
1064
|
+
r"""Configure a collection.
|
|
1065
1065
|
|
|
1066
1066
|
:param project_name: Project name.
|
|
1067
1067
|
:param collection_name: Collection name.
|
|
@@ -1203,7 +1203,7 @@ class Collections(BaseSDK):
|
|
|
1203
1203
|
timeout_ms: Optional[int] = None,
|
|
1204
1204
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1205
1205
|
) -> models.CollectionResponse:
|
|
1206
|
-
r"""Configure
|
|
1206
|
+
r"""Configure a collection.
|
|
1207
1207
|
|
|
1208
1208
|
:param project_name: Project name.
|
|
1209
1209
|
:param collection_name: Collection name.
|
|
@@ -1347,11 +1347,11 @@ class Collections(BaseSDK):
|
|
|
1347
1347
|
timeout_ms: Optional[int] = None,
|
|
1348
1348
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1349
1349
|
) -> models.QueryCollectionResponse:
|
|
1350
|
-
r"""Search
|
|
1350
|
+
r"""Search a collection with a query and return the most similar documents.
|
|
1351
1351
|
|
|
1352
1352
|
:param project_name: Project name.
|
|
1353
1353
|
:param collection_name: Collection name.
|
|
1354
|
-
:param size: Number of documents to return. Note that the maximum number of documents is
|
|
1354
|
+
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1355
1355
|
:param query: Query object.
|
|
1356
1356
|
: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.
|
|
1357
1357
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
@@ -1499,11 +1499,11 @@ class Collections(BaseSDK):
|
|
|
1499
1499
|
timeout_ms: Optional[int] = None,
|
|
1500
1500
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1501
1501
|
) -> models.QueryCollectionResponse:
|
|
1502
|
-
r"""Search
|
|
1502
|
+
r"""Search a collection with a query and return the most similar documents.
|
|
1503
1503
|
|
|
1504
1504
|
:param project_name: Project name.
|
|
1505
1505
|
:param collection_name: Collection name.
|
|
1506
|
-
:param size: Number of documents to return. Note that the maximum number of documents is
|
|
1506
|
+
:param size: Number of documents to return. Note that the maximum number of documents is 100.
|
|
1507
1507
|
:param query: Query object.
|
|
1508
1508
|
: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.
|
|
1509
1509
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
@@ -20,7 +20,7 @@ class Docs(BaseSDK):
|
|
|
20
20
|
timeout_ms: Optional[int] = None,
|
|
21
21
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
22
22
|
) -> models.UpsertDocsResponse:
|
|
23
|
-
r"""Upsert documents into
|
|
23
|
+
r"""Upsert documents into a collection. Note that the maximum supported payload size is 6MB.
|
|
24
24
|
|
|
25
25
|
:param project_name: Project name.
|
|
26
26
|
:param collection_name: Collection name.
|
|
@@ -153,7 +153,7 @@ class Docs(BaseSDK):
|
|
|
153
153
|
timeout_ms: Optional[int] = None,
|
|
154
154
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
155
155
|
) -> models.UpsertDocsResponse:
|
|
156
|
-
r"""Upsert documents into
|
|
156
|
+
r"""Upsert documents into a collection. Note that the maximum supported payload size is 6MB.
|
|
157
157
|
|
|
158
158
|
:param project_name: Project name.
|
|
159
159
|
:param collection_name: Collection name.
|
|
@@ -526,7 +526,7 @@ class Docs(BaseSDK):
|
|
|
526
526
|
timeout_ms: Optional[int] = None,
|
|
527
527
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
528
528
|
) -> models.BulkUpsertDocsResponse:
|
|
529
|
-
r"""Bulk upsert documents into
|
|
529
|
+
r"""Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
530
530
|
|
|
531
531
|
:param project_name: Project name.
|
|
532
532
|
:param collection_name: Collection name.
|
|
@@ -663,7 +663,7 @@ class Docs(BaseSDK):
|
|
|
663
663
|
timeout_ms: Optional[int] = None,
|
|
664
664
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
665
665
|
) -> models.BulkUpsertDocsResponse:
|
|
666
|
-
r"""Bulk upsert documents into
|
|
666
|
+
r"""Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
667
667
|
|
|
668
668
|
:param project_name: Project name.
|
|
669
669
|
:param collection_name: Collection name.
|
|
@@ -789,6 +789,272 @@ class Docs(BaseSDK):
|
|
|
789
789
|
http_res,
|
|
790
790
|
)
|
|
791
791
|
|
|
792
|
+
def update_docs(
|
|
793
|
+
self,
|
|
794
|
+
*,
|
|
795
|
+
project_name: str,
|
|
796
|
+
collection_name: str,
|
|
797
|
+
docs: Union[List[models.UpdateDocsDoc], List[models.UpdateDocsDocTypedDict]],
|
|
798
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
799
|
+
server_url: Optional[str] = None,
|
|
800
|
+
timeout_ms: Optional[int] = None,
|
|
801
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
802
|
+
) -> models.UpdateDocsResponse:
|
|
803
|
+
r"""Update documents in a collection. Note that the maximum supported payload size is 6MB.
|
|
804
|
+
|
|
805
|
+
:param project_name: Project name.
|
|
806
|
+
:param collection_name: Collection name.
|
|
807
|
+
:param docs: A list of documents to update. Each document must contain 'id' field to be updated.
|
|
808
|
+
:param retries: Override the default retry configuration for this method
|
|
809
|
+
:param server_url: Override the default server URL for this method
|
|
810
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
811
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
812
|
+
"""
|
|
813
|
+
base_url = None
|
|
814
|
+
url_variables = None
|
|
815
|
+
if timeout_ms is None:
|
|
816
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
817
|
+
|
|
818
|
+
if server_url is not None:
|
|
819
|
+
base_url = server_url
|
|
820
|
+
else:
|
|
821
|
+
base_url = self._get_url(base_url, url_variables)
|
|
822
|
+
|
|
823
|
+
request = models.UpdateDocsRequest(
|
|
824
|
+
project_name=project_name,
|
|
825
|
+
collection_name=collection_name,
|
|
826
|
+
request_body=models.UpdateDocsRequestBody(
|
|
827
|
+
docs=utils.get_pydantic_model(docs, List[models.UpdateDocsDoc]),
|
|
828
|
+
),
|
|
829
|
+
)
|
|
830
|
+
|
|
831
|
+
req = self._build_request(
|
|
832
|
+
method="POST",
|
|
833
|
+
path="/projects/{projectName}/collections/{collectionName}/docs/update",
|
|
834
|
+
base_url=base_url,
|
|
835
|
+
url_variables=url_variables,
|
|
836
|
+
request=request,
|
|
837
|
+
request_body_required=True,
|
|
838
|
+
request_has_path_params=True,
|
|
839
|
+
request_has_query_params=True,
|
|
840
|
+
user_agent_header="user-agent",
|
|
841
|
+
accept_header_value="application/json",
|
|
842
|
+
http_headers=http_headers,
|
|
843
|
+
security=self.sdk_configuration.security,
|
|
844
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
845
|
+
request.request_body, False, False, "json", models.UpdateDocsRequestBody
|
|
846
|
+
),
|
|
847
|
+
timeout_ms=timeout_ms,
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
if retries == UNSET:
|
|
851
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
852
|
+
retries = self.sdk_configuration.retry_config
|
|
853
|
+
else:
|
|
854
|
+
retries = utils.RetryConfig(
|
|
855
|
+
"backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
retry_config = None
|
|
859
|
+
if isinstance(retries, utils.RetryConfig):
|
|
860
|
+
retry_config = (retries, ["429", "5XX"])
|
|
861
|
+
|
|
862
|
+
http_res = self.do_request(
|
|
863
|
+
hook_ctx=HookContext(
|
|
864
|
+
config=self.sdk_configuration,
|
|
865
|
+
base_url=base_url or "",
|
|
866
|
+
operation_id="updateDocs",
|
|
867
|
+
oauth2_scopes=[],
|
|
868
|
+
security_source=get_security_from_env(
|
|
869
|
+
self.sdk_configuration.security, models.Security
|
|
870
|
+
),
|
|
871
|
+
),
|
|
872
|
+
request=req,
|
|
873
|
+
error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
|
|
874
|
+
retry_config=retry_config,
|
|
875
|
+
)
|
|
876
|
+
|
|
877
|
+
response_data: Any = None
|
|
878
|
+
if utils.match_response(http_res, "202", "application/json"):
|
|
879
|
+
return utils.unmarshal_json(http_res.text, models.UpdateDocsResponse)
|
|
880
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
881
|
+
response_data = utils.unmarshal_json(
|
|
882
|
+
http_res.text, errors.BadRequestErrorData
|
|
883
|
+
)
|
|
884
|
+
raise errors.BadRequestError(data=response_data)
|
|
885
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
886
|
+
response_data = utils.unmarshal_json(
|
|
887
|
+
http_res.text, errors.UnauthenticatedErrorData
|
|
888
|
+
)
|
|
889
|
+
raise errors.UnauthenticatedError(data=response_data)
|
|
890
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
891
|
+
response_data = utils.unmarshal_json(
|
|
892
|
+
http_res.text, errors.ResourceNotFoundErrorData
|
|
893
|
+
)
|
|
894
|
+
raise errors.ResourceNotFoundError(data=response_data)
|
|
895
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
896
|
+
response_data = utils.unmarshal_json(
|
|
897
|
+
http_res.text, errors.TooManyRequestsErrorData
|
|
898
|
+
)
|
|
899
|
+
raise errors.TooManyRequestsError(data=response_data)
|
|
900
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
901
|
+
response_data = utils.unmarshal_json(
|
|
902
|
+
http_res.text, errors.InternalServerErrorData
|
|
903
|
+
)
|
|
904
|
+
raise errors.InternalServerError(data=response_data)
|
|
905
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
906
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
907
|
+
raise errors.APIError(
|
|
908
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
909
|
+
)
|
|
910
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
911
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
912
|
+
raise errors.APIError(
|
|
913
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
content_type = http_res.headers.get("Content-Type")
|
|
917
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
918
|
+
raise errors.APIError(
|
|
919
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
920
|
+
http_res.status_code,
|
|
921
|
+
http_res_text,
|
|
922
|
+
http_res,
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
async def update_docs_async(
|
|
926
|
+
self,
|
|
927
|
+
*,
|
|
928
|
+
project_name: str,
|
|
929
|
+
collection_name: str,
|
|
930
|
+
docs: Union[List[models.UpdateDocsDoc], List[models.UpdateDocsDocTypedDict]],
|
|
931
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
932
|
+
server_url: Optional[str] = None,
|
|
933
|
+
timeout_ms: Optional[int] = None,
|
|
934
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
935
|
+
) -> models.UpdateDocsResponse:
|
|
936
|
+
r"""Update documents in a collection. Note that the maximum supported payload size is 6MB.
|
|
937
|
+
|
|
938
|
+
:param project_name: Project name.
|
|
939
|
+
:param collection_name: Collection name.
|
|
940
|
+
:param docs: A list of documents to update. Each document must contain 'id' field to be updated.
|
|
941
|
+
:param retries: Override the default retry configuration for this method
|
|
942
|
+
:param server_url: Override the default server URL for this method
|
|
943
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
944
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
945
|
+
"""
|
|
946
|
+
base_url = None
|
|
947
|
+
url_variables = None
|
|
948
|
+
if timeout_ms is None:
|
|
949
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
950
|
+
|
|
951
|
+
if server_url is not None:
|
|
952
|
+
base_url = server_url
|
|
953
|
+
else:
|
|
954
|
+
base_url = self._get_url(base_url, url_variables)
|
|
955
|
+
|
|
956
|
+
request = models.UpdateDocsRequest(
|
|
957
|
+
project_name=project_name,
|
|
958
|
+
collection_name=collection_name,
|
|
959
|
+
request_body=models.UpdateDocsRequestBody(
|
|
960
|
+
docs=utils.get_pydantic_model(docs, List[models.UpdateDocsDoc]),
|
|
961
|
+
),
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
req = self._build_request_async(
|
|
965
|
+
method="POST",
|
|
966
|
+
path="/projects/{projectName}/collections/{collectionName}/docs/update",
|
|
967
|
+
base_url=base_url,
|
|
968
|
+
url_variables=url_variables,
|
|
969
|
+
request=request,
|
|
970
|
+
request_body_required=True,
|
|
971
|
+
request_has_path_params=True,
|
|
972
|
+
request_has_query_params=True,
|
|
973
|
+
user_agent_header="user-agent",
|
|
974
|
+
accept_header_value="application/json",
|
|
975
|
+
http_headers=http_headers,
|
|
976
|
+
security=self.sdk_configuration.security,
|
|
977
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
978
|
+
request.request_body, False, False, "json", models.UpdateDocsRequestBody
|
|
979
|
+
),
|
|
980
|
+
timeout_ms=timeout_ms,
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
if retries == UNSET:
|
|
984
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
985
|
+
retries = self.sdk_configuration.retry_config
|
|
986
|
+
else:
|
|
987
|
+
retries = utils.RetryConfig(
|
|
988
|
+
"backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
retry_config = None
|
|
992
|
+
if isinstance(retries, utils.RetryConfig):
|
|
993
|
+
retry_config = (retries, ["429", "5XX"])
|
|
994
|
+
|
|
995
|
+
http_res = await self.do_request_async(
|
|
996
|
+
hook_ctx=HookContext(
|
|
997
|
+
config=self.sdk_configuration,
|
|
998
|
+
base_url=base_url or "",
|
|
999
|
+
operation_id="updateDocs",
|
|
1000
|
+
oauth2_scopes=[],
|
|
1001
|
+
security_source=get_security_from_env(
|
|
1002
|
+
self.sdk_configuration.security, models.Security
|
|
1003
|
+
),
|
|
1004
|
+
),
|
|
1005
|
+
request=req,
|
|
1006
|
+
error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
|
|
1007
|
+
retry_config=retry_config,
|
|
1008
|
+
)
|
|
1009
|
+
|
|
1010
|
+
response_data: Any = None
|
|
1011
|
+
if utils.match_response(http_res, "202", "application/json"):
|
|
1012
|
+
return utils.unmarshal_json(http_res.text, models.UpdateDocsResponse)
|
|
1013
|
+
if utils.match_response(http_res, "400", "application/json"):
|
|
1014
|
+
response_data = utils.unmarshal_json(
|
|
1015
|
+
http_res.text, errors.BadRequestErrorData
|
|
1016
|
+
)
|
|
1017
|
+
raise errors.BadRequestError(data=response_data)
|
|
1018
|
+
if utils.match_response(http_res, "401", "application/json"):
|
|
1019
|
+
response_data = utils.unmarshal_json(
|
|
1020
|
+
http_res.text, errors.UnauthenticatedErrorData
|
|
1021
|
+
)
|
|
1022
|
+
raise errors.UnauthenticatedError(data=response_data)
|
|
1023
|
+
if utils.match_response(http_res, "404", "application/json"):
|
|
1024
|
+
response_data = utils.unmarshal_json(
|
|
1025
|
+
http_res.text, errors.ResourceNotFoundErrorData
|
|
1026
|
+
)
|
|
1027
|
+
raise errors.ResourceNotFoundError(data=response_data)
|
|
1028
|
+
if utils.match_response(http_res, "429", "application/json"):
|
|
1029
|
+
response_data = utils.unmarshal_json(
|
|
1030
|
+
http_res.text, errors.TooManyRequestsErrorData
|
|
1031
|
+
)
|
|
1032
|
+
raise errors.TooManyRequestsError(data=response_data)
|
|
1033
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1034
|
+
response_data = utils.unmarshal_json(
|
|
1035
|
+
http_res.text, errors.InternalServerErrorData
|
|
1036
|
+
)
|
|
1037
|
+
raise errors.InternalServerError(data=response_data)
|
|
1038
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1039
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1040
|
+
raise errors.APIError(
|
|
1041
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1042
|
+
)
|
|
1043
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1044
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1045
|
+
raise errors.APIError(
|
|
1046
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1047
|
+
)
|
|
1048
|
+
|
|
1049
|
+
content_type = http_res.headers.get("Content-Type")
|
|
1050
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1051
|
+
raise errors.APIError(
|
|
1052
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1053
|
+
http_res.status_code,
|
|
1054
|
+
http_res_text,
|
|
1055
|
+
http_res,
|
|
1056
|
+
)
|
|
1057
|
+
|
|
792
1058
|
def delete(
|
|
793
1059
|
self,
|
|
794
1060
|
*,
|
|
@@ -802,7 +1068,7 @@ class Docs(BaseSDK):
|
|
|
802
1068
|
timeout_ms: Optional[int] = None,
|
|
803
1069
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
804
1070
|
) -> models.DeleteDocsResponse:
|
|
805
|
-
r"""Delete documents by document IDs or query filter from
|
|
1071
|
+
r"""Delete documents by document IDs or query filter from a collection.
|
|
806
1072
|
|
|
807
1073
|
:param project_name: Project name.
|
|
808
1074
|
:param collection_name: Collection name.
|
|
@@ -937,7 +1203,7 @@ class Docs(BaseSDK):
|
|
|
937
1203
|
timeout_ms: Optional[int] = None,
|
|
938
1204
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
939
1205
|
) -> models.DeleteDocsResponse:
|
|
940
|
-
r"""Delete documents by document IDs or query filter from
|
|
1206
|
+
r"""Delete documents by document IDs or query filter from a collection.
|
|
941
1207
|
|
|
942
1208
|
:param project_name: Project name.
|
|
943
1209
|
:param collection_name: Collection name.
|
|
@@ -1072,11 +1338,11 @@ class Docs(BaseSDK):
|
|
|
1072
1338
|
timeout_ms: Optional[int] = None,
|
|
1073
1339
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1074
1340
|
) -> models.FetchDocsResponse:
|
|
1075
|
-
r"""Lookup and return documents by document IDs from
|
|
1341
|
+
r"""Lookup and return documents by document IDs from a collection.
|
|
1076
1342
|
|
|
1077
1343
|
:param project_name: Project name.
|
|
1078
1344
|
:param collection_name: Collection name.
|
|
1079
|
-
:param ids: A list of document IDs to fetch. Note that the maximum number of document IDs is
|
|
1345
|
+
:param ids: A list of document IDs to fetch. Note that the maximum number of document IDs is 100.
|
|
1080
1346
|
: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.
|
|
1081
1347
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1082
1348
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1211,11 +1477,11 @@ class Docs(BaseSDK):
|
|
|
1211
1477
|
timeout_ms: Optional[int] = None,
|
|
1212
1478
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1213
1479
|
) -> models.FetchDocsResponse:
|
|
1214
|
-
r"""Lookup and return documents by document IDs from
|
|
1480
|
+
r"""Lookup and return documents by document IDs from a collection.
|
|
1215
1481
|
|
|
1216
1482
|
:param project_name: Project name.
|
|
1217
1483
|
:param collection_name: Collection name.
|
|
1218
|
-
:param ids: A list of document IDs to fetch. Note that the maximum number of document IDs is
|
|
1484
|
+
:param ids: A list of document IDs to fetch. Note that the maximum number of document IDs is 100.
|
|
1219
1485
|
: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.
|
|
1220
1486
|
:param include_vectors: If your application need to include vector values in the response, set includeVectors to true.
|
|
1221
1487
|
:param retries: Override the default retry configuration for this method
|
|
@@ -32,12 +32,6 @@ if TYPE_CHECKING:
|
|
|
32
32
|
DeleteDocsRequestTypedDict,
|
|
33
33
|
DeleteDocsResponse,
|
|
34
34
|
DeleteDocsResponseTypedDict,
|
|
35
|
-
Filter,
|
|
36
|
-
FilterTypedDict,
|
|
37
|
-
RequestBody1,
|
|
38
|
-
RequestBody1TypedDict,
|
|
39
|
-
RequestBody2,
|
|
40
|
-
RequestBody2TypedDict,
|
|
41
35
|
)
|
|
42
36
|
from .fetchdocsop import (
|
|
43
37
|
FetchDocsDoc,
|
|
@@ -51,6 +45,7 @@ if TYPE_CHECKING:
|
|
|
51
45
|
FetchDocsResponse,
|
|
52
46
|
FetchDocsResponseTypedDict,
|
|
53
47
|
)
|
|
48
|
+
from .filter_ import Filter, FilterFilter, FilterFilterTypedDict, FilterTypedDict
|
|
54
49
|
from .getbulkupsertdocsop import (
|
|
55
50
|
GetBulkUpsertDocsRequest,
|
|
56
51
|
GetBulkUpsertDocsRequestTypedDict,
|
|
@@ -60,6 +55,7 @@ if TYPE_CHECKING:
|
|
|
60
55
|
HTTPMethod,
|
|
61
56
|
)
|
|
62
57
|
from .getcollectionop import GetCollectionRequest, GetCollectionRequestTypedDict
|
|
58
|
+
from .ids import IDs, IDsTypedDict
|
|
63
59
|
from .indexconfigs_union import (
|
|
64
60
|
Analyzer,
|
|
65
61
|
IndexConfigs,
|
|
@@ -76,10 +72,10 @@ if TYPE_CHECKING:
|
|
|
76
72
|
TypeVector,
|
|
77
73
|
)
|
|
78
74
|
from .listcollectionsop import (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
ListCollectionsRequest,
|
|
76
|
+
ListCollectionsRequestTypedDict,
|
|
77
|
+
ListCollectionsResponse,
|
|
78
|
+
ListCollectionsResponseTypedDict,
|
|
83
79
|
)
|
|
84
80
|
from .querycollectionop import (
|
|
85
81
|
Query,
|
|
@@ -105,6 +101,16 @@ if TYPE_CHECKING:
|
|
|
105
101
|
UpdateCollectionRequestBodyTypedDict,
|
|
106
102
|
UpdateCollectionRequestTypedDict,
|
|
107
103
|
)
|
|
104
|
+
from .updatedocsop import (
|
|
105
|
+
UpdateDocsDoc,
|
|
106
|
+
UpdateDocsDocTypedDict,
|
|
107
|
+
UpdateDocsRequest,
|
|
108
|
+
UpdateDocsRequestBody,
|
|
109
|
+
UpdateDocsRequestBodyTypedDict,
|
|
110
|
+
UpdateDocsRequestTypedDict,
|
|
111
|
+
UpdateDocsResponse,
|
|
112
|
+
UpdateDocsResponseTypedDict,
|
|
113
|
+
)
|
|
108
114
|
from .upsertdocsop import (
|
|
109
115
|
UpsertDocsDoc,
|
|
110
116
|
UpsertDocsDocTypedDict,
|
|
@@ -151,6 +157,8 @@ __all__ = [
|
|
|
151
157
|
"FetchDocsResponse",
|
|
152
158
|
"FetchDocsResponseTypedDict",
|
|
153
159
|
"Filter",
|
|
160
|
+
"FilterFilter",
|
|
161
|
+
"FilterFilterTypedDict",
|
|
154
162
|
"FilterTypedDict",
|
|
155
163
|
"GetBulkUpsertDocsRequest",
|
|
156
164
|
"GetBulkUpsertDocsRequestTypedDict",
|
|
@@ -160,6 +168,8 @@ __all__ = [
|
|
|
160
168
|
"GetCollectionRequest",
|
|
161
169
|
"GetCollectionRequestTypedDict",
|
|
162
170
|
"HTTPMethod",
|
|
171
|
+
"IDs",
|
|
172
|
+
"IDsTypedDict",
|
|
163
173
|
"IndexConfigs",
|
|
164
174
|
"IndexConfigsText",
|
|
165
175
|
"IndexConfigsTextTypedDict",
|
|
@@ -168,10 +178,10 @@ __all__ = [
|
|
|
168
178
|
"IndexConfigsUnionTypedDict",
|
|
169
179
|
"IndexConfigsVector",
|
|
170
180
|
"IndexConfigsVectorTypedDict",
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
181
|
+
"ListCollectionsRequest",
|
|
182
|
+
"ListCollectionsRequestTypedDict",
|
|
183
|
+
"ListCollectionsResponse",
|
|
184
|
+
"ListCollectionsResponseTypedDict",
|
|
175
185
|
"Query",
|
|
176
186
|
"QueryCollectionDoc",
|
|
177
187
|
"QueryCollectionDocDoc",
|
|
@@ -184,10 +194,6 @@ __all__ = [
|
|
|
184
194
|
"QueryCollectionResponse",
|
|
185
195
|
"QueryCollectionResponseTypedDict",
|
|
186
196
|
"QueryTypedDict",
|
|
187
|
-
"RequestBody1",
|
|
188
|
-
"RequestBody1TypedDict",
|
|
189
|
-
"RequestBody2",
|
|
190
|
-
"RequestBody2TypedDict",
|
|
191
197
|
"Security",
|
|
192
198
|
"SecurityTypedDict",
|
|
193
199
|
"Similarity",
|
|
@@ -201,6 +207,14 @@ __all__ = [
|
|
|
201
207
|
"UpdateCollectionRequestBody",
|
|
202
208
|
"UpdateCollectionRequestBodyTypedDict",
|
|
203
209
|
"UpdateCollectionRequestTypedDict",
|
|
210
|
+
"UpdateDocsDoc",
|
|
211
|
+
"UpdateDocsDocTypedDict",
|
|
212
|
+
"UpdateDocsRequest",
|
|
213
|
+
"UpdateDocsRequestBody",
|
|
214
|
+
"UpdateDocsRequestBodyTypedDict",
|
|
215
|
+
"UpdateDocsRequestTypedDict",
|
|
216
|
+
"UpdateDocsResponse",
|
|
217
|
+
"UpdateDocsResponseTypedDict",
|
|
204
218
|
"UpsertDocsDoc",
|
|
205
219
|
"UpsertDocsDocTypedDict",
|
|
206
220
|
"UpsertDocsRequest",
|
|
@@ -234,12 +248,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
234
248
|
"DeleteDocsRequestTypedDict": ".deletedocsop",
|
|
235
249
|
"DeleteDocsResponse": ".deletedocsop",
|
|
236
250
|
"DeleteDocsResponseTypedDict": ".deletedocsop",
|
|
237
|
-
"Filter": ".deletedocsop",
|
|
238
|
-
"FilterTypedDict": ".deletedocsop",
|
|
239
|
-
"RequestBody1": ".deletedocsop",
|
|
240
|
-
"RequestBody1TypedDict": ".deletedocsop",
|
|
241
|
-
"RequestBody2": ".deletedocsop",
|
|
242
|
-
"RequestBody2TypedDict": ".deletedocsop",
|
|
243
251
|
"FetchDocsDoc": ".fetchdocsop",
|
|
244
252
|
"FetchDocsDocDoc": ".fetchdocsop",
|
|
245
253
|
"FetchDocsDocDocTypedDict": ".fetchdocsop",
|
|
@@ -250,6 +258,10 @@ _dynamic_imports: dict[str, str] = {
|
|
|
250
258
|
"FetchDocsRequestTypedDict": ".fetchdocsop",
|
|
251
259
|
"FetchDocsResponse": ".fetchdocsop",
|
|
252
260
|
"FetchDocsResponseTypedDict": ".fetchdocsop",
|
|
261
|
+
"Filter": ".filter_",
|
|
262
|
+
"FilterFilter": ".filter_",
|
|
263
|
+
"FilterFilterTypedDict": ".filter_",
|
|
264
|
+
"FilterTypedDict": ".filter_",
|
|
253
265
|
"GetBulkUpsertDocsRequest": ".getbulkupsertdocsop",
|
|
254
266
|
"GetBulkUpsertDocsRequestTypedDict": ".getbulkupsertdocsop",
|
|
255
267
|
"GetBulkUpsertDocsResponse": ".getbulkupsertdocsop",
|
|
@@ -258,6 +270,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
258
270
|
"HTTPMethod": ".getbulkupsertdocsop",
|
|
259
271
|
"GetCollectionRequest": ".getcollectionop",
|
|
260
272
|
"GetCollectionRequestTypedDict": ".getcollectionop",
|
|
273
|
+
"IDs": ".ids",
|
|
274
|
+
"IDsTypedDict": ".ids",
|
|
261
275
|
"Analyzer": ".indexconfigs_union",
|
|
262
276
|
"IndexConfigs": ".indexconfigs_union",
|
|
263
277
|
"IndexConfigsText": ".indexconfigs_union",
|
|
@@ -271,10 +285,10 @@ _dynamic_imports: dict[str, str] = {
|
|
|
271
285
|
"Type": ".indexconfigs_union",
|
|
272
286
|
"TypeText": ".indexconfigs_union",
|
|
273
287
|
"TypeVector": ".indexconfigs_union",
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
"
|
|
277
|
-
"
|
|
288
|
+
"ListCollectionsRequest": ".listcollectionsop",
|
|
289
|
+
"ListCollectionsRequestTypedDict": ".listcollectionsop",
|
|
290
|
+
"ListCollectionsResponse": ".listcollectionsop",
|
|
291
|
+
"ListCollectionsResponseTypedDict": ".listcollectionsop",
|
|
278
292
|
"Query": ".querycollectionop",
|
|
279
293
|
"QueryCollectionDoc": ".querycollectionop",
|
|
280
294
|
"QueryCollectionDocDoc": ".querycollectionop",
|
|
@@ -296,6 +310,14 @@ _dynamic_imports: dict[str, str] = {
|
|
|
296
310
|
"UpdateCollectionRequestBody": ".updatecollectionop",
|
|
297
311
|
"UpdateCollectionRequestBodyTypedDict": ".updatecollectionop",
|
|
298
312
|
"UpdateCollectionRequestTypedDict": ".updatecollectionop",
|
|
313
|
+
"UpdateDocsDoc": ".updatedocsop",
|
|
314
|
+
"UpdateDocsDocTypedDict": ".updatedocsop",
|
|
315
|
+
"UpdateDocsRequest": ".updatedocsop",
|
|
316
|
+
"UpdateDocsRequestBody": ".updatedocsop",
|
|
317
|
+
"UpdateDocsRequestBodyTypedDict": ".updatedocsop",
|
|
318
|
+
"UpdateDocsRequestTypedDict": ".updatedocsop",
|
|
319
|
+
"UpdateDocsResponse": ".updatedocsop",
|
|
320
|
+
"UpdateDocsResponseTypedDict": ".updatedocsop",
|
|
299
321
|
"UpsertDocsDoc": ".upsertdocsop",
|
|
300
322
|
"UpsertDocsDocTypedDict": ".upsertdocsop",
|
|
301
323
|
"UpsertDocsRequest": ".upsertdocsop",
|
|
@@ -1,50 +1,21 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .filter_ import Filter, FilterTypedDict
|
|
5
|
+
from .ids import IDs, IDsTypedDict
|
|
4
6
|
from lambdadb.types import BaseModel
|
|
5
7
|
from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
6
8
|
import pydantic
|
|
7
|
-
from typing import
|
|
9
|
+
from typing import Optional, Union
|
|
8
10
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
class FilterTypedDict(TypedDict):
|
|
12
|
-
r"""Query filter."""
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class Filter(BaseModel):
|
|
16
|
-
r"""Query filter."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class RequestBody2TypedDict(TypedDict):
|
|
20
|
-
filter_: FilterTypedDict
|
|
21
|
-
r"""Query filter."""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class RequestBody2(BaseModel):
|
|
25
|
-
filter_: Annotated[Filter, pydantic.Field(alias="filter")]
|
|
26
|
-
r"""Query filter."""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class RequestBody1TypedDict(TypedDict):
|
|
30
|
-
ids: List[str]
|
|
31
|
-
r"""A list of document IDs."""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class RequestBody1(BaseModel):
|
|
35
|
-
ids: List[str]
|
|
36
|
-
r"""A list of document IDs."""
|
|
37
|
-
|
|
38
|
-
|
|
39
13
|
DeleteDocsRequestBodyTypedDict = TypeAliasType(
|
|
40
|
-
"DeleteDocsRequestBodyTypedDict",
|
|
41
|
-
Union[RequestBody1TypedDict, RequestBody2TypedDict],
|
|
14
|
+
"DeleteDocsRequestBodyTypedDict", Union[IDsTypedDict, FilterTypedDict]
|
|
42
15
|
)
|
|
43
16
|
|
|
44
17
|
|
|
45
|
-
DeleteDocsRequestBody = TypeAliasType(
|
|
46
|
-
"DeleteDocsRequestBody", Union[RequestBody1, RequestBody2]
|
|
47
|
-
)
|
|
18
|
+
DeleteDocsRequestBody = TypeAliasType("DeleteDocsRequestBody", Union[IDs, Filter])
|
|
48
19
|
|
|
49
20
|
|
|
50
21
|
class DeleteDocsRequestTypedDict(TypedDict):
|
|
@@ -10,7 +10,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
10
10
|
|
|
11
11
|
class FetchDocsRequestBodyTypedDict(TypedDict):
|
|
12
12
|
ids: List[str]
|
|
13
|
-
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is
|
|
13
|
+
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is 100."""
|
|
14
14
|
consistent_read: NotRequired[bool]
|
|
15
15
|
r"""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."""
|
|
16
16
|
include_vectors: NotRequired[bool]
|
|
@@ -19,7 +19,7 @@ class FetchDocsRequestBodyTypedDict(TypedDict):
|
|
|
19
19
|
|
|
20
20
|
class FetchDocsRequestBody(BaseModel):
|
|
21
21
|
ids: List[str]
|
|
22
|
-
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is
|
|
22
|
+
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is 100."""
|
|
23
23
|
|
|
24
24
|
consistent_read: Annotated[
|
|
25
25
|
Optional[bool], pydantic.Field(alias="consistentRead")
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FilterFilterTypedDict(TypedDict):
|
|
10
|
+
r"""Query filter."""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class FilterFilter(BaseModel):
|
|
14
|
+
r"""Query filter."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FilterTypedDict(TypedDict):
|
|
18
|
+
filter_: FilterFilterTypedDict
|
|
19
|
+
r"""Query filter."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Filter(BaseModel):
|
|
23
|
+
filter_: Annotated[FilterFilter, pydantic.Field(alias="filter")]
|
|
24
|
+
r"""Query filter."""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class IDsTypedDict(TypedDict):
|
|
10
|
+
ids: List[str]
|
|
11
|
+
r"""A list of document IDs."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IDs(BaseModel):
|
|
15
|
+
ids: List[str]
|
|
16
|
+
r"""A list of document IDs."""
|
|
@@ -9,12 +9,12 @@ from typing import List, Optional
|
|
|
9
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class ListCollectionsRequestTypedDict(TypedDict):
|
|
13
13
|
project_name: str
|
|
14
14
|
r"""Project name."""
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class ListCollectionsRequest(BaseModel):
|
|
18
18
|
project_name: Annotated[
|
|
19
19
|
str,
|
|
20
20
|
pydantic.Field(alias="projectName"),
|
|
@@ -23,13 +23,13 @@ class ListcollectionsRequest(BaseModel):
|
|
|
23
23
|
r"""Project name."""
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class ListCollectionsResponseTypedDict(TypedDict):
|
|
27
27
|
r"""A list of collections matched with a projectName."""
|
|
28
28
|
|
|
29
29
|
collections: NotRequired[List[CollectionResponseTypedDict]]
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class ListCollectionsResponse(BaseModel):
|
|
33
33
|
r"""A list of collections matched with a projectName."""
|
|
34
34
|
|
|
35
35
|
collections: Optional[List[CollectionResponse]] = None
|
|
@@ -26,7 +26,7 @@ class Sort(BaseModel):
|
|
|
26
26
|
|
|
27
27
|
class QueryCollectionRequestBodyTypedDict(TypedDict):
|
|
28
28
|
size: int
|
|
29
|
-
r"""Number of documents to return. Note that the maximum number of documents is
|
|
29
|
+
r"""Number of documents to return. Note that the maximum number of documents is 100."""
|
|
30
30
|
query: NotRequired[QueryTypedDict]
|
|
31
31
|
r"""Query object."""
|
|
32
32
|
consistent_read: NotRequired[bool]
|
|
@@ -41,7 +41,7 @@ class QueryCollectionRequestBodyTypedDict(TypedDict):
|
|
|
41
41
|
|
|
42
42
|
class QueryCollectionRequestBody(BaseModel):
|
|
43
43
|
size: int
|
|
44
|
-
r"""Number of documents to return. Note that the maximum number of documents is
|
|
44
|
+
r"""Number of documents to return. Note that the maximum number of documents is 100."""
|
|
45
45
|
|
|
46
46
|
query: Optional[Query] = None
|
|
47
47
|
r"""Query object."""
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class UpdateDocsDocTypedDict(TypedDict):
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class UpdateDocsDoc(BaseModel):
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class UpdateDocsRequestBodyTypedDict(TypedDict):
|
|
20
|
+
docs: List[UpdateDocsDocTypedDict]
|
|
21
|
+
r"""A list of documents to update. Each document must contain 'id' field to be updated."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class UpdateDocsRequestBody(BaseModel):
|
|
25
|
+
docs: List[UpdateDocsDoc]
|
|
26
|
+
r"""A list of documents to update. Each document must contain 'id' field to be updated."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class UpdateDocsRequestTypedDict(TypedDict):
|
|
30
|
+
project_name: str
|
|
31
|
+
r"""Project name."""
|
|
32
|
+
collection_name: str
|
|
33
|
+
r"""Collection name."""
|
|
34
|
+
request_body: UpdateDocsRequestBodyTypedDict
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class UpdateDocsRequest(BaseModel):
|
|
38
|
+
project_name: Annotated[
|
|
39
|
+
str,
|
|
40
|
+
pydantic.Field(alias="projectName"),
|
|
41
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
42
|
+
]
|
|
43
|
+
r"""Project name."""
|
|
44
|
+
|
|
45
|
+
collection_name: Annotated[
|
|
46
|
+
str,
|
|
47
|
+
pydantic.Field(alias="collectionName"),
|
|
48
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
49
|
+
]
|
|
50
|
+
r"""Collection name."""
|
|
51
|
+
|
|
52
|
+
request_body: Annotated[
|
|
53
|
+
UpdateDocsRequestBody,
|
|
54
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class UpdateDocsResponseTypedDict(TypedDict):
|
|
59
|
+
r"""Update request accepted."""
|
|
60
|
+
|
|
61
|
+
message: NotRequired[str]
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class UpdateDocsResponse(BaseModel):
|
|
65
|
+
r"""Update request accepted."""
|
|
66
|
+
|
|
67
|
+
message: Optional[str] = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|