meilisearch-python-sdk 4.4.0__tar.gz → 4.6.0__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 meilisearch-python-sdk might be problematic. Click here for more details.

Files changed (102) hide show
  1. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/workflows/docs_publish.yml +1 -1
  2. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/workflows/nightly_testing.yml +1 -1
  3. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/workflows/pypi_publish.yml +1 -1
  4. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/workflows/testing.yml +10 -10
  5. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.pre-commit-config.yaml +1 -1
  6. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/PKG-INFO +1 -1
  7. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/_client.py +111 -1
  8. meilisearch_python_sdk-4.6.0/meilisearch_python_sdk/_version.py +1 -0
  9. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/index.py +98 -12
  10. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/batch.py +3 -0
  11. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/client.py +11 -0
  12. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/settings.py +35 -3
  13. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/pyproject.toml +3 -3
  14. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/conftest.py +10 -1
  15. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_async_client.py +23 -1
  16. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_async_index.py +31 -5
  17. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_async_search.py +14 -0
  18. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_client.py +23 -1
  19. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_index.py +31 -5
  20. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_search.py +14 -0
  21. meilisearch_python_sdk-4.6.0/uv.lock +1560 -0
  22. meilisearch_python_sdk-4.4.0/meilisearch_python_sdk/_version.py +0 -1
  23. meilisearch_python_sdk-4.4.0/uv.lock +0 -1556
  24. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/FUNDING.yml +0 -0
  25. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/release-draft-template.yaml +0 -0
  26. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/renovate.json5 +0 -0
  27. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.github/workflows/release-drafter.yml +0 -0
  28. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/.gitignore +0 -0
  29. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/CONTRIBUTING.md +0 -0
  30. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/LICENSE +0 -0
  31. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/README.md +0 -0
  32. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/assets/add_in_batches.png +0 -0
  33. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/assets/searches.png +0 -0
  34. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/benchmark/run_benchmark.py +0 -0
  35. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/codecov.yml +0 -0
  36. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/datasets/small_movies.json +0 -0
  37. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docker-compose.https.yml +0 -0
  38. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docker-compose.yml +0 -0
  39. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/.nojekyll +0 -0
  40. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/CNAME +0 -0
  41. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/async_client_api.md +0 -0
  42. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/async_index_api.md +0 -0
  43. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/client_api.md +0 -0
  44. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/css/custom.css +0 -0
  45. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/decorators_api.md +0 -0
  46. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/index.md +0 -0
  47. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/index_api.md +0 -0
  48. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/js/umami.js +0 -0
  49. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/json_handler.md +0 -0
  50. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/plugins.md +0 -0
  51. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/docs/pydantic.md +0 -0
  52. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/.gitignore +0 -0
  53. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/README.md +0 -0
  54. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/__init__.py +0 -0
  55. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/add_documents_decorator.py +0 -0
  56. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/add_documents_in_batches.py +0 -0
  57. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/async_add_documents_decorator.py +0 -0
  58. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/async_add_documents_in_batches.py +0 -0
  59. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/async_documents_and_search_results.py +0 -0
  60. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/async_search_tracker.py +0 -0
  61. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/async_update_settings.py +0 -0
  62. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/documents_and_search_results.py +0 -0
  63. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/fastapi_example.py +0 -0
  64. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/orjson_example.py +0 -0
  65. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/pyproject.toml +0 -0
  66. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/requirements.txt +0 -0
  67. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/search_tracker.py +0 -0
  68. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/tests/__init__.py +0 -0
  69. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/tests/conftest.py +0 -0
  70. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/tests/test_async_examples.py +0 -0
  71. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/tests/test_examples.py +0 -0
  72. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/ujson_example.py +0 -0
  73. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/examples/update_settings.py +0 -0
  74. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/justfile +0 -0
  75. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/__init__.py +0 -0
  76. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/_batch.py +0 -0
  77. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/_http_requests.py +0 -0
  78. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/_task.py +0 -0
  79. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/_utils.py +0 -0
  80. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/decorators.py +0 -0
  81. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/errors.py +0 -0
  82. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/json_handler.py +0 -0
  83. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/__init__.py +0 -0
  84. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/documents.py +0 -0
  85. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/health.py +0 -0
  86. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/index.py +0 -0
  87. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/search.py +0 -0
  88. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/task.py +0 -0
  89. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/models/version.py +0 -0
  90. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/plugins.py +0 -0
  91. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/py.typed +0 -0
  92. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/meilisearch_python_sdk/types.py +0 -0
  93. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/mkdocs.yaml +0 -0
  94. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/__init__.py +0 -0
  95. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_async_documents.py +0 -0
  96. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_async_index_plugins.py +0 -0
  97. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_decorators.py +0 -0
  98. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_documents.py +0 -0
  99. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_errors.py +0 -0
  100. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_index_plugins.py +0 -0
  101. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_utils.py +0 -0
  102. {meilisearch_python_sdk-4.4.0 → meilisearch_python_sdk-4.6.0}/tests/test_version.py +0 -0
