meilisearch-python-sdk 5.0.2__py3-none-any.whl → 5.1.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.

@@ -1 +1 @@
1
- VERSION = "5.0.2"
1
+ VERSION = "5.1.0"
@@ -470,6 +470,25 @@ class AsyncIndex(_BaseIndex):
470
470
 
471
471
  return plugins
472
472
 
473
+ async def compact(self) -> TaskInfo:
474
+ """Appends a new task to the queue to compact the database.
475
+
476
+ This defragments the LMDB database potentially speeds up indexing and searching.
477
+ NOTE: This is only available in Meilisearch v1.23.0+
478
+
479
+ Raises:
480
+ MeilisearchCommunicationError: If there was an error communicating with the server.
481
+ MeilisearchApiError: If the Meilisearch API returned an error.
482
+
483
+ Examples
484
+ >>> from meilisearch_python_sdk import AsyncClient
485
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
486
+ >>> index = client.index("movies")
487
+ >>> index.compact()
488
+ """
489
+ response = await self._http_requests.post(f"{self._base_url_with_uid}/compact")
490
+ return TaskInfo(**response.json())
491
+
473
492
  async def delete(self) -> TaskInfo:
474
493
  """Deletes the index.
475
494
 
@@ -4921,6 +4940,25 @@ class Index(_BaseIndex):
4921
4940
 
4922
4941
  return plugins
4923
4942
 
4943
+ def compact(self) -> TaskInfo:
4944
+ """Appends a new task to the queue to compact the database.
4945
+
4946
+ This defragments the LMDB database potentially speeds up indexing and searching.
4947
+ NOTE: This is only available in Meilisearch v1.23.0+
4948
+
4949
+ Raises:
4950
+ MeilisearchCommunicationError: If there was an error communicating with the server.
4951
+ MeilisearchApiError: If the Meilisearch API returned an error.
4952
+
4953
+ Examples
4954
+ >>> from meilisearch_python_sdk import Client
4955
+ >>> client = Client("http://localhost.com", "masterKey")
4956
+ >>> index = client.index("movies")
4957
+ >>> index.compact()
4958
+ """
4959
+ response = self._http_requests.post(f"{self._base_url_with_uid}/compact")
4960
+ return TaskInfo(**response.json())
4961
+
4924
4962
  def delete(self) -> TaskInfo:
4925
4963
  """Deletes the index.
4926
4964
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meilisearch-python-sdk
3
- Version: 5.0.2
3
+ Version: 5.1.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,10 +4,10 @@ meilisearch_python_sdk/_client.py,sha256=HA0FdvsVGAHhUt6mVB-sK03bIzVivN7ProcimeQ
4
4
  meilisearch_python_sdk/_http_requests.py,sha256=9NMTKrJDFpdWZKPLNGlRQ54EtqhPXlhov3EoeR3VrwU,6773
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=U0lGaY6On7ti1TySNQemRqyS-_A9_kLbmLHcU_6DCmE,18
7
+ meilisearch_python_sdk/_version.py,sha256=n65_AMV9xWnAAWXLUYz_Z2Q1OdGU8iqZ-dRAydz390w,18
8
8
  meilisearch_python_sdk/decorators.py,sha256=xtG-ptJkVbPlbC1hJQ6dPgPYqU27VluGwL_CTJuIq3I,8701
9
9
  meilisearch_python_sdk/errors.py,sha256=RNNHXtXLBiCVZaLM2MeKKs9RbRuE-SLRttiPeVAEXgA,2133
10
- meilisearch_python_sdk/index.py,sha256=XxUgfOBUo6ClayI94I0AljGW4obam5hBIHeAz7d8f4Q,349474
10
+ meilisearch_python_sdk/index.py,sha256=CI4K_G997MmMnGR3U-oe3OzvROpzMbibfVHFZjHwKkA,351125
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
@@ -23,7 +23,7 @@ meilisearch_python_sdk/models/settings.py,sha256=eh0xnro4D_sj8ck2nifa3tBdf2_7RcZ
23
23
  meilisearch_python_sdk/models/task.py,sha256=JVYF46ylD-XwqVVNq2offhLOkljaGxPyRVuF6PwLOBU,2174
24
24
  meilisearch_python_sdk/models/version.py,sha256=ISU-ZHgpXLBFDuMpWWfKdVo9Dq1HcD7s6HFnCiGTF8Y,184
25
25
  meilisearch_python_sdk/models/webhook.py,sha256=zSkEJJdEflinW3_seJTLQ_ZWs4w-pjTD3SS1ZawC32k,455
26
- meilisearch_python_sdk-5.0.2.dist-info/METADATA,sha256=0htZMo4C8TpBbXcOvWNQ__THa8eGp9GrEAk6x18CbcU,9699
27
- meilisearch_python_sdk-5.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- meilisearch_python_sdk-5.0.2.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
29
- meilisearch_python_sdk-5.0.2.dist-info/RECORD,,
26
+ meilisearch_python_sdk-5.1.0.dist-info/METADATA,sha256=WJgG0U-GzXz7ubBm6oY62PtSdbFlHBrwdgBjFfdTolg,9699
27
+ meilisearch_python_sdk-5.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ meilisearch_python_sdk-5.1.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
29
+ meilisearch_python_sdk-5.1.0.dist-info/RECORD,,