meilisearch-python-sdk 4.2.0__py3-none-any.whl → 4.4.0__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 meilisearch-python-sdk might be problematic. Click here for more details.
- meilisearch_python_sdk/_version.py +1 -1
- meilisearch_python_sdk/index.py +57 -6
- meilisearch_python_sdk/models/client.py +1 -0
- meilisearch_python_sdk/models/index.py +2 -0
- {meilisearch_python_sdk-4.2.0.dist-info → meilisearch_python_sdk-4.4.0.dist-info}/METADATA +1 -1
- {meilisearch_python_sdk-4.2.0.dist-info → meilisearch_python_sdk-4.4.0.dist-info}/RECORD +8 -8
- {meilisearch_python_sdk-4.2.0.dist-info → meilisearch_python_sdk-4.4.0.dist-info}/WHEEL +0 -0
- {meilisearch_python_sdk-4.2.0.dist-info → meilisearch_python_sdk-4.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.
|
|
1
|
+
VERSION = "4.4.0"
|
meilisearch_python_sdk/index.py
CHANGED
|
@@ -1288,12 +1288,22 @@ class AsyncIndex(_BaseIndex):
|
|
|
1288
1288
|
|
|
1289
1289
|
return SimilarSearchResults[self.hits_type](**response.json()) # type: ignore[name-defined]
|
|
1290
1290
|
|
|
1291
|
-
async def get_document(
|
|
1291
|
+
async def get_document(
|
|
1292
|
+
self,
|
|
1293
|
+
document_id: str,
|
|
1294
|
+
*,
|
|
1295
|
+
fields: list[str] | None = None,
|
|
1296
|
+
retrieve_vectors: bool = False,
|
|
1297
|
+
) -> JsonDict:
|
|
1292
1298
|
"""Get one document with given document identifier.
|
|
1293
1299
|
|
|
1294
1300
|
Args:
|
|
1295
1301
|
document_id: Unique identifier of the document.
|
|
1296
|
-
|
|
1302
|
+
fields: Document attributes to show. If this value is None then all
|
|
1303
|
+
attributes are retrieved. Defaults to None.
|
|
1304
|
+
retrieve_vectors: If set to True the embedding vectors will be returned with the document.
|
|
1305
|
+
Defaults to False. Note: This parameter can only be
|
|
1306
|
+
used with Meilisearch >= v1.13.0
|
|
1297
1307
|
Returns:
|
|
1298
1308
|
The document information
|
|
1299
1309
|
|
|
@@ -1307,7 +1317,16 @@ class AsyncIndex(_BaseIndex):
|
|
|
1307
1317
|
>>> index = client.index("movies")
|
|
1308
1318
|
>>> document = await index.get_document("1234")
|
|
1309
1319
|
"""
|
|
1310
|
-
|
|
1320
|
+
parameters: JsonDict = {}
|
|
1321
|
+
|
|
1322
|
+
if fields:
|
|
1323
|
+
parameters["fields"] = ",".join(fields)
|
|
1324
|
+
if retrieve_vectors:
|
|
1325
|
+
parameters["retrieveVectors"] = "true"
|
|
1326
|
+
|
|
1327
|
+
url = _build_encoded_url(f"{self._documents_url}/{document_id}", parameters)
|
|
1328
|
+
|
|
1329
|
+
response = await self._http_requests.get(url)
|
|
1311
1330
|
|
|
1312
1331
|
return response.json()
|
|
1313
1332
|
|
|
@@ -1318,6 +1337,7 @@ class AsyncIndex(_BaseIndex):
|
|
|
1318
1337
|
limit: int = 20,
|
|
1319
1338
|
fields: list[str] | None = None,
|
|
1320
1339
|
filter: Filter | None = None,
|
|
1340
|
+
retrieve_vectors: bool = False,
|
|
1321
1341
|
) -> DocumentsInfo:
|
|
1322
1342
|
"""Get a batch documents from the index.
|
|
1323
1343
|
|
|
@@ -1328,6 +1348,9 @@ class AsyncIndex(_BaseIndex):
|
|
|
1328
1348
|
attributes are retrieved. Defaults to None.
|
|
1329
1349
|
filter: Filter value information. Defaults to None. Note: This parameter can only be
|
|
1330
1350
|
used with Meilisearch >= v1.2.0
|
|
1351
|
+
retrieve_vectors: If set to True the vectors will be returned with each document.
|
|
1352
|
+
Defaults to False. Note: This parameter can only be
|
|
1353
|
+
used with Meilisearch >= v1.13.0
|
|
1331
1354
|
|
|
1332
1355
|
Returns:
|
|
1333
1356
|
Documents info.
|
|
@@ -1348,6 +1371,9 @@ class AsyncIndex(_BaseIndex):
|
|
|
1348
1371
|
"limit": limit,
|
|
1349
1372
|
}
|
|
1350
1373
|
|
|
1374
|
+
if retrieve_vectors:
|
|
1375
|
+
parameters["retrieveVectors"] = "true"
|
|
1376
|
+
|
|
1351
1377
|
if not filter:
|
|
1352
1378
|
if fields:
|
|
1353
1379
|
parameters["fields"] = ",".join(fields)
|
|
@@ -5470,12 +5496,22 @@ class Index(_BaseIndex):
|
|
|
5470
5496
|
|
|
5471
5497
|
return SimilarSearchResults[self.hits_type](**response.json()) # type: ignore[name-defined]
|
|
5472
5498
|
|
|
5473
|
-
def get_document(
|
|
5499
|
+
def get_document(
|
|
5500
|
+
self,
|
|
5501
|
+
document_id: str,
|
|
5502
|
+
*,
|
|
5503
|
+
fields: list[str] | None = None,
|
|
5504
|
+
retrieve_vectors: bool = False,
|
|
5505
|
+
) -> JsonDict:
|
|
5474
5506
|
"""Get one document with given document identifier.
|
|
5475
5507
|
|
|
5476
5508
|
Args:
|
|
5477
5509
|
document_id: Unique identifier of the document.
|
|
5478
|
-
|
|
5510
|
+
fields: Document attributes to show. If this value is None then all
|
|
5511
|
+
attributes are retrieved. Defaults to None.
|
|
5512
|
+
retrieve_vectors: If set to True the embedding vectors will be returned with the document.
|
|
5513
|
+
Defaults to False. Note: This parameter can only be
|
|
5514
|
+
used with Meilisearch >= v1.13.0
|
|
5479
5515
|
Returns:
|
|
5480
5516
|
The document information
|
|
5481
5517
|
|
|
@@ -5489,8 +5525,16 @@ class Index(_BaseIndex):
|
|
|
5489
5525
|
>>> index = client.index("movies")
|
|
5490
5526
|
>>> document = index.get_document("1234")
|
|
5491
5527
|
"""
|
|
5492
|
-
|
|
5528
|
+
parameters: JsonDict = {}
|
|
5529
|
+
|
|
5530
|
+
if fields:
|
|
5531
|
+
parameters["fields"] = ",".join(fields)
|
|
5532
|
+
if retrieve_vectors:
|
|
5533
|
+
parameters["retrieveVectors"] = "true"
|
|
5493
5534
|
|
|
5535
|
+
url = _build_encoded_url(f"{self._documents_url}/{document_id}", parameters)
|
|
5536
|
+
|
|
5537
|
+
response = self._http_requests.get(url)
|
|
5494
5538
|
return response.json()
|
|
5495
5539
|
|
|
5496
5540
|
def get_documents(
|
|
@@ -5500,6 +5544,7 @@ class Index(_BaseIndex):
|
|
|
5500
5544
|
limit: int = 20,
|
|
5501
5545
|
fields: list[str] | None = None,
|
|
5502
5546
|
filter: Filter | None = None,
|
|
5547
|
+
retrieve_vectors: bool = False,
|
|
5503
5548
|
) -> DocumentsInfo:
|
|
5504
5549
|
"""Get a batch documents from the index.
|
|
5505
5550
|
|
|
@@ -5510,6 +5555,9 @@ class Index(_BaseIndex):
|
|
|
5510
5555
|
attributes are retrieved. Defaults to None.
|
|
5511
5556
|
filter: Filter value information. Defaults to None. Note: This parameter can only be
|
|
5512
5557
|
used with Meilisearch >= v1.2.0
|
|
5558
|
+
retrieve_vectors: If set to True the vectors will be returned with each document.
|
|
5559
|
+
Defaults to False. Note: This parameter can only be
|
|
5560
|
+
used with Meilisearch >= v1.13.0
|
|
5513
5561
|
|
|
5514
5562
|
Returns:
|
|
5515
5563
|
Documents info.
|
|
@@ -5530,6 +5578,9 @@ class Index(_BaseIndex):
|
|
|
5530
5578
|
"limit": limit,
|
|
5531
5579
|
}
|
|
5532
5580
|
|
|
5581
|
+
if retrieve_vectors:
|
|
5582
|
+
parameters["retrieveVectors"] = "true"
|
|
5583
|
+
|
|
5533
5584
|
if not filter:
|
|
5534
5585
|
if fields:
|
|
5535
5586
|
parameters["fields"] = ",".join(fields)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meilisearch-python-sdk
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
4
4
|
Summary: A Python client providing both async and sync support for the Meilisearch API
|
|
5
5
|
Project-URL: repository, https://github.com/sanders41/meilisearch-python-sdk
|
|
6
6
|
Project-URL: homepage, https://github.com/sanders41/meilisearch-python-sdk
|
|
@@ -4,25 +4,25 @@ meilisearch_python_sdk/_client.py,sha256=6nMAYLiRF0uPC52qL8VnlbrUGEkJ8IkU7zyJvtq
|
|
|
4
4
|
meilisearch_python_sdk/_http_requests.py,sha256=O3M3n-t1jAKwccWowPbk-HPD3ExtHq8a3XhnZT5facs,6746
|
|
5
5
|
meilisearch_python_sdk/_task.py,sha256=QgVcqMlZdURRS_oYpB_bTBa5dvT3Sp_-O0-s6TqAxHk,12485
|
|
6
6
|
meilisearch_python_sdk/_utils.py,sha256=NoCDxJPhjABeuSxFTNCih585UDWdXEUBD_FvdgtScQw,1539
|
|
7
|
-
meilisearch_python_sdk/_version.py,sha256=
|
|
7
|
+
meilisearch_python_sdk/_version.py,sha256=oB0KqP42eLvdXDCkFa6G9Qy-3YoRoU2ADk6AzWBWU9E,18
|
|
8
8
|
meilisearch_python_sdk/decorators.py,sha256=njMn40P-qOzKGGQLCDpsBKWyj2ai10s4XG4IUBSHoD4,8674
|
|
9
9
|
meilisearch_python_sdk/errors.py,sha256=RNNHXtXLBiCVZaLM2MeKKs9RbRuE-SLRttiPeVAEXgA,2133
|
|
10
|
-
meilisearch_python_sdk/index.py,sha256=
|
|
10
|
+
meilisearch_python_sdk/index.py,sha256=IJZ1s_3Qusryzf923fDGG1m44rXV1zGc7whMuS41EPw,344420
|
|
11
11
|
meilisearch_python_sdk/json_handler.py,sha256=c1rGKzYlE0dGfLygQjPqVUNfQkN1JvafBGmIx31JW8g,2044
|
|
12
12
|
meilisearch_python_sdk/plugins.py,sha256=YySzTuVr4IrogTgrP8q-gZPsew8TwedopjWnTj5eV48,3607
|
|
13
13
|
meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
meilisearch_python_sdk/types.py,sha256=WxbQBPfy5S_j9hRKJ74ktuIxkH9Oifn7GYStQjs49Ik,458
|
|
15
15
|
meilisearch_python_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
meilisearch_python_sdk/models/batch.py,sha256=w0R0tINqm5DkkdX-9RXDqyS8rxDGCjEySSzzyVZ_gGs,1465
|
|
17
|
-
meilisearch_python_sdk/models/client.py,sha256=
|
|
17
|
+
meilisearch_python_sdk/models/client.py,sha256=YuxyGi9qEtkoEOAQsC28Mh7-SKiT8qj_S8Y8DcZIeNA,2493
|
|
18
18
|
meilisearch_python_sdk/models/documents.py,sha256=eT3FHrPND-g2IzNRyOHQApTTJ1WbFcGlqgxZ6aKrRgI,247
|
|
19
19
|
meilisearch_python_sdk/models/health.py,sha256=hvruti7ylsk7bAh8RPOhTPcRrjx6MPgdkDFX9vZ5Qks,95
|
|
20
|
-
meilisearch_python_sdk/models/index.py,sha256=
|
|
20
|
+
meilisearch_python_sdk/models/index.py,sha256=WLQOi3_HChko134FkRU1H3_cJjhHJCFclcx4oDBlqHU,1228
|
|
21
21
|
meilisearch_python_sdk/models/search.py,sha256=ZySZyA18QuJavz82gK7Kkqfp0fIxWVervCw24W6bToA,3487
|
|
22
22
|
meilisearch_python_sdk/models/settings.py,sha256=ElFzguRJD2GsAU0sZ5lmqdH-QXPM-HQJr1O_wC1Zbzs,4485
|
|
23
23
|
meilisearch_python_sdk/models/task.py,sha256=_PyuH5tSlHCKMwFsx1nMKjFgc8bDBZxscKYZOdf-4pg,2166
|
|
24
24
|
meilisearch_python_sdk/models/version.py,sha256=YDu-aj5H-d6nSaWRTXzlwWghmZAoiknaw250UyEd48I,215
|
|
25
|
-
meilisearch_python_sdk-4.
|
|
26
|
-
meilisearch_python_sdk-4.
|
|
27
|
-
meilisearch_python_sdk-4.
|
|
28
|
-
meilisearch_python_sdk-4.
|
|
25
|
+
meilisearch_python_sdk-4.4.0.dist-info/METADATA,sha256=Q0-zQ-P-fCnYnYieWx4Jh5HHTbb_zLApt5fhz1rf80g,9763
|
|
26
|
+
meilisearch_python_sdk-4.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
27
|
+
meilisearch_python_sdk-4.4.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
|
|
28
|
+
meilisearch_python_sdk-4.4.0.dist-info/RECORD,,
|
|
File without changes
|
{meilisearch_python_sdk-4.2.0.dist-info → meilisearch_python_sdk-4.4.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|