@@ -12,7 +12,7 @@ jobs:
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
14
  - name: Install uv
15
- uses: astral-sh/setup-uv@v5
15
+ uses: astral-sh/setup-uv@v6
16
16
  with:
17
17
  enable-cache: true
18
18
  - name: Set up Python
@@ -14,7 +14,7 @@ jobs:
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - name: Install uv
17
- uses: astral-sh/setup-uv@v5
17
+ uses: astral-sh/setup-uv@v6
18
18
  with:
19
19
  enable-cache: true
20
20
  - name: install Just
@@ -14,7 +14,7 @@ jobs:
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - name: Install uv
17
- uses: astral-sh/setup-uv@v5
17
+ uses: astral-sh/setup-uv@v6
18
18
  with:
19
19
  enable-cache: true
20
20
  - name: Set up Python
@@ -15,7 +15,7 @@ jobs:
15
15
  - name: install Just
16
16
  uses: taiki-e/install-action@just
17
17
  - name: Install uv
18
- uses: astral-sh/setup-uv@v5
18
+ uses: astral-sh/setup-uv@v6
19
19
  with:
20
20
  enable-cache: true
21
21
  - name: Set up Python
@@ -38,7 +38,7 @@ jobs:
38
38
  - name: install Just
39
39
  uses: taiki-e/install-action@just
40
40
  - name: Install uv
41
- uses: astral-sh/setup-uv@v5
41
+ uses: astral-sh/setup-uv@v6
42
42
  with:
43
43
  enable-cache: true
44
44
  - name: Set up Python ${{ matrix.python-version }}
@@ -50,7 +50,7 @@ jobs:
50
50
  - name: Test with pytest
51
51
  run: just test-parallel-ci
52
52
  - name: Upload coverage
53
- uses: codecov/codecov-action@v5
53
+ uses: codecov/codecov-action@v5.4.2
54
54
  with:
55
55
  token: ${{ secrets.CODECOV_TOKEN }}
56
56
  fail_ci_if_error: true
@@ -66,7 +66,7 @@ jobs:
66
66
  - name: install Just
67
67
  uses: taiki-e/install-action@just
68
68
  - name: Install uv
69
- uses: astral-sh/setup-uv@v5
69
+ uses: astral-sh/setup-uv@v6
70
70
  with:
71
71
  enable-cache: true
72
72
  - name: Set up Python ${{ matrix.python-version }}
@@ -90,7 +90,7 @@ jobs:
90
90
  - name: Test with pytest
91
91
  run: just test-parallel-ci-http2
92
92
  - name: Upload coverage
93
- uses: codecov/codecov-action@v5
93
+ uses: codecov/codecov-action@v5.4.2
94
94
  with:
95
95
  token: ${{ secrets.CODECOV_TOKEN }}
96
96
  fail_ci_if_error: true
@@ -106,7 +106,7 @@ jobs:
106
106
  - name: install Just
107
107
  uses: taiki-e/install-action@just
108
108
  - name: Install uv
109
- uses: astral-sh/setup-uv@v5
109
+ uses: astral-sh/setup-uv@v6
110
110
  with:
111
111
  enable-cache: true
112
112
  - name: Set up Python ${{ matrix.python-version }}
@@ -118,7 +118,7 @@ jobs:
118
118
  - name: Test with pytest
119
119
  run: just test-no-parallel-ci
120
120
  - name: Upload coverage
121
- uses: codecov/codecov-action@v5
121
+ uses: codecov/codecov-action@v5.4.2
122
122
  with:
