mixpeek 0.13.2__py3-none-any.whl → 0.13.3__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.
mixpeek/_version.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "mixpeek"
6
- __version__: str = "0.13.2"
6
+ __version__: str = "0.13.3"
7
7
 
8
8
  try:
9
9
  if __package__ is not None:
@@ -101,7 +101,7 @@ from .embeddingresponse import (
101
101
  EmbeddingResponseTypedDict,
102
102
  EmbeddingTypedDict,
103
103
  )
104
- from .errormessage import ErrorMessage, ErrorMessageTypedDict
104
+ from .errordetail import Details, DetailsTypedDict, ErrorDetail, ErrorDetailTypedDict
105
105
  from .errorresponse import ErrorResponse, ErrorResponseData
106
106
  from .facedetectsettings import FaceDetectSettings, FaceDetectSettingsTypedDict
107
107
  from .featureextractionembeddingrequest import (
@@ -492,6 +492,8 @@ __all__ = [
492
492
  "DeleteUserOrganizationsUsersUserEmailDeleteRequestTypedDict",
493
493
  "DenseEmbedding",
494
494
  "DenseEmbeddingTypedDict",
495
+ "Details",
496
+ "DetailsTypedDict",
495
497
  "Direction",
496
498
  "Embedding",
497
499
  "EmbeddingRequest",
@@ -499,8 +501,8 @@ __all__ = [
499
501
  "EmbeddingResponse",
500
502
  "EmbeddingResponseTypedDict",
501
503
  "EmbeddingTypedDict",
502
- "ErrorMessage",
503
- "ErrorMessageTypedDict",
504
+ "ErrorDetail",
505
+ "ErrorDetailTypedDict",
504
506
  "ErrorResponse",
505
507
  "ErrorResponseData",
506
508
  "FaceDetectSettings",
@@ -0,0 +1,58 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
5
+ from pydantic import model_serializer
6
+ from typing_extensions import NotRequired, TypedDict
7
+
8
+
9
+ class DetailsTypedDict(TypedDict):
10
+ pass
11
+
12
+
13
+ class Details(BaseModel):
14
+ pass
15
+
16
+
17
+ class ErrorDetailTypedDict(TypedDict):
18
+ message: str
19
+ type: str
20
+ details: NotRequired[Nullable[DetailsTypedDict]]
21
+
22
+
23
+ class ErrorDetail(BaseModel):
24
+ message: str
25
+
26
+ type: str
27
+
28
+ details: OptionalNullable[Details] = UNSET
29
+
30
+ @model_serializer(mode="wrap")
31
+ def serialize_model(self, handler):
32
+ optional_fields = ["details"]
33
+ nullable_fields = ["details"]
34
+ null_default_fields = []
35
+
36
+ serialized = handler(self)
37
+
38
+ m = {}
39
+
40
+ for n, f in self.model_fields.items():
41
+ k = f.alias or n
42
+ val = serialized.get(k)
43
+ serialized.pop(k, None)
44
+
45
+ optional_nullable = k in optional_fields and k in nullable_fields
46
+ is_set = (
47
+ self.__pydantic_fields_set__.intersection({n})
48
+ or k in null_default_fields
49
+ ) # pylint: disable=no-member
50
+
51
+ if val is not None and val != UNSET_SENTINEL:
52
+ m[k] = val
53
+ elif val != UNSET_SENTINEL and (
54
+ not k in optional_fields or (optional_nullable and is_set)
55
+ ):
56
+ m[k] = val
57
+
58
+ return m
@@ -1,14 +1,18 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .errormessage import ErrorMessage
4
+ from .errordetail import ErrorDetail
5
5
  from mixpeek import utils
6
- from mixpeek.types import BaseModel, Nullable
7
- from typing import List
6
+ from mixpeek.types import BaseModel
7
+ from typing import Optional
8
8
 
9
9
 
10
10
  class ErrorResponseData(BaseModel):
11
- detail: Nullable[List[ErrorMessage]]
11
+ status: int
12
+
13
+ error: ErrorDetail
14
+
15
+ success: Optional[bool] = False
12
16
 
13
17
 
14
18
  class ErrorResponse(Exception):
mixpeek/sdk.py CHANGED
@@ -6,8 +6,8 @@ from .sdkconfiguration import SDKConfiguration
6
6
  from .utils.logger import Logger, get_default_logger
7
7
  from .utils.retries import RetryConfig
8
8
  import httpx
9
- from mixpeek import models, utils
10
- from mixpeek._hooks import HookContext, SDKHooks
9
+ from mixpeek import utils
10
+ from mixpeek._hooks import SDKHooks
11
11
  from mixpeek.assets import Assets
12
12
  from mixpeek.collections import Collections
13
13
  from mixpeek.featureextractors import FeatureExtractors
@@ -20,7 +20,7 @@ from mixpeek.organizations import Organizations
20
20
  from mixpeek.searchinteractions import SearchInteractions
21
21
  from mixpeek.tasks import Tasks
22
22
  from mixpeek.types import OptionalNullable, UNSET
23
- from typing import Any, Dict, Mapping, Optional
23
+ from typing import Dict, Optional
24
24
 
25
25
 
26
26
  class Mixpeek(BaseSDK):
@@ -133,149 +133,3 @@ class Mixpeek(BaseSDK):
133
133
  async def __aexit__(self, exc_type, exc_val, exc_tb):
134
134
  if self.sdk_configuration.async_client is not None:
135
135
  await self.sdk_configuration.async_client.aclose()
136
-
137
- def debug_openapi_debug_openapi_get(
138
- self,
139
- *,
140
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
141
- server_url: Optional[str] = None,
142
- timeout_ms: Optional[int] = None,
143
- http_headers: Optional[Mapping[str, str]] = None,
144
- ) -> Any:
145
- r"""Debug Openapi
146
-
147
- :param retries: Override the default retry configuration for this method
148
- :param server_url: Override the default server URL for this method
149
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
150
- :param http_headers: Additional headers to set or replace on requests.
151
- """
152
- base_url = None
153
- url_variables = None
154
- if timeout_ms is None:
155
- timeout_ms = self.sdk_configuration.timeout_ms
156
-
157
- if server_url is not None:
158
- base_url = server_url
159
- req = self._build_request(
160
- method="GET",
161
- path="/debug-openapi",
162
- base_url=base_url,
163
- url_variables=url_variables,
164
- request=None,
165
- request_body_required=False,
166
- request_has_path_params=False,
167
- request_has_query_params=False,
168
- user_agent_header="user-agent",
169
- accept_header_value="application/json",
170
- http_headers=http_headers,
171
- timeout_ms=timeout_ms,
172
- )
173
-
174
- if retries == UNSET:
175
- if self.sdk_configuration.retry_config is not UNSET:
176
- retries = self.sdk_configuration.retry_config
177
-
178
- retry_config = None
179
- if isinstance(retries, utils.RetryConfig):
180
- retry_config = (retries, ["429", "500", "502", "503", "504"])
181
-
182
- http_res = self.do_request(
183
- hook_ctx=HookContext(
184
- operation_id="debug_openapi_debug_openapi_get",
185
- oauth2_scopes=[],
186
- security_source=None,
187
- ),
188
- request=req,
189
- error_status_codes=["4XX", "5XX"],
190
- retry_config=retry_config,
191
- )
192
-
193
- if utils.match_response(http_res, "200", "application/json"):
194
- return utils.unmarshal_json(http_res.text, Any)
195
- if utils.match_response(http_res, ["4XX", "5XX"], "*"):
196
- http_res_text = utils.stream_to_text(http_res)
197
- raise models.APIError(
198
- "API error occurred", http_res.status_code, http_res_text, http_res
199
- )
200
-
201
- content_type = http_res.headers.get("Content-Type")
202
- http_res_text = utils.stream_to_text(http_res)
203
- raise models.APIError(
204
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
205
- http_res.status_code,
206
- http_res_text,
207
- http_res,
208
- )
209
-
210
- async def debug_openapi_debug_openapi_get_async(
211
- self,
212
- *,
213
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
214
- server_url: Optional[str] = None,
215
- timeout_ms: Optional[int] = None,
216
- http_headers: Optional[Mapping[str, str]] = None,
217
- ) -> Any:
218
- r"""Debug Openapi
219
-
220
- :param retries: Override the default retry configuration for this method
221
- :param server_url: Override the default server URL for this method
222
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
223
- :param http_headers: Additional headers to set or replace on requests.
224
- """
225
- base_url = None
226
- url_variables = None
227
- if timeout_ms is None:
228
- timeout_ms = self.sdk_configuration.timeout_ms
229
-
230
- if server_url is not None:
231
- base_url = server_url
232
- req = self._build_request_async(
233
- method="GET",
234
- path="/debug-openapi",
235
- base_url=base_url,
236
- url_variables=url_variables,
237
- request=None,
238
- request_body_required=False,
239
- request_has_path_params=False,
240
- request_has_query_params=False,
241
- user_agent_header="user-agent",
242
- accept_header_value="application/json",
243
- http_headers=http_headers,
244
- timeout_ms=timeout_ms,
245
- )
246
-
247
- if retries == UNSET:
248
- if self.sdk_configuration.retry_config is not UNSET:
249
- retries = self.sdk_configuration.retry_config
250
-
251
- retry_config = None
252
- if isinstance(retries, utils.RetryConfig):
253
- retry_config = (retries, ["429", "500", "502", "503", "504"])
254
-
255
- http_res = await self.do_request_async(
256
- hook_ctx=HookContext(
257
- operation_id="debug_openapi_debug_openapi_get",
258
- oauth2_scopes=[],
259
- security_source=None,
260
- ),
261
- request=req,
262
- error_status_codes=["4XX", "5XX"],
263
- retry_config=retry_config,
264
- )
265
-
266
- if utils.match_response(http_res, "200", "application/json"):
267
- return utils.unmarshal_json(http_res.text, Any)
268
- if utils.match_response(http_res, ["4XX", "5XX"], "*"):
269
- http_res_text = await utils.stream_to_text_async(http_res)
270
- raise models.APIError(
271
- "API error occurred", http_res.status_code, http_res_text, http_res
272
- )
273
-
274
- content_type = http_res.headers.get("Content-Type")
275
- http_res_text = await utils.stream_to_text_async(http_res)
276
- raise models.APIError(
277
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
278
- http_res.status_code,
279
- http_res_text,
280
- http_res,
281
- )
@@ -24,9 +24,9 @@ class SDKConfiguration:
24
24
  server_idx: Optional[int] = 0
25
25
  language: str = "python"
26
26
  openapi_doc_version: str = "0.81"
27
- sdk_version: str = "0.13.2"
27
+ sdk_version: str = "0.13.3"
28
28
  gen_version: str = "2.483.6"
29
- user_agent: str = "speakeasy-sdk/python 0.13.2 2.483.6 0.81 mixpeek"
29
+ user_agent: str = "speakeasy-sdk/python 0.13.3 2.483.6 0.81 mixpeek"
30
30
  retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
31
31
  timeout_ms: Optional[int] = None
32
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mixpeek
3
- Version: 0.13.2
3
+ Version: 0.13.3
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Home-page: https://github.com/mixpeek/python-sdk.git
6
6
  Author: Speakeasy
@@ -93,7 +93,7 @@ from mixpeek import Mixpeek
93
93
 
94
94
  with Mixpeek() as mixpeek:
95
95
 
96
- res = mixpeek.debug_openapi_debug_openapi_get()
96
+ res = mixpeek.organizations.get()
97
97
 
98
98
  # Handle response
99
99
  print(res)
@@ -110,7 +110,7 @@ from mixpeek import Mixpeek
110
110
  async def main():
111
111
  async with Mixpeek() as mixpeek:
112
112
 
113
- res = await mixpeek.debug_openapi_debug_openapi_get_async()
113
+ res = await mixpeek.organizations.get_async()
114
114
 
115
115
  # Handle response
116
116
  print(res)
@@ -169,9 +169,6 @@ asyncio.run(main())
169
169
 
170
170
  * [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/interactions/README.md#list) - List Interactions
171
171
 
172
- ### [Mixpeek SDK](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/mixpeek/README.md)
173
-
174
- * [debug_openapi_debug_openapi_get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/mixpeek/README.md#debug_openapi_debug_openapi_get) - Debug Openapi
175
172
 
176
173
  ### [namespaces](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md)
177
174
 
@@ -219,7 +216,7 @@ from mixpeek.utils import BackoffStrategy, RetryConfig
219
216
 
220
217
  with Mixpeek() as mixpeek:
221
218
 
222
- res = mixpeek.debug_openapi_debug_openapi_get(,
219
+ res = mixpeek.organizations.get(,
223
220
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
224
221
 
225
222
  # Handle response
@@ -236,7 +233,7 @@ with Mixpeek(
236
233
  retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
237
234
  ) as mixpeek:
238
235
 
239
- res = mixpeek.debug_openapi_debug_openapi_get()
236
+ res = mixpeek.organizations.get()
240
237
 
241
238
  # Handle response
242
239
  print(res)
@@ -305,7 +302,7 @@ with Mixpeek(
305
302
  server_url="https://api.mixpeek.com/",
306
303
  ) as mixpeek:
307
304
 
308
- res = mixpeek.debug_openapi_debug_openapi_get()
305
+ res = mixpeek.organizations.get()
309
306
 
310
307
  # Handle response
311
308
  print(res)
@@ -4,7 +4,7 @@ mixpeek/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,14
4
4
  mixpeek/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
5
5
  mixpeek/_hooks/sdkhooks.py,sha256=NMqSNr_PmeJuQgXFEntPJElH9a6yfdyvwEQFH0TrunI,2557
6
6
  mixpeek/_hooks/types.py,sha256=Qh9pO5ndynMrWpMLPkJUsOmAJ1AJHntJAXb5Yxe_a4o,2568
7
- mixpeek/_version.py,sha256=4YQR_unUxW-QDYPW6Ffy2ujxAlJIIKFrV2oU_QUspP4,312
7
+ mixpeek/_version.py,sha256=wQsMkTv3rhDhJTSBGLS43K4WzWdWgvPXxZn9wLFYT4E,312
8
8
  mixpeek/assets.py,sha256=gsk0ooJ23drWDZpaQSxL0ywhqyuPbZDHlIZRcXQltrc,66564
9
9
  mixpeek/basesdk.py,sha256=fxyrXntRtoPrRE5iko9Rq1GrhBCk25LTAz-nU4rJSdo,11903
10
10
  mixpeek/collections.py,sha256=OX2dxpTxeFIwcFwPfis676cmi9rQtUX4qopQKdtqnfs,42737
@@ -14,7 +14,7 @@ mixpeek/health.py,sha256=xJkViQaznlRpeAFxgtczAHqJUaGOxVCNq4hEQTo14-0,6521
14
14
  mixpeek/httpclient.py,sha256=WDbLpMzo7qmWki_ryOJcCAYNI1T4uyWKV08rRuCdNII,2688
15
15
  mixpeek/ingest.py,sha256=KFCP0sT7wCOICE-UluGwbNDRRuh_aDKSJliJWTcj7Os,38598
16
16
  mixpeek/interactions.py,sha256=R9KYMosXgR-pvraY8uUNFU1GcI7VrOv6ojLFXZQ1V68,9099
17
- mixpeek/models/__init__.py,sha256=iyzCKB7JLP4pzCkwvGY7gr3PTFaNoXOc4NXjZOW8x3w,27628
17
+ mixpeek/models/__init__.py,sha256=VEwufaogKgNILpf0q5yIE4H3Pw7guSM9h0slDSgbLvo,27689
18
18
  mixpeek/models/actionusage.py,sha256=WAnnBVTeQ9j0dtIrubfyyJQwbBamxManfS8fc2OFNyo,324
19
19
  mixpeek/models/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
20
20
  mixpeek/models/apikey.py,sha256=P99SWsu6wgc6HStE2MteANIGShUkM2dwQnbQvdg5AOc,654
@@ -47,8 +47,8 @@ mixpeek/models/delete_user_organizations_users_user_email_deleteop.py,sha256=pwx
47
47
  mixpeek/models/denseembedding.py,sha256=ECX8Nwo6tD8Qm1WxGPGOy4H8WYLQ6q6VKqbnanT3vlA,413
48
48
  mixpeek/models/embeddingrequest.py,sha256=9Bk67IV1nr-d_UkTXkkL2e2o8Kv-YOHR0O3clHPGVHk,2092
49
49
  mixpeek/models/embeddingresponse.py,sha256=1H6OWwIIO0ktqhmK0mIGdo3Bqv8saM7jFaFlljEZL1g,2223
50
- mixpeek/models/errormessage.py,sha256=BmuIq7QHoCI9VB9QC3t5c6ZxfzK0ORT2sB5F0un1O0c,285
51
- mixpeek/models/errorresponse.py,sha256=-lq07ro9LmnxAZjBLsMmkXvBhLQeCOWnI8jSwf26dck,554
50
+ mixpeek/models/errordetail.py,sha256=j7QNqtNrAHjznF8F-eBuxwEedFhYIqP5YKOyX8dSlcg,1510
51
+ mixpeek/models/errorresponse.py,sha256=YIbCFc44szh_OIUoQ3BByHWouYwa2Tqedm9NJcrNvyQ,582
52
52
  mixpeek/models/facedetectsettings.py,sha256=mU78KWd0x1Uy_8FqyWSWPPJcDbwFhxIcAc1RJeR8uL4,1710
53
53
  mixpeek/models/featureextractionembeddingrequest.py,sha256=fB2P7kPMKu1YSF9S8DgVlmdpcvxfcGsv4-Q8dlo64Jk,1764
54
54
  mixpeek/models/featureresponse.py,sha256=eWsnn1FSccueE9UZOSxVOH_4IimfuKbbsS1bKNPvJhs,2521
@@ -150,8 +150,8 @@ mixpeek/models/videotranscriptionsettings.py,sha256=eIrlsSw5AUA9uE98bXvfIoitK5nu
150
150
  mixpeek/namespaces.py,sha256=22JiWMVxJkNIhJSwyDffPZ9vF8LVuPAYojqNnNCvukg,46270
151
151
  mixpeek/organizations.py,sha256=QaP1Tu2sQWEaGB7ORK1uT-xuG9IQAfVSgLX5ZmbEjUM,59889
152
152
  mixpeek/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
153
- mixpeek/sdk.py,sha256=HZ-ZQUQr7rnAnyKNZ60D3CaUWV4eMjaTs2IPh6AsesY,10741
154
- mixpeek/sdkconfiguration.py,sha256=Y-sCAxQ0JtEg9exvfuZC2ATWcGPNwSgnSucEpjP9Rh4,1406
153
+ mixpeek/sdk.py,sha256=hPCpxWo0Ss9ITkgBSQrKFD-Qy4J79udWlg_FYFRBMZ0,5126
154
+ mixpeek/sdkconfiguration.py,sha256=MbV3dQE5k_iu6cGm-4oi89DJ7SQp25wSFi_brxJKdMg,1406
155
155
  mixpeek/searchinteractions.py,sha256=gO1lk0y28cLuRT6VSprw0dGOBkWryB1fGSqGLzbd00I,27156
156
156
  mixpeek/tasks.py,sha256=AFaqwIhbaI1qItnwW-AJhfLCYEWy8FzSx6dTZXaZyPc,15852
157
157
  mixpeek/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
@@ -171,6 +171,6 @@ mixpeek/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFIdYBX0,551
171
171
  mixpeek/utils/serializers.py,sha256=BSJT7kBOkNBFyP7KREyMoe14JGbgijD1M6AXFMbdmco,4924
172
172
  mixpeek/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
173
173
  mixpeek/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs,3428
174
- mixpeek-0.13.2.dist-info/METADATA,sha256=4u_Yh1xznee2lI1C-0NBa5kwdD1AQs-cB1grv9kDq7Y,18871
175
- mixpeek-0.13.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
176
- mixpeek-0.13.2.dist-info/RECORD,,
174
+ mixpeek-0.13.3.dist-info/METADATA,sha256=rD_2_VC7awsssAX-aWdwIhmHcK2yPbIVGE84lv3Doo0,18540
175
+ mixpeek-0.13.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
176
+ mixpeek-0.13.3.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from mixpeek.types import BaseModel
5
- from typing_extensions import TypedDict
6
-
7
-
8
- class ErrorMessageTypedDict(TypedDict):
9
- msg: str
10
-
11
-
12
- class ErrorMessage(BaseModel):
13
- msg: str