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

@@ -25,6 +25,7 @@ class ClientStats(CamelBase):
25
25
  warn(
26
26
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
27
27
  DeprecationWarning,
28
+ stacklevel=2,
28
29
  )
29
30
 
30
31
  @pydantic.validator("last_update", pre=True)
@@ -53,6 +54,7 @@ class _KeyBase(CamelBase):
53
54
  warn(
54
55
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
55
56
  DeprecationWarning,
57
+ stacklevel=2,
56
58
  )
57
59
 
58
60
  @pydantic.validator("expires_at", pre=True)
@@ -98,6 +100,7 @@ class Key(_KeyBase):
98
100
  warn(
99
101
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
100
102
  DeprecationWarning,
103
+ stacklevel=2,
101
104
  )
102
105
 
103
106
  @pydantic.validator("created_at", pre=True)
@@ -130,6 +133,7 @@ class KeyCreate(CamelBase):
130
133
  warn(
131
134
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
132
135
  DeprecationWarning,
136
+ stacklevel=2,
133
137
  )
134
138
 
135
139
  class Config:
@@ -159,6 +163,7 @@ class KeyUpdate(CamelBase):
159
163
  warn(
160
164
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
161
165
  DeprecationWarning,
166
+ stacklevel=2,
162
167
  )
163
168
 
164
169
  class Config:
@@ -43,6 +43,7 @@ class IndexInfo(IndexBase):
43
43
  warn(
44
44
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
45
45
  DeprecationWarning,
46
+ stacklevel=2,
46
47
  )
47
48
 
48
49
  @pydantic.validator("created_at", pre=True)
@@ -60,7 +60,7 @@ class SearchResults(CamelBase):
60
60
  total_hits: Optional[int] = None
61
61
  page: Optional[int] = None
62
62
  hits_per_page: Optional[int] = None
63
- vector: Optional[List[float]] = None
63
+ semantic_hit_count: Optional[int] = None
64
64
 
65
65
 
66
66
  class SearchResultsWithUID(SearchResults):
@@ -43,6 +43,7 @@ class Faceting(CamelBase):
43
43
  warn(
44
44
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
45
45
  DeprecationWarning,
46
+ stacklevel=2,
46
47
  )
47
48
 
48
49
  @pydantic.validator("sort_facet_values_by") # type: ignore[attr-defined]
@@ -62,12 +63,18 @@ class Pagination(CamelBase):
62
63
  max_total_hits: int
63
64
 
64
65
 
66
+ class Distribution(CamelBase):
67
+ mean: float
68
+ sigma: float
69
+
70
+
65
71
  class OpenAiEmbedder(CamelBase):
66
72
  source: str = "openAi"
67
73
  model: Optional[str] = None # Defaults to text-embedding-ada-002
68
74
  dimensions: Optional[int] = None # Uses the model default
69
75
  api_key: Optional[str] = None # Can be provided through a CLI option or environment variable
70
76
  document_template: Optional[str] = None
77
+ distribution: Optional[Distribution] = None
71
78
 
72
79
 
73
80
  class HuggingFaceEmbedder(CamelBase):
@@ -75,15 +82,45 @@ class HuggingFaceEmbedder(CamelBase):
75
82
  model: Optional[str] = None # Defaults to BAAI/bge-base-en-v1.5
76
83
  revision: Optional[str] = None
77
84
  document_template: Optional[str] = None
85
+ distribution: Optional[Distribution] = None
86
+
87
+
88
+ class OllamaEmbedder(CamelBase):
89
+ source: str = "ollama"
90
+ url: Optional[str] = None
91
+ api_key: Optional[str] = None
92
+ model: str
93
+ document_template: Optional[str] = None
94
+ distribution: Optional[Distribution] = None
95
+
96
+
97
+ class RestEmbedder(CamelBase):
98
+ source: str = "rest"
99
+ url: str
100
+ api_key: Optional[str] = None
101
+ dimensions: int
102
+ document_template: Optional[str] = None
103
+ input_field: Optional[List[str]] = None
104
+ input_type: str = "text"
105
+ query: JsonDict = {}
106
+ path_to_embeddings: Optional[List[str]] = None
107
+ embedding_object: Optional[List[str]] = None
108
+ distribution: Optional[Distribution] = None
78
109
 