123
123
  token: ${{ secrets.CODECOV_TOKEN }}
124
124
  fail_ci_if_error: true
@@ -134,7 +134,7 @@ jobs:
134
134
  - name: install Just
135
135
  uses: taiki-e/install-action@just
136
136
  - name: Install uv
137
- uses: astral-sh/setup-uv@v5
137
+ uses: astral-sh/setup-uv@v6
138
138
  with:
139
139
  enable-cache: true
140
140
  - name: Set up Python ${{ matrix.python-version }}
@@ -158,7 +158,7 @@ jobs:
158
158
  - name: Test with pytest
159
159
  run: just test-no-parallel-ci-http2
160
160
  - name: Upload coverage
161
- uses: codecov/codecov-action@v5
161
+ uses: codecov/codecov-action@v5.4.2
162
162
  with:
163
163
  token: ${{ secrets.CODECOV_TOKEN }}
164
164
  fail_ci_if_error: true
@@ -187,7 +187,7 @@ jobs:
187
187
  - name: install Just
188
188
  uses: taiki-e/install-action@just
189
189
  - name: Install uv
190
- uses: astral-sh/setup-uv@v5
190
+ uses: astral-sh/setup-uv@v6
191
191
  with:
192
192
  enable-cache: true
193
193
  - name: Set up Python
@@ -14,7 +14,7 @@ repos:
14
14
  - id: mypy
15
15
  additional_dependencies: [pydantic, orjson, types-aiofiles, types-ujson]
16
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
17
- rev: v0.11.4
17
+ rev: v0.11.7
18
18
  hooks:
19
19
  - id: ruff
20
20
  args: [--fix, --exit-non-zero-on-fix]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meilisearch-python-sdk
3
- Version: 4.4.0
3
+ Version: 4.6.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
@@ -22,6 +22,7 @@ from meilisearch_python_sdk.models.client import (
22
22
  KeyCreate,
23
23
  KeySearch,
24
24
  KeyUpdate,
25
+ Network,
25
26
  )
26
27
  from meilisearch_python_sdk.models.health import Health
27
28
  from meilisearch_python_sdk.models.index import IndexInfo
@@ -196,12 +197,66 @@ class AsyncClient(BaseClient):
196
197
  """
197
198
  await self.http_client.aclose()
198
199
 
200
+ async def add_or_update_networks(self, *, network: Network) -> Network:
201
+ """Set or update remote networks.
202
+
203
+ Args:
204
+ network: Information to use for the networks.
205
+
206
+ Returns:
207
+ An instance of Network containing the network information.
208
+
209
+ Raises:
210
+ MeilisearchCommunicationError: If there was an error communicating with the server.
211
+ MeilisearchApiError: If the Meilisearch API returned an error.
212
+
213
+ Examples:
214
+ >>> from meilisearch_python_sdk import AsyncClient
215
+ >>> from meilisearch_python_sdk.models.client import Network, Remote
216
+ >>>
217
+ >>>
218
+ >>> network = Network(
219
+ >>> self_="remote_1",
220
+ >>> remotes={
221
+ >>> "remote_1": {"url": "http://localhost:7700", "searchApiKey": "xxxx"},
222
+ >>> "remote_2": {"url": "http://localhost:7720", "searchApiKey": "xxxx"},
223
+ >>> },
224
+ >>> )
225
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
226
+ >>> response = await client.add_or_update_networks(network=network)
227
+ """
228
+ response = await self._http_requests.patch(
229
+ "network", network.model_dump(by_alias=True, exclude_none=True)
230
+ )
231
+
232
+ return Network(**response.json())
233
+
234
+ async def get_networks(self) -> Network:
235
+ """Fetches the remote-networks
236
+
237
+ Returns:
238
+ An instance of Network containing information about each remote.
239
+
240
+ Raises:
241
+ MeilisearchCommunicationError: If there was an error communicating with the server.
242
+ MeilisearchApiError: If the Meilisearch API returned an error.
243
+
244
+ Examples:
245
+ >>> from meilisearch_python_sdk import AsyncClient
246
+ >>>
247
+ >>>
248
+ >>> async with AsyncClient("http://localhost.com", "masterKey") as client:
249
+ >>> response = await client.get_networks()
250
+ """
251
+ response = await self._http_requests.get("network")
252
+
253
+ return Network(**response.json())
254
+
199
255
  async def create_dump(self) -> TaskInfo:
200
256
  """Trigger the creation of a Meilisearch dump.
