meilisearch-python-sdk 7.3.0__py3-none-any.whl → 7.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.
- meilisearch_python_sdk/_client/_async_client.py +1 -1
- meilisearch_python_sdk/_client/_base_client.py +12 -1
- meilisearch_python_sdk/_client/_client.py +1 -1
- meilisearch_python_sdk/_version.py +1 -1
- {meilisearch_python_sdk-7.3.0.dist-info → meilisearch_python_sdk-7.4.0.dist-info}/METADATA +7 -2
- {meilisearch_python_sdk-7.3.0.dist-info → meilisearch_python_sdk-7.4.0.dist-info}/RECORD +8 -8
- {meilisearch_python_sdk-7.3.0.dist-info → meilisearch_python_sdk-7.4.0.dist-info}/WHEEL +0 -0
- {meilisearch_python_sdk-7.3.0.dist-info → meilisearch_python_sdk-7.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -87,7 +87,7 @@ class AsyncClient(BaseClient):
|
|
|
87
87
|
json_handler: The module to use for json operations. The options are BuiltinHandler
|
|
88
88
|
(uses the json module from the standard library), or OrjsonHandler (uses orjson).
|
|
89
89
|
Note that in order use orjson the corresponding extra needs to be included.
|
|
90
|
-
Default: BuiltinHandler.
|
|
90
|
+
Default: OrjsonHandler if orjson is installed or BuiltinHandler if not.
|
|
91
91
|
http2: Whether or not to use HTTP/2. Defaults to False.
|
|
92
92
|
"""
|
|
93
93
|
super().__init__(api_key, custom_headers, json_handler)
|
|
@@ -11,6 +11,11 @@ from meilisearch_python_sdk.models.client import (
|
|
|
11
11
|
)
|
|
12
12
|
from meilisearch_python_sdk.types import JsonDict
|
|
13
13
|
|
|
14
|
+
try:
|
|
15
|
+
import orjson
|
|
16
|
+
except ImportError: # pragma: no cover
|
|
17
|
+
orjson = None # type: ignore
|
|
18
|
+
|
|
14
19
|
if TYPE_CHECKING:
|
|
15
20
|
from meilisearch_python_sdk.types import JsonMapping
|
|
16
21
|
|
|
@@ -22,7 +27,13 @@ class BaseClient:
|
|
|
22
27
|
custom_headers: dict[str, str] | None = None,
|
|
23
28
|
json_handler: BuiltinHandler | OrjsonHandler | None = None,
|
|
24
29
|
) -> None:
|
|
25
|
-
|
|
30
|
+
if json_handler is not None:
|
|
31
|
+
self.json_handler = json_handler
|
|
32
|
+
elif orjson is not None:
|
|
33
|
+
self.json_handler = OrjsonHandler()
|
|
34
|
+
else:
|
|
35
|
+
self.json_handler = BuiltinHandler()
|
|
36
|
+
|
|
26
37
|
self._headers: dict[str, str] | None = None
|
|
27
38
|
if api_key:
|
|
28
39
|
self._headers = {"Authorization": f"Bearer {api_key}"}
|
|
@@ -88,7 +88,7 @@ class Client(BaseClient):
|
|
|
88
88
|
json_handler: The module to use for json operations. The options are BuiltinHandler
|
|
89
89
|
(uses the json module from the standard library), or OrjsonHandler (uses orjson).
|
|
90
90
|
Note that in order use orjson the corresponding extra needs to be included.
|
|
91
|
-
Default: BuiltinHandler.
|
|
91
|
+
Default: OrjsonHandler if orjson is installed or BuiltinHandler if not.
|
|
92
92
|
http2: If set to True, the client will use HTTP/2. Defaults to False.
|
|
93
93
|
"""
|
|
94
94
|
super().__init__(api_key, custom_headers, json_handler)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "7.
|
|
1
|
+
VERSION = "7.4.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meilisearch-python-sdk
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.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
|
|
@@ -53,7 +53,6 @@ Description-Content-Type: text/markdown
|
|
|
53
53
|
# Meilisearch Python SDK
|
|
54
54
|
|
|
55
55
|
[](https://github.com/sanders41/meilisearch-python-sdk/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
|
|
56
|
-
[](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-sdk/main)
|
|
57
56
|
[](https://codecov.io/gh/sanders41/meilisearch-python-sdk)
|
|
58
57
|
[](https://badge.fury.io/py/meilisearch-python-sdk)
|
|
59
58
|
[](https://github.com/sanders41/meilisearch-python-sdk)
|
|
@@ -77,6 +76,12 @@ environment is created and activated, install the package with:
|
|
|
77
76
|
pip install meilisearch-python-sdk
|
|
78
77
|
```
|
|
79
78
|
|
|
79
|
+
Installing with the orjson extra will make JSON serilization/deserilization faster.
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
pip install meilisearch-python-sdk[orjson]
|
|
83
|
+
```
|
|
84
|
+
|
|
80
85
|
## Run Meilisearch
|
|
81
86
|
|
|
82
87
|
There are several ways to
|
|
@@ -3,7 +3,7 @@ meilisearch_python_sdk/_batch.py,sha256=PQyXyERVQwnxIFMthZ6zVqi2ZbQbMBs6TgUPdLbJ
|
|
|
3
3
|
meilisearch_python_sdk/_http_requests.py,sha256=81UPpbNIHsEUlaue5Cgn8WZ4M6byVcrzA7lAEkcd10I,7852
|
|
4
4
|
meilisearch_python_sdk/_task.py,sha256=lQp2n5ZjD8HboEP6Xid0Z275Jcr4GuXwh_LzpVY5LAo,13189
|
|
5
5
|
meilisearch_python_sdk/_utils.py,sha256=6Yy0tRe6V0kocVmaYb0rO2Hw2GmvEeY_XLY05P5bMq0,4317
|
|
6
|
-
meilisearch_python_sdk/_version.py,sha256=
|
|
6
|
+
meilisearch_python_sdk/_version.py,sha256=SfgjTp9PtjkUwBKjIBXtdYCfwqzAkRbzcf7Cq-wf4W4,18
|
|
7
7
|
meilisearch_python_sdk/decorators.py,sha256=wgznbwCYRc1_nVfQaOgj7DcOMejB9mJIWqltW6CimnY,8836
|
|
8
8
|
meilisearch_python_sdk/errors.py,sha256=8cJpHJbJR7t6Tyt15yXVUpNYKbfWt2HTKiBCISDIBrA,3352
|
|
9
9
|
meilisearch_python_sdk/json_handler.py,sha256=lzwiBP4ASjdBiBLQAjp9akbL-9TnaWnu8Ayy380R_s0,2121
|
|
@@ -11,9 +11,9 @@ meilisearch_python_sdk/plugins.py,sha256=ACk07_3ySHnz_clF3IiJRKeAlSGhpyQfn4taqAo
|
|
|
11
11
|
meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
meilisearch_python_sdk/types.py,sha256=nf-_ZjbPVGdVg-spkfFoaGebQvzmWqiDWuyBwR_qWJk,473
|
|
13
13
|
meilisearch_python_sdk/_client/__init__.py,sha256=ld4FGQM5wt-Ygtt4z4UgZKL8dQ1jY98NY1Fst_-bhA4,164
|
|
14
|
-
meilisearch_python_sdk/_client/_async_client.py,sha256=
|
|
15
|
-
meilisearch_python_sdk/_client/_base_client.py,sha256=
|
|
16
|
-
meilisearch_python_sdk/_client/_client.py,sha256=
|
|
14
|
+
meilisearch_python_sdk/_client/_async_client.py,sha256=TAMXyPlTQRmUYliIZrA8f4HDzxZTnMUIjvQB8eCXsqk,48869
|
|
15
|
+
meilisearch_python_sdk/_client/_base_client.py,sha256=z5YYi_ke6SVd58kwlVTrlbA_2CnxwCMCoMZxJxg8Tuo,4238
|
|
16
|
+
meilisearch_python_sdk/_client/_client.py,sha256=DbQBaCEFKXBrrGWhX7aM6TTO13iwM_4bvcCBltPILDs,47360
|
|
17
17
|
meilisearch_python_sdk/_client/_common.py,sha256=WLssNzHkSRw_j98kTV-qfzqc5AcCZ_Utar2hn2fShso,3141
|
|
18
18
|
meilisearch_python_sdk/index/__init__.py,sha256=sULiCF_Gqa66SDLuyvlHQ1NW-6ch5sWU6UNZ572sdEA,152
|
|
19
19
|
meilisearch_python_sdk/index/_common.py,sha256=zX0vE4C9dMYzijJzGFFVWDy5fw_xwP7ZCJFRMaprT58,11298
|
|
@@ -30,7 +30,7 @@ meilisearch_python_sdk/models/settings.py,sha256=kocYiTiAqPXi6-wCUs0sUkxJouks074
|
|
|
30
30
|
meilisearch_python_sdk/models/task.py,sha256=nDD-S7K-uL4gcYU-tyPstBWcnJi_8MiDwc53GG6i304,1105
|
|
31
31
|
meilisearch_python_sdk/models/version.py,sha256=ISU-ZHgpXLBFDuMpWWfKdVo9Dq1HcD7s6HFnCiGTF8Y,184
|
|
32
32
|
meilisearch_python_sdk/models/webhook.py,sha256=zSkEJJdEflinW3_seJTLQ_ZWs4w-pjTD3SS1ZawC32k,455
|
|
33
|
-
meilisearch_python_sdk-7.
|
|
34
|
-
meilisearch_python_sdk-7.
|
|
35
|
-
meilisearch_python_sdk-7.
|
|
36
|
-
meilisearch_python_sdk-7.
|
|
33
|
+
meilisearch_python_sdk-7.4.0.dist-info/METADATA,sha256=_xbodcFYsBKb5yTZTqY1x66JCFntyYhHDQdOOVWj3wc,9541
|
|
34
|
+
meilisearch_python_sdk-7.4.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
35
|
+
meilisearch_python_sdk-7.4.0.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
|
|
36
|
+
meilisearch_python_sdk-7.4.0.dist-info/RECORD,,
|
|
File without changes
|
{meilisearch_python_sdk-7.3.0.dist-info → meilisearch_python_sdk-7.4.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|