79
110
 
80
111
  class UserProvidedEmbedder(CamelBase):
81
112
  source: str = "userProvided"
82
113
  dimensions: int
114
+ distribution: Optional[Distribution] = None
83
115
 
84
116
 
85
117
  class Embedders(CamelBase):
86
- embedders: Dict[str, Union[OpenAiEmbedder, HuggingFaceEmbedder, UserProvidedEmbedder]]
118
+ embedders: Dict[
119
+ str,
120
+ Union[
121
+ OpenAiEmbedder, HuggingFaceEmbedder, OllamaEmbedder, RestEmbedder, UserProvidedEmbedder
122
+ ],
123
+ ]
87
124
 
88
125
 
89
126
  class ProximityPrecision(str, Enum):
@@ -106,7 +143,17 @@ class MeilisearchSettings(CamelBase):
106
143
  proximity_precision: Optional[ProximityPrecision] = None
107
144
  separator_tokens: Optional[List[str]] = None
108
145
  non_separator_tokens: Optional[List[str]] = None
146
+ search_cutoff_ms: Optional[int] = None
109
147
  dictionary: Optional[List[str]] = None
110
148
  embedders: Optional[
111
- Dict[str, Union[OpenAiEmbedder, HuggingFaceEmbedder, UserProvidedEmbedder]]
149
+ Dict[
150
+ str,
151
+ Union[
152
+ OpenAiEmbedder,
153
+ HuggingFaceEmbedder,
154
+ OllamaEmbedder,
155
+ RestEmbedder,
156
+ UserProvidedEmbedder,
157
+ ],
158
+ ]
112
159
  ] = None # Optional[Embedders] = None
@@ -52,6 +52,7 @@ class TaskResult(TaskId):
52
52
  warn(
53
53
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
54
54
  DeprecationWarning,
55
+ stacklevel=2,
55
56
  )
56
57
 
57
58
  @pydantic.validator("enqueued_at", pre=True)
@@ -106,6 +107,7 @@ class TaskInfo(CamelBase):
106
107
  warn(
107
108
  "The use of Pydantic less than version 2 is depreciated and will be removed in a future release",
108
109
  DeprecationWarning,
110
+ stacklevel=2,
109
111
  )
110
112
 
111
113
  @pydantic.validator("enqueued_at", pre=True)
@@ -1,11 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from enum import Enum
4
- from typing import Any, NamedTuple, Protocol, Sequence
4
+ from typing import TYPE_CHECKING, Any, NamedTuple, Protocol, Sequence
5
5
 
6
- from meilisearch_python_sdk.models.search import FacetSearchResults, SearchResults
7
- from meilisearch_python_sdk.models.task import TaskInfo
8
- from meilisearch_python_sdk.types import JsonDict, JsonMapping
6
+ if TYPE_CHECKING: # pragma: no cover
7
+ from meilisearch_python_sdk.models.search import FacetSearchResults, SearchResults
8
+ from meilisearch_python_sdk.models.task import TaskInfo
9
+ from meilisearch_python_sdk.types import JsonDict, JsonMapping
9
10
 
10
11
 