201
257
 
202
258
  Returns:
203
259
  The details of the task.
204
-
205
260
  Raises:
206
261
  MeilisearchCommunicationError: If there was an error communicating with the server.
207
262
  MeilisearchApiError: If the Meilisearch API returned an error.
@@ -1061,6 +1116,61 @@ class Client(BaseClient):
1061
1116
 
1062
1117
  self._http_requests = HttpRequests(self.http_client, json_handler=self.json_handler)
1063
1118
 
1119
+ def add_or_update_networks(self, *, network: Network) -> Network:
1120
+ """Set or update remote networks.
1121
+
1122
+ Args:
1123
+ network: Information to use for the networks.
1124
+
1125
+ Returns:
1126
+ An instance of Network containing the network information.
1127
+
1128
+ Raises:
1129
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1130
+ MeilisearchApiError: If the Meilisearch API returned an error.
1131
+
1132
+ Examples:
1133
+ >>> from meilisearch_python_sdk import Client
1134
+ >>> from meilisearch_python_sdk.models.client import Network, Remote
1135
+ >>>
1136
+ >>>
1137
+ >>> network = Network(
1138
+ >>> self_="remote_1",
1139
+ >>> remotes={
1140
+ >>> "remote_1": {"url": "http://localhost:7700", "searchApiKey": "xxxx"},
1141
+ >>> "remote_2": {"url": "http://localhost:7720", "searchApiKey": "xxxx"},
1142
+ >>> },
1143
+ >>> )
1144
+ >>> client = Client("http://localhost.com", "masterKey")
1145
+ >>> response = client.add_or_update_networks(network=network)
1146
+ """
1147
+ response = self._http_requests.patch(
1148
+ "network", network.model_dump(by_alias=True, exclude_none=True)
1149
+ )
1150
+
1151
+ return Network(**response.json())
1152
+
1153
+ def get_networks(self) -> Network:
1154
+ """Fetches the remote-networks
1155
+
1156
+ Returns:
1157
+ An instance of Network containing information about each remote.
1158
+
1159
+ Raises:
1160
+ MeilisearchCommunicationError: If there was an error communicating with the server.
1161
+ MeilisearchApiError: If the Meilisearch API returned an error.
1162
+
1163
+ Examples:
1164
+ >>> from meilisearch_python_sdk import AsyncClient
1165
+ >>>
1166
+ >>>
1167
+ >>> client = Client("http://localhost.com", "masterKey")
1168
+ >>> response = client.get_networks()
1169
+ """
1170
+ response = self._http_requests.get("network")
1171
+
1172
+ return Network(**response.json())
1173
+
1064
1174
  def create_dump(self) -> TaskInfo:
1065
1175
  """Trigger the creation of a Meilisearch dump.
1066
1176
 
@@ -0,0 +1 @@
1
+ VERSION = "4.6.0"
@@ -27,8 +27,11 @@ from meilisearch_python_sdk.models.search import (
27
27
  SimilarSearchResults,
28
28
  )
29
29
  from meilisearch_python_sdk.models.settings import (
30
+ CompositeEmbedder,
30
31
  Embedders,
31
32
  Faceting,
33
+ FilterableAttributeFeatures,
34
+ FilterableAttributes,
32
35
  HuggingFaceEmbedder,
33
36
  LocalizedAttributes,
34
37
  MeilisearchSettings,
@@ -990,6 +993,7 @@ class AsyncIndex(_BaseIndex):
990
993
  vector: list[float] | None = None,
991
994
  locales: list[str] | None = None,
992
995
  retrieve_vectors: bool | None = None,
996
+ exhaustive_facet_count: bool | None = None,
993
997
  ) -> FacetSearchResults:
994
998
  """Search the index.
995
999
 
@@ -1043,6 +1047,9 @@ class AsyncIndex(_BaseIndex):
1043
1047
  locales: Specifies the languages for the search. This parameter can only be used with
1044
1048
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
1045
1049
  retrieve_vectors: Return document vector data with search result.
1050
+ exhaustive_facet_count: forcing the facet search to compute the facet counts the same
1051
+ way as the paginated search. This parameter can only be used with Milisearch >=
1052
+ v1.14.0. Defaults to None.
1046
1053
 
