meilisearch-python-sdk 3.3.0__py3-none-any.whl → 3.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/_client.py +13 -6
- meilisearch_python_sdk/_version.py +1 -1
- meilisearch_python_sdk/decorators.py +10 -2
- {meilisearch_python_sdk-3.3.0.dist-info → meilisearch_python_sdk-3.4.0.dist-info}/METADATA +2 -2
- {meilisearch_python_sdk-3.3.0.dist-info → meilisearch_python_sdk-3.4.0.dist-info}/RECORD +7 -7
- {meilisearch_python_sdk-3.3.0.dist-info → meilisearch_python_sdk-3.4.0.dist-info}/WHEEL +0 -0
- {meilisearch_python_sdk-3.3.0.dist-info → meilisearch_python_sdk-3.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -150,6 +150,7 @@ class AsyncClient(BaseClient):
|
|
|
150
150
|
verify: str | bool | SSLContext = True,
|
|
151
151
|
custom_headers: dict[str, str] | None = None,
|
|
152
152
|
json_handler: BuiltinHandler | OrjsonHandler | UjsonHandler | None = None,
|
|
153
|
+
http2: bool = False,
|
|
153
154
|
) -> None:
|
|
154
155
|
"""Class initializer.
|
|
155
156
|
|
|
@@ -168,11 +169,12 @@ class AsyncClient(BaseClient):
|
|
|
168
169
|
(uses the json module from the standard library), OrjsonHandler (uses orjson), or
|
|
169
170
|
UjsonHandler (uses ujson). Note that in order use orjson or ujson the corresponding
|
|
170
171
|
extra needs to be included. Default: BuiltinHandler.
|
|
172
|
+
http2: Whether or not to use HTTP/2. Defaults to False.
|
|
171
173
|
"""
|
|
172
174
|
super().__init__(api_key, custom_headers, json_handler)
|
|
173
175
|
|
|
174
176
|
self.http_client = HttpxAsyncClient(
|
|
175
|
-
base_url=url, timeout=timeout, headers=self._headers, verify=verify
|
|
177
|
+
base_url=url, timeout=timeout, headers=self._headers, verify=verify, http2=http2
|
|
176
178
|
)
|
|
177
179
|
self._http_requests = AsyncHttpRequests(self.http_client, json_handler=self.json_handler)
|
|
178
180
|
|
|
@@ -649,8 +651,9 @@ class AsyncClient(BaseClient):
|
|
|
649
651
|
Args:
|
|
650
652
|
|
|
651
653
|
queries: List of SearchParameters
|
|
652
|
-
federation: If included a single search result with hits built from all queries
|
|
653
|
-
parameter can only be used with Meilisearch >= v1.10.0. Defaults
|
|
654
|
+
federation: If included a single search result with hits built from all queries will
|
|
655
|
+
be returned. This parameter can only be used with Meilisearch >= v1.10.0. Defaults
|
|
656
|
+
to None.
|
|
654
657
|
hits_type: Allows for a custom type to be passed to use for hits. Defaults to
|
|
655
658
|
JsonDict
|
|
656
659
|
|
|
@@ -1072,6 +1075,7 @@ class Client(BaseClient):
|
|
|
1072
1075
|
verify: str | bool | SSLContext = True,
|
|
1073
1076
|
custom_headers: dict[str, str] | None = None,
|
|
1074
1077
|
json_handler: BuiltinHandler | OrjsonHandler | UjsonHandler | None = None,
|
|
1078
|
+
http2: bool = False,
|
|
1075
1079
|
) -> None:
|
|
1076
1080
|
"""Class initializer.
|
|
1077
1081
|
|
|
@@ -1090,12 +1094,14 @@ class Client(BaseClient):
|
|
|
1090
1094
|
(uses the json module from the standard library), OrjsonHandler (uses orjson), or
|
|
1091
1095
|
UjsonHandler (uses ujson). Note that in order use orjson or ujson the corresponding
|
|
1092
1096
|
extra needs to be included. Default: BuiltinHandler.
|
|
1097
|
+
http2: If set to True, the client will use HTTP/2. Defaults to False.
|
|
1093
1098
|
"""
|
|
1094
1099
|
super().__init__(api_key, custom_headers, json_handler)
|
|
1095
1100
|
|
|
1096
1101
|
self.http_client = HttpxClient(
|
|
1097
|
-
base_url=url, timeout=timeout, headers=self._headers, verify=verify
|
|
1102
|
+
base_url=url, timeout=timeout, headers=self._headers, verify=verify, http2=http2
|
|
1098
1103
|
)
|
|
1104
|
+
|
|
1099
1105
|
self._http_requests = HttpRequests(self.http_client, json_handler=self.json_handler)
|
|
1100
1106
|
|
|
1101
1107
|
def create_dump(self) -> TaskInfo:
|
|
@@ -1549,8 +1555,9 @@ class Client(BaseClient):
|
|
|
1549
1555
|
Args:
|
|
1550
1556
|
|
|
1551
1557
|
queries: List of SearchParameters
|
|
1552
|
-
federation: If included a single search result with hits built from all queries
|
|
1553
|
-
parameter can only be used with Meilisearch >= v1.10.0. Defaults
|
|
1558
|
+
federation: If included a single search result with hits built from all queries will
|
|
1559
|
+
be returned. This parameter can only be used with Meilisearch >= v1.10.0. Defaults
|
|
1560
|
+
to None.
|
|
1554
1561
|
hits_type: Allows for a custom type to be passed to use for hits. Defaults to
|
|
1555
1562
|
JsonDict
|
|
1556
1563
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "3.
|
|
1
|
+
VERSION = "3.4.0"
|
|
@@ -26,6 +26,7 @@ def async_add_documents(
|
|
|
26
26
|
batch_size: int | None = None,
|
|
27
27
|
primary_key: str | None = None,
|
|
28
28
|
wait_for_task: bool = False,
|
|
29
|
+
verify: bool = True,
|
|
29
30
|
) -> Callable:
|
|
30
31
|
"""Decorator that takes the returned documents from a function and asyncronously adds them to Meilisearch.
|
|
31
32
|
|
|
@@ -42,6 +43,7 @@ def async_add_documents(
|
|
|
42
43
|
Defaults to None.
|
|
43
44
|
wait_for_task: If set to `True` the decorator will wait for the document addition to finish
|
|
44
45
|
indexing before returning, otherwise it will return right away. Default = False.
|
|
46
|
+
verify: If set to `False` the decorator will not verify the SSL certificate of the server.
|
|
45
47
|
|
|
46
48
|
Returns:
|
|
47
49
|
|
|
@@ -89,7 +91,9 @@ def async_add_documents(
|
|
|
89
91
|
)
|
|
90
92
|
return result
|
|
91
93
|
|
|
92
|
-
async with AsyncClient(
|
|
94
|
+
async with AsyncClient(
|
|
95
|
+
connection_info.url, connection_info.api_key, verify=verify
|
|
96
|
+
) as client:
|
|
93
97
|
await _async_add_documents(
|
|
94
98
|
client, index_name, result, batch_size, primary_key, wait_for_task
|
|
95
99
|
)
|
|
@@ -108,6 +112,7 @@ def add_documents(
|
|
|
108
112
|
batch_size: int | None = None,
|
|
109
113
|
primary_key: str | None = None,
|
|
110
114
|
wait_for_task: bool = False,
|
|
115
|
+
verify: bool = True,
|
|
111
116
|
) -> Callable:
|
|
112
117
|
"""Decorator that takes the returned documents from a function and adds them to Meilisearch.
|
|
113
118
|
|
|
@@ -124,6 +129,7 @@ def add_documents(
|
|
|
124
129
|
Defaults to None.
|
|
125
130
|
wait_for_task: If set to `True` the decorator will wait for the document addition to finish
|
|
126
131
|
indexing before returning, otherwise it will return right away. Default = False.
|
|
132
|
+
verify: If set to `False` the decorator will not verify the SSL certificate of the server.
|
|
127
133
|
|
|
128
134
|
Returns:
|
|
129
135
|
|
|
@@ -171,7 +177,9 @@ def add_documents(
|
|
|
171
177
|
)
|
|
172
178
|
return result
|
|
173
179
|
|
|
174
|
-
decorator_client = Client(
|
|
180
|
+
decorator_client = Client(
|
|
181
|
+
url=connection_info.url, api_key=connection_info.api_key, verify=verify
|
|
182
|
+
)
|
|
175
183
|
_add_documents(
|
|
176
184
|
decorator_client,
|
|
177
185
|
index_name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: meilisearch-python-sdk
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.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
|
|
@@ -42,7 +42,7 @@ Requires-Python: >=3.9
|
|
|
42
42
|
Requires-Dist: aiofiles>=0.7
|
|
43
43
|
Requires-Dist: camel-converter>=1.0.0
|
|
44
44
|
Requires-Dist: eval-type-backport>=0.2.0; python_version < '3.10'
|
|
45
|
-
Requires-Dist: httpx>=0.17
|
|
45
|
+
Requires-Dist: httpx[http2]>=0.17
|
|
46
46
|
Requires-Dist: pydantic>=2.0.0
|
|
47
47
|
Requires-Dist: pyjwt>=2.3.0
|
|
48
48
|
Provides-Extra: all
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
meilisearch_python_sdk/__init__.py,sha256=SB0Jlm6FwT13J9xasZKseZzTWBk0hkfe1CWyWmIIZnE,258
|
|
2
|
-
meilisearch_python_sdk/_client.py,sha256=
|
|
2
|
+
meilisearch_python_sdk/_client.py,sha256=8QSMTzpyIZQ9dOIsvhPNtvdbBfIk8e1LCBtE5V9Qdak,70166
|
|
3
3
|
meilisearch_python_sdk/_http_requests.py,sha256=TwpqsOvfgaJ1lQXwam1q1_UC6NvRWy4m9W3c5KNe0RI,6741
|
|
4
4
|
meilisearch_python_sdk/_task.py,sha256=dB0cpX1u7HDM1OW_TC8gSiGJe985bNCz7hPMZW_qogY,12352
|
|
5
5
|
meilisearch_python_sdk/_utils.py,sha256=k6SYMJSiVjfF-vlhQRMaE1ziJsVf5FrL94mFwrMfdLY,957
|
|
6
|
-
meilisearch_python_sdk/_version.py,sha256=
|
|
7
|
-
meilisearch_python_sdk/decorators.py,sha256=
|
|
6
|
+
meilisearch_python_sdk/_version.py,sha256=khmbxbSXtOr6w4Q7KaaU-Qmove9qu95Y6VPgNPeIc6w,18
|
|
7
|
+
meilisearch_python_sdk/decorators.py,sha256=hNrMvuLJKPNQDULkL1yMZYG7A9OVYbT7nass4URtEZM,8684
|
|
8
8
|
meilisearch_python_sdk/errors.py,sha256=0sAKYt47-zFpKsEU6W8Qnvf4uHBynKtlGPpPl-5laSA,2085
|
|
9
9
|
meilisearch_python_sdk/index.py,sha256=2y2_gDuxtflmnduPtm7LdTZzrn-sOvFU0rAZDFmcP6c,326043
|
|
10
10
|
meilisearch_python_sdk/json_handler.py,sha256=q_87zSnJfDNuVEI9cEvuOQOGBC7AGWJMEqCh2kGAAqA,2107
|
|
@@ -20,7 +20,7 @@ meilisearch_python_sdk/models/search.py,sha256=LH64_TunWxfCJOhxMCnFA-bMZOf7fVx6s
|
|
|
20
20
|
meilisearch_python_sdk/models/settings.py,sha256=A8SocaQldrdo1chvxhS522zZR4foJcvZy7Cg2GiBi_M,3968
|
|
21
21
|
meilisearch_python_sdk/models/task.py,sha256=P3NLaZhrY8H02Q9lDEkoq-3Z6_qGESglOxs4dNRyMWg,2100
|
|
22
22
|
meilisearch_python_sdk/models/version.py,sha256=YDu-aj5H-d6nSaWRTXzlwWghmZAoiknaw250UyEd48I,215
|
|
23
|
-
meilisearch_python_sdk-3.
|
|
24
|
-
meilisearch_python_sdk-3.
|
|
25
|
-
meilisearch_python_sdk-3.
|
|
26
|
-
meilisearch_python_sdk-3.
|
|
23
|
+
meilisearch_python_sdk-3.4.0.dist-info/METADATA,sha256=LmLRvyswlZ_4wEMu_5kZw2o-imPfQKHoGUARlNcC248,9710
|
|
24
|
+
meilisearch_python_sdk-3.4.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
25
|
+
meilisearch_python_sdk-3.4.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
|
|
26
|
+
meilisearch_python_sdk-3.4.0.dist-info/RECORD,,
|
|
File without changes
|
{meilisearch_python_sdk-3.3.0.dist-info → meilisearch_python_sdk-3.4.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|