11
12
  class AsyncEvent(Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meilisearch-python-sdk
3
- Version: 2.8.0
3
+ Version: 2.10.0
4
4
  Summary: A Python client providing both async and sync support for the Meilisearch API
5
5
  Home-page: https://github.com/sanders41/meilisearch-python-sdk
6
6
  License: MIT
@@ -36,9 +36,6 @@ Description-Content-Type: text/markdown
36
36
  [![PyPI version](https://badge.fury.io/py/meilisearch-python-sdk.svg)](https://badge.fury.io/py/meilisearch-python-sdk)
37
37
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meilisearch-python-sdk?color=5cc141)](https://github.com/sanders41/meilisearch-python-sdk)
38
38
 
39
- NOTE: This project was previously named `meilisearch-python-async`. Development on
40
- that project continues here under the new name.
41
-
42
39
  Meilisearch Python SDK provides both an async and sync client for the
43
40
  [Meilisearch](https://github.com/meilisearch/meilisearch) API.
44
41
 
@@ -0,0 +1,25 @@
1
+ meilisearch_python_sdk/__init__.py,sha256=SB0Jlm6FwT13J9xasZKseZzTWBk0hkfe1CWyWmIIZnE,258
2
+ meilisearch_python_sdk/_client.py,sha256=uUwIsqr47_a4XaElsP2ew0H-M4VGNHOUNNwNpW9CtYw,66791
3
+ meilisearch_python_sdk/_http_requests.py,sha256=C5_j9zgFrssk7tvw-thp-Z5cqRfE6qrhoI6WfXqMODU,6759
4
+ meilisearch_python_sdk/_task.py,sha256=HiyrLsQn5O2PlnUsKPc0RLSPZnJMIsiwA3WSmFsU2Qk,11874
5
+ meilisearch_python_sdk/_utils.py,sha256=SMoBWDlLtAEtpD8n94CCcHvtBA-HLWyolxPY-n4K_UE,1610
6
+ meilisearch_python_sdk/_version.py,sha256=h6YKmi1GK5rlekO7rYI6OKONU_x5V1Gv-oaaYeapf_w,19
7
+ meilisearch_python_sdk/decorators.py,sha256=KpS5gAgks28BtPMZJumRaXfgXK4A3QNVPR8Z4BpZC0g,8346
8
+ meilisearch_python_sdk/errors.py,sha256=0sAKYt47-zFpKsEU6W8Qnvf4uHBynKtlGPpPl-5laSA,2085
9
+ meilisearch_python_sdk/index.py,sha256=lPT93lKLwutGwVW5mWftzL4axrN1IKbGiALxAlqywNU,315164
10
+ meilisearch_python_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ meilisearch_python_sdk/models/client.py,sha256=Ka-BgBXmWGqwRm95r2y-vJYFm95fgDamXlPXdfBVvzo,5700
12
+ meilisearch_python_sdk/models/documents.py,sha256=1X6y-gPRD1sB8V-2b-c-gOmQEs-yR8e7ZiY5TWwFNBs,236
13
+ meilisearch_python_sdk/models/health.py,sha256=hvruti7ylsk7bAh8RPOhTPcRrjx6MPgdkDFX9vZ5Qks,95
14
+ meilisearch_python_sdk/models/index.py,sha256=ImL8VM5z9bBHkKKWToWZ1RCidQAiu5EbikYjMQYuZt0,2070
15
+ meilisearch_python_sdk/models/search.py,sha256=9c1meU2jREd5zHm3kRpJRZrtbt9b4LcgWtI3SGDjXYI,1858
16
+ meilisearch_python_sdk/models/settings.py,sha256=J3K4_zd2YDrAwSbMJKJ6b3PbsbVFpndhW5w5ES_rROs,4879
17
+ meilisearch_python_sdk/models/task.py,sha256=6wVY6M9HlIjMaMUMq63RbcsnqOBWrDVUBDwGYdhmre8,3749
18
+ meilisearch_python_sdk/models/version.py,sha256=YDu-aj5H-d6nSaWRTXzlwWghmZAoiknaw250UyEd48I,215
19
+ meilisearch_python_sdk/plugins.py,sha256=qfc5smEvOqYV_okdcmnJgDszCzOpmUPG1oA2UYCw5dE,3580
20
+ meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ meilisearch_python_sdk/types.py,sha256=BoZcEdkazGKp3Hh6h5yMDtDBLYjOQjQW3SH0cO8k8kw,173
22
+ meilisearch_python_sdk-2.10.0.dist-info/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
23
+ meilisearch_python_sdk-2.10.0.dist-info/METADATA,sha256=Y1o8wTAxSWThdD-ezMGUOccdyk_zNSb6CWWN5MhFyAQ,8265
24
+ meilisearch_python_sdk-2.10.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
25
+ meilisearch_python_sdk-2.10.0.dist-info/RECORD,,
@@ -1,25 +0,0 @@
1
- meilisearch_python_sdk/__init__.py,sha256=SB0Jlm6FwT13J9xasZKseZzTWBk0hkfe1CWyWmIIZnE,258
2
- meilisearch_python_sdk/_client.py,sha256=FApG3bpJ0A8FVUupE708lkG-xJV05ukDr_PmH2KUwDs,65791
3
- meilisearch_python_sdk/_http_requests.py,sha256=u56JQNDv2jfsAwbm9YlVn8yy_vv6E0ET79nQDxjpU9M,6021
4
- meilisearch_python_sdk/_task.py,sha256=HiyrLsQn5O2PlnUsKPc0RLSPZnJMIsiwA3WSmFsU2Qk,11874
5
- meilisearch_python_sdk/_utils.py,sha256=SMoBWDlLtAEtpD8n94CCcHvtBA-HLWyolxPY-n4K_UE,1610
6
- meilisearch_python_sdk/_version.py,sha256=pqaOv5KRQNjstgj7H87OMN7XK40urPl2P7yYvx8Zee0,18
7
- meilisearch_python_sdk/decorators.py,sha256=4NcMz73vJPiYII1ns5UJpFBqf_thPakypPNSTUD6ypE,8345
8
- meilisearch_python_sdk/errors.py,sha256=0sAKYt47-zFpKsEU6W8Qnvf4uHBynKtlGPpPl-5laSA,2085
9
- meilisearch_python_sdk/index.py,sha256=MXGDb74FSAhVtCM4xKRHZcfq4Nh4s00s4AJjyGBD9X0,297440
10
- meilisearch_python_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- meilisearch_python_sdk/models/client.py,sha256=rJ02cSWnuBpdltFTdgXXwj4IVaoOtwMXnaSnSO8KFrY,5570
12
- meilisearch_python_sdk/models/documents.py,sha256=1X6y-gPRD1sB8V-2b-c-gOmQEs-yR8e7ZiY5TWwFNBs,236
13
- meilisearch_python_sdk/models/health.py,sha256=hvruti7ylsk7bAh8RPOhTPcRrjx6MPgdkDFX9vZ5Qks,95
14
- meilisearch_python_sdk/models/index.py,sha256=aJ8yrXIPlw-bY7zQd2s6F4JJAa7elYS-JJqoanJa5Ck,2044
15
- meilisearch_python_sdk/models/search.py,sha256=hMONu9UIWy19I7l5Qw35yTNk92I-F4QfFUQuZ8rYHBg,1854
16
- meilisearch_python_sdk/models/settings.py,sha256=Ut9BiQ0bGHR_bgiq3-1xmXiSgx-MM4UEL4MQwThAbfI,3717
17
- meilisearch_python_sdk/models/task.py,sha256=5dHFx0G-yajBuX79gjDkDnK7MZrjCI2iKQyLf4J18aw,3697
18
- meilisearch_python_sdk/models/version.py,sha256=YDu-aj5H-d6nSaWRTXzlwWghmZAoiknaw250UyEd48I,215
19
- meilisearch_python_sdk/plugins.py,sha256=AiPGVj1bT6ZIrDXNxKbN6uoEGRX5xX8qiySMPVKsmDU,3515
20
- meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- meilisearch_python_sdk/types.py,sha256=BoZcEdkazGKp3Hh6h5yMDtDBLYjOQjQW3SH0cO8k8kw,173
22
- meilisearch_python_sdk-2.8.0.dist-info/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
23
- meilisearch_python_sdk-2.8.0.dist-info/METADATA,sha256=FlFOUEsLgpspze_zJlQQDOokt8UHvLU_3AQKJCljBo0,8396
24
- meilisearch_python_sdk-2.8.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
25
- meilisearch_python_sdk-2.8.0.dist-info/RECORD,,