1047
1054
  Returns:
1048
1055
  Results of the search
@@ -1091,6 +1098,7 @@ class AsyncIndex(_BaseIndex):
1091
1098
  vector=vector,
1092
1099
  locales=locales,
1093
1100
  retrieve_vectors=retrieve_vectors,
1101
+ exhaustive_facet_count=exhaustive_facet_count,
1094
1102
  )
1095
1103
  search_url = f"{self._base_url_with_uid}/facet-search"
1096
1104
 
@@ -1120,6 +1128,7 @@ class AsyncIndex(_BaseIndex):
1120
1128
  show_ranking_score_details=show_ranking_score_details,
1121
1129
  ranking_score_threshold=ranking_score_threshold,
1122
1130
  vector=vector,
1131
+ exhaustive_facet_count=exhaustive_facet_count,
1123
1132
  )
1124
1133
 
1125
1134
  if self._concurrent_facet_search_plugins:
@@ -1152,6 +1161,7 @@ class AsyncIndex(_BaseIndex):
1152
1161
  show_ranking_score_details=show_ranking_score_details,
1153
1162
  ranking_score_threshold=ranking_score_threshold,
1154
1163
  vector=vector,
1164
+ exhaustive_facet_count=exhaustive_facet_count,
1155
1165
  )
1156
1166
  )
1157
1167
 
@@ -1195,6 +1205,7 @@ class AsyncIndex(_BaseIndex):
1195
1205
  show_ranking_score_details=show_ranking_score_details,
1196
1206
  ranking_score_threshold=ranking_score_threshold,
1197
1207
  vector=vector,
1208
+ exhaustive_facet_count=exhaustive_facet_count,
1198
1209
  )
1199
1210
  )
1200
1211
 
@@ -3568,11 +3579,11 @@ class AsyncIndex(_BaseIndex):
3568
3579
 
3569
3580
  return TaskInfo(**response.json())
3570
3581
 
3571
- async def get_filterable_attributes(self) -> list[str] | None:
3582
+ async def get_filterable_attributes(self) -> list[str] | list[FilterableAttributes] | None:
3572
3583
  """Get filterable attributes of the index.
3573
3584
 
3574
3585
  Returns:
3575
- List containing the filterable attributes of the index.
3586
+ Filterable attributes of the index.
3576
3587
 
3577
3588
  Raises:
3578
3589
  MeilisearchCommunicationError: If there was an error communicating with the server.
@@ -3589,10 +3600,24 @@ class AsyncIndex(_BaseIndex):
3589
3600
  if not response.json():
3590
3601
  return None
3591
3602
 
3592
- return response.json()
3603
+ response_json = response.json()
3604
+
3605
+ if isinstance(response_json[0], str):
3606
+ return response_json
3607
+
3608
+ filterable_attributes = []
3609
+ for r in response_json:
3610
+ filterable_attributes.append(
3611
+ FilterableAttributes(
3612
+ attribute_patterns=r["attributePatterns"],
3613
+ features=FilterableAttributeFeatures(**r["features"]),
3614
+ )
3615
+ )
3616
+
3617
+ return filterable_attributes
3593
3618
 
3594
3619
  async def update_filterable_attributes(
3595
- self, body: list[str], *, compress: bool = False
3620
+ self, body: list[str] | list[FilterableAttributes], *, compress: bool = False
3596
3621
  ) -> TaskInfo:
3597
3622
  """Update filterable attributes of the index.
3598
3623
 
@@ -3613,8 +3638,16 @@ class AsyncIndex(_BaseIndex):
3613
3638
  >>> index = client.index("movies")
3614
3639
  >>> await index.update_filterable_attributes(["genre", "director"])
3615
3640
  """
3641
+ payload: list[str | JsonDict] = []
3642
+
3643
+ for b in body:
3644
+ if isinstance(b, FilterableAttributes):
3645
+ payload.append(b.model_dump(by_alias=True))
3646
+ else:
3647
+ payload.append(b)
3648
+
3616
3649
  response = await self._http_requests.put(
3617
- f"{self._settings_url}/filterable-attributes", body, compress=compress
3650
+ f"{self._settings_url}/filterable-attributes", payload, compress=compress
3618
3651
  )
3619
3652
 
3620
3653
  return TaskInfo(**response.json())
@@ -5292,6 +5325,7 @@ class Index(_BaseIndex):
5292
5325
  vector: list[float] | None = None,
5293
5326
  locales: list[str] | None = None,
5294
5327
  retrieve_vectors: bool | None = None,
5328
+ exhaustive_facet_count: bool | None = None,
5295
5329
  ) -> FacetSearchResults:
5296
5330
  """Search the index.
5297
5331
 
@@ -5345,6 +5379,9 @@ class Index(_BaseIndex):
5345
5379
  locales: Specifies the languages for the search. This parameter can only be used with
5346
5380
  Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick.
5347
5381
  retrieve_vectors: Return document vector data with search result.
5382
+ exhaustive_facet_count: forcing the facet search to compute the facet counts the same
5383
+ way as the paginated search. This parameter can only be used with Milisearch >=
5384
+ v1.14.0. Defaults to None.
5348
5385
 
5349
5386
  Returns:
5350
5387
  Results of the search
@@ -5393,6 +5430,7 @@ class Index(_BaseIndex):
5393
5430
  vector=vector,
5394
5431
  locales=locales,
5395
5432
  retrieve_vectors=retrieve_vectors,
5433
+ exhaustive_facet_count=exhaustive_facet_count,
5396
5434
  )
5397
5435
 
5398
5436
  if self._pre_facet_search_plugins:
@@ -5421,6 +5459,7 @@ class Index(_BaseIndex):
5421
5459
  show_ranking_score_details=show_ranking_score_details,
5422
5460
  ranking_score_threshold=ranking_score_threshold,
5423
5461
  vector=vector,
5462
+ exhaustive_facet_count=exhaustive_facet_count,
5424
5463
  )
5425
5464
 
5426
5465
  response = self._http_requests.post(f"{self._base_url_with_uid}/facet-search", body=body)
@@ -7156,7 +7195,7 @@ class Index(_BaseIndex):
7156
7195
 
7157
7196
  return TaskInfo(**response.json())
7158
7197
 
7159
- def get_filterable_attributes(self) -> list[str] | None:
7198
+ def get_filterable_attributes(self) -> list[str] | list[FilterableAttributes] | None:
7160
7199
  """Get filterable attributes of the index.
7161
7200
 
7162
7201
  Returns:
@@ -7177,9 +7216,25 @@ class Index(_BaseIndex):
7177
7216
  if not response.json():
7178
7217
  return None
7179
7218
 
7180
- return response.json()
7219
+ response_json = response.json()
7220
+
7221
+ if isinstance(response_json[0], str):
7222
+ return response_json
7223
+
7224
+ filterable_attributes = []
7225
+ for r in response_json:
7226
+ filterable_attributes.append(
7227
+ FilterableAttributes(
7228
+ attribute_patterns=r["attributePatterns"],
7229
+ features=FilterableAttributeFeatures(**r["features"]),
7230
+ )
7231
+ )
7181
7232
 
7182
- def update_filterable_attributes(self, body: list[str], *, compress: bool = False) -> TaskInfo:
7233
+ return filterable_attributes
7234
+
7235
+ def update_filterable_attributes(
7236
+ self, body: list[str] | list[FilterableAttributes], *, compress: bool = False
7237
+ ) -> TaskInfo:
7183
7238
  """Update filterable attributes of the index.
7184
7239
 
7185
7240
  Args:
@@ -7199,8 +7254,16 @@ class Index(_BaseIndex):
7199
7254
  >>> index = client.index("movies")
7200
7255
  >>> index.update_filterable_attributes(["genre", "director"])
7201
7256
  """
7257
+ payload: list[str | JsonDict] = []
7258
+
7259
+ for b in body:
7260
+ if isinstance(b, FilterableAttributes):
7261
+ payload.append(b.model_dump(by_alias=True))
7262
+ else:
7263
+ payload.append(b)
7264
+
7202
7265
  response = self._http_requests.put(
7203
- f"{self._settings_url}/filterable-attributes", body, compress=compress
7266
+ f"{self._settings_url}/filterable-attributes", payload, compress=compress
7204
7267
  )
7205
7268
 
7206
7269
  return TaskInfo(**response.json())
@@ -8326,6 +8389,7 @@ def _process_search_parameters(
8326
8389
  hybrid: Hybrid | None = None,
8327
8390
  locales: list[str] | None = None,
8328
8391
  retrieve_vectors: bool | None = None,
8392
+ exhaustive_facet_count: bool | None = None,
8329
8393
  ) -> JsonDict:
8330
8394
  if attributes_to_retrieve is None:
8331
8395
  attributes_to_retrieve = ["*"]
@@ -8377,6 +8441,9 @@ def _process_search_parameters(
8377
8441
  if retrieve_vectors is not None:
8378
8442
  body["retrieveVectors"] = retrieve_vectors
8379
8443
 
8444
+ if exhaustive_facet_count is not None:
8445
+ body["exhaustivefacetCount"] = exhaustive_facet_count
8446
+
8380
8447
  return body
8381
8448
 
8382
8449
 
@@ -8393,7 +8460,12 @@ def _embedder_json_to_embedders_model( # pragma: no cover
8393
8460
 
8394
8461
  embedders: dict[
8395
8462
  str,
8396
- OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder,
8463
+ OpenAiEmbedder
8464
+ | HuggingFaceEmbedder
8465
+ | OllamaEmbedder
8466
+ | RestEmbedder
8467
+ | UserProvidedEmbedder
8468
+ | CompositeEmbedder,
8397
8469
  ] = {}
8398
8470
  for k, v in embedder_json.items():
8399
8471
  if v.get("source") == "openAi":
@@ -8404,6 +8476,8 @@ def _embedder_json_to_embedders_model( # pragma: no cover
8404
8476
  embedders[k] = OllamaEmbedder(**v)
8405
8477
  elif v.get("source") == "rest":
8406
8478
  embedders[k] = RestEmbedder(**v)
8479
+ elif v.get("source") == "composit":
8480
+ embedders[k] = CompositeEmbedder(**v)
8407
8481
  else:
8408
8482
  embedders[k] = UserProvidedEmbedder(**v)
8409
8483
 
@@ -8416,7 +8490,12 @@ def _embedder_json_to_settings_model( # pragma: no cover
8416
8490
  ) -> (
8417
8491
  dict[
8418
8492
  str,
8419
- OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder,
8493
+ OpenAiEmbedder
8494
+ | HuggingFaceEmbedder
8495
+ | OllamaEmbedder
8496
+ | RestEmbedder
8497
+ | UserProvidedEmbedder
8498
+ | CompositeEmbedder,
8420
8499
  ]
8421
8500
  | None
8422
8501
  ):
@@ -8425,7 +8504,12 @@ def _embedder_json_to_settings_model( # pragma: no cover
8425
8504
 
8426
8505
  embedders: dict[
8427
8506
  str,
8428
- OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder,
8507
+ OpenAiEmbedder
8508
+ | HuggingFaceEmbedder
8509
+ | OllamaEmbedder
8510
+ | RestEmbedder
8511
+ | UserProvidedEmbedder
8512
+ | CompositeEmbedder,
8429
8513
  ] = {}
8430
8514
  for k, v in embedder_json.items():
8431
8515
  if v.get("source") == "openAi":
@@ -8436,6 +8520,8 @@ def _embedder_json_to_settings_model( # pragma: no cover
8436
8520
  embedders[k] = OllamaEmbedder(**v)
8437
8521
  elif v.get("source") == "rest":
8438
8522
  embedders[k] = RestEmbedder(**v)
8523
+ elif v.get("source") == "composit":
8524
+ embedders[k] = CompositeEmbedder(**v)
8439
8525
  else:
8440
8526
  embedders[k] = UserProvidedEmbedder(**v)
8441
8527
 
@@ -26,6 +26,9 @@ class Stats(CamelBase):
26
26
  status: Status
27
27
  batch_types: JsonDict | None = Field(None, alias="types")
28
28
  index_uids: JsonDict | None = None
29
+ progress_trace: JsonDict | None = None
30
+ write_channel_congestion: JsonDict | None = None
31
+ internal_database_sizes: JsonDict | None = None
29
32
 
30
33
 
31
34
  class BatchResult(BatchId):
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from collections.abc import Mapping
3
4
  from datetime import datetime
4
5
 
5
6
  import pydantic
@@ -84,3 +85,13 @@ class KeySearch(CamelBase):
84
85
  offset: int
85
86
  limit: int
86
87
  total: int
88
+
89
+
90
+ class Remote(CamelBase):
91
+ url: str | None = None
92
+ search_api_key: str | None = None
93
+
94
+
95
+ class Network(CamelBase):
96
+ self_: str | None = pydantic.Field(None, alias="self")
97
+ remotes: Mapping[str, Remote] | None = None
@@ -68,6 +68,7 @@ class HuggingFaceEmbedder(CamelBase):
68
68
  distribution: Distribution | None = None
69
69
  dimensions: int | None = None
70
70
  binary_quantized: bool | None = None
71
+ pooling: Literal["useModel", "forceMean", "forceCls"] | None = None
71
72
 
72
73
 
73
74
  class OllamaEmbedder(CamelBase):
@@ -105,10 +106,25 @@ class UserProvidedEmbedder(CamelBase):
105
106
  binary_quantized: bool | None = None
106
107
 
107
108
 
109
+ class CompositeEmbedder(CamelBase):
110
+ source: str = "composite"
111
+ search_embedder: (
112
+ OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder
113
+ )
114
+ indexing_embedder: (
115
+ OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder
116
+ )
117
+
118
+
108
119
  class Embedders(CamelBase):
109
120
  embedders: dict[
110
121
  str,
111
- OpenAiEmbedder | HuggingFaceEmbedder | OllamaEmbedder | RestEmbedder | UserProvidedEmbedder,
122
+ OpenAiEmbedder
123
+ | HuggingFaceEmbedder
124
+ | OllamaEmbedder
125
+ | RestEmbedder
126
+ | UserProvidedEmbedder
127
+ | CompositeEmbedder,
112
128
  ]
113
129
 
114
130
 
@@ -122,11 +138,26 @@ class LocalizedAttributes(CamelBase):
122
138
  attribute_patterns: list[str]
123
139
 
124
140
 
141
+ class Filter(CamelBase):
142
+ equality: bool
143
+ comparison: bool
144
+
145
+
146
+ class FilterableAttributeFeatures(CamelBase):
147
+ facet_search: bool
148
+ filter: Filter
149
+
150
+
151
+ class FilterableAttributes(CamelBase):
152
+ attribute_patterns: list[str]
153
+ features: FilterableAttributeFeatures
154
+
155
+
125
156
  class MeilisearchSettings(CamelBase):
126
157
  synonyms: JsonDict | None = None
127
158
  stop_words: list[str] | None = None
128
159
  ranking_rules: list[str] | None = None
129
- filterable_attributes: list[str] | None = None
160
+ filterable_attributes: list[str] | list[FilterableAttributes] | None = None
130
161
  distinct_attribute: str | None = None
131
162
  searchable_attributes: list[str] | None = None
132
163
  displayed_attributes: list[str] | None = None
@@ -146,7 +177,8 @@ class MeilisearchSettings(CamelBase):
146
177
  | HuggingFaceEmbedder
147
178
  | OllamaEmbedder
148
179
  | RestEmbedder
149
- | UserProvidedEmbedder,
180
+ | UserProvidedEmbedder
181
+ | CompositeEmbedder,
150
182
  ]
151
183
  | None
152
184
  ) = None # Optional[Embedders] = None
@@ -41,7 +41,7 @@ all = ["orjson", "ujson"]
41
41
  [dependency-groups]
42
42
  dev = [
43
43
  "mkdocs==1.6.1",
44
- "mkdocs-material==9.6.11",
44
+ "mkdocs-material==9.6.12",
45
45
  "mkdocstrings[python]==0.29.1",
46
46
  "mypy[faster-cache]==1.15.0",
47
47
  "pre-commit==4.2.0",
@@ -49,9 +49,9 @@ dev = [
49
49
  "pytest-cov==6.1.1",
50
50
  "pytest-asyncio==0.26.0",
51
51
  "pytest-xdist==3.6.1",
52
- "ruff==0.11.4",
52
+ "ruff==0.11.8",
53
53
  "types-aiofiles==24.1.0.20250326",
54
- "typing-extensions==4.13.1",
54
+ "typing-extensions==4.13.2",
55
55
  "types-ujson==5.10.0.20250326",
56
56
  "meilisearch==0.34.1",
57
57
  "rich==14.0.0",