mixpeek 0.8.41__py3-none-any.whl → 0.9.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.
- mixpeek-0.9.0.dist-info/METADATA +356 -0
- mixpeek-0.9.0.dist-info/RECORD +73 -0
- {mixpeek-0.8.41.dist-info → mixpeek-0.9.0.dist-info}/WHEEL +1 -2
- mixpeek-0.9.0.dist-info/licenses/LICENSE +201 -0
- mixpeek_sdk/__init__.py +93 -0
- mixpeek_sdk/_base_client.py +2041 -0
- mixpeek_sdk/_client.py +444 -0
- mixpeek_sdk/_compat.py +219 -0
- mixpeek_sdk/_constants.py +14 -0
- mixpeek_sdk/_exceptions.py +108 -0
- mixpeek_sdk/_files.py +123 -0
- mixpeek_sdk/_models.py +785 -0
- mixpeek_sdk/_qs.py +150 -0
- mixpeek_sdk/_resource.py +43 -0
- mixpeek_sdk/_response.py +826 -0
- mixpeek_sdk/_streaming.py +333 -0
- mixpeek_sdk/_types.py +217 -0
- mixpeek_sdk/_utils/__init__.py +55 -0
- mixpeek_sdk/_utils/_logs.py +25 -0
- mixpeek_sdk/_utils/_proxy.py +62 -0
- mixpeek_sdk/_utils/_reflection.py +42 -0
- mixpeek_sdk/_utils/_streams.py +12 -0
- mixpeek_sdk/_utils/_sync.py +81 -0
- mixpeek_sdk/_utils/_transform.py +382 -0
- mixpeek_sdk/_utils/_typing.py +120 -0
- mixpeek_sdk/_utils/_utils.py +397 -0
- mixpeek_sdk/_version.py +4 -0
- mixpeek_sdk/lib/.keep +4 -0
- mixpeek_sdk/resources/__init__.py +159 -0
- mixpeek_sdk/resources/accounts/__init__.py +33 -0
- mixpeek_sdk/resources/accounts/accounts.py +102 -0
- mixpeek_sdk/resources/accounts/private.py +232 -0
- mixpeek_sdk/resources/agent/__init__.py +33 -0
- mixpeek_sdk/resources/agent/agent.py +225 -0
- mixpeek_sdk/resources/agent/task.py +189 -0
- mixpeek_sdk/resources/collections/__init__.py +33 -0
- mixpeek_sdk/resources/collections/collections.py +459 -0
- mixpeek_sdk/resources/collections/files.py +679 -0
- mixpeek_sdk/resources/describe.py +338 -0
- mixpeek_sdk/resources/embed.py +234 -0
- mixpeek_sdk/resources/indexes.py +506 -0
- mixpeek_sdk/resources/read.py +183 -0
- mixpeek_sdk/resources/recognize.py +183 -0
- mixpeek_sdk/resources/search.py +542 -0
- mixpeek_sdk/resources/tasks.py +294 -0
- mixpeek_sdk/resources/transcribe.py +192 -0
- mixpeek_sdk/types/__init__.py +19 -0
- mixpeek_sdk/types/accounts/__init__.py +6 -0
- mixpeek_sdk/types/accounts/private_update_params.py +25 -0
- mixpeek_sdk/types/accounts/user.py +32 -0
- mixpeek_sdk/types/agent/__init__.py +3 -0
- mixpeek_sdk/types/agent_create_params.py +18 -0
- mixpeek_sdk/types/agentresponse.py +11 -0
- mixpeek_sdk/types/collection_search_params.py +29 -0
- mixpeek_sdk/types/collections/__init__.py +9 -0
- mixpeek_sdk/types/collections/file_create_params.py +31 -0
- mixpeek_sdk/types/collections/file_full_params.py +22 -0
- mixpeek_sdk/types/collections/file_update_params.py +18 -0
- mixpeek_sdk/types/collections/fileresponse.py +23 -0
- mixpeek_sdk/types/collections/groupedfiledata.py +38 -0
- mixpeek_sdk/types/describe_upload_params.py +21 -0
- mixpeek_sdk/types/describe_url_params.py +20 -0
- mixpeek_sdk/types/embed_create_params.py +29 -0
- mixpeek_sdk/types/embeddingresponse.py +15 -0
- mixpeek_sdk/types/index_face_params.py +23 -0
- mixpeek_sdk/types/index_upload_params.py +27 -0
- mixpeek_sdk/types/index_url_params.py +159 -0
- mixpeek_sdk/types/search_text_params.py +45 -0
- mixpeek_sdk/types/search_upload_params.py +25 -0
- mixpeek_sdk/types/search_url_params.py +45 -0
- mixpeek_sdk/types/taskresponse.py +15 -0
- mixpeek_sdk/types/transcribe_url_params.py +18 -0
- mixpeek/__init__.py +0 -1
- mixpeek/client.py +0 -27
- mixpeek/endpoints/collections.py +0 -86
- mixpeek/endpoints/embed.py +0 -66
- mixpeek/endpoints/index.py +0 -51
- mixpeek/endpoints/register.py +0 -34
- mixpeek/endpoints/search.py +0 -67
- mixpeek/endpoints/tasks.py +0 -26
- mixpeek/endpoints/tools.py +0 -138
- mixpeek/exceptions.py +0 -13
- mixpeek-0.8.41.dist-info/METADATA +0 -375
- mixpeek-0.8.41.dist-info/RECORD +0 -15
- mixpeek-0.8.41.dist-info/top_level.txt +0 -1
- /mixpeek/endpoints/__init__.py → /mixpeek_sdk/py.typed +0 -0
@@ -0,0 +1,183 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
8
|
+
from .._utils import strip_not_given
|
9
|
+
from .._compat import cached_property
|
10
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
11
|
+
from .._response import (
|
12
|
+
to_raw_response_wrapper,
|
13
|
+
to_streamed_response_wrapper,
|
14
|
+
async_to_raw_response_wrapper,
|
15
|
+
async_to_streamed_response_wrapper,
|
16
|
+
)
|
17
|
+
from .._base_client import make_request_options
|
18
|
+
|
19
|
+
__all__ = ["RecognizeResource", "AsyncRecognizeResource"]
|
20
|
+
|
21
|
+
|
22
|
+
class RecognizeResource(SyncAPIResource):
|
23
|
+
@cached_property
|
24
|
+
def with_raw_response(self) -> RecognizeResourceWithRawResponse:
|
25
|
+
"""
|
26
|
+
This property can be used as a prefix for any HTTP method call to return the
|
27
|
+
the raw response object instead of the parsed content.
|
28
|
+
|
29
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
30
|
+
"""
|
31
|
+
return RecognizeResourceWithRawResponse(self)
|
32
|
+
|
33
|
+
@cached_property
|
34
|
+
def with_streaming_response(self) -> RecognizeResourceWithStreamingResponse:
|
35
|
+
"""
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
37
|
+
|
38
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
39
|
+
"""
|
40
|
+
return RecognizeResourceWithStreamingResponse(self)
|
41
|
+
|
42
|
+
def create(
|
43
|
+
self,
|
44
|
+
*,
|
45
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
46
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
49
|
+
extra_headers: Headers | None = None,
|
50
|
+
extra_query: Query | None = None,
|
51
|
+
extra_body: Body | None = None,
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
53
|
+
) -> object:
|
54
|
+
"""
|
55
|
+
Test
|
56
|
+
|
57
|
+
Args:
|
58
|
+
index_id: filter by organization
|
59
|
+
|
60
|
+
extra_headers: Send extra headers
|
61
|
+
|
62
|
+
extra_query: Add additional query parameters to the request
|
63
|
+
|
64
|
+
extra_body: Add additional JSON properties to the request
|
65
|
+
|
66
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
67
|
+
"""
|
68
|
+
extra_headers = {
|
69
|
+
**strip_not_given(
|
70
|
+
{
|
71
|
+
"Authorization": authorization,
|
72
|
+
"index-id": index_id,
|
73
|
+
}
|
74
|
+
),
|
75
|
+
**(extra_headers or {}),
|
76
|
+
}
|
77
|
+
return self._post(
|
78
|
+
"/recognize/",
|
79
|
+
options=make_request_options(
|
80
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
81
|
+
),
|
82
|
+
cast_to=object,
|
83
|
+
)
|
84
|
+
|
85
|
+
|
86
|
+
class AsyncRecognizeResource(AsyncAPIResource):
|
87
|
+
@cached_property
|
88
|
+
def with_raw_response(self) -> AsyncRecognizeResourceWithRawResponse:
|
89
|
+
"""
|
90
|
+
This property can be used as a prefix for any HTTP method call to return the
|
91
|
+
the raw response object instead of the parsed content.
|
92
|
+
|
93
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
94
|
+
"""
|
95
|
+
return AsyncRecognizeResourceWithRawResponse(self)
|
96
|
+
|
97
|
+
@cached_property
|
98
|
+
def with_streaming_response(self) -> AsyncRecognizeResourceWithStreamingResponse:
|
99
|
+
"""
|
100
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
101
|
+
|
102
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
103
|
+
"""
|
104
|
+
return AsyncRecognizeResourceWithStreamingResponse(self)
|
105
|
+
|
106
|
+
async def create(
|
107
|
+
self,
|
108
|
+
*,
|
109
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
110
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
111
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
112
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
113
|
+
extra_headers: Headers | None = None,
|
114
|
+
extra_query: Query | None = None,
|
115
|
+
extra_body: Body | None = None,
|
116
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
117
|
+
) -> object:
|
118
|
+
"""
|
119
|
+
Test
|
120
|
+
|
121
|
+
Args:
|
122
|
+
index_id: filter by organization
|
123
|
+
|
124
|
+
extra_headers: Send extra headers
|
125
|
+
|
126
|
+
extra_query: Add additional query parameters to the request
|
127
|
+
|
128
|
+
extra_body: Add additional JSON properties to the request
|
129
|
+
|
130
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
131
|
+
"""
|
132
|
+
extra_headers = {
|
133
|
+
**strip_not_given(
|
134
|
+
{
|
135
|
+
"Authorization": authorization,
|
136
|
+
"index-id": index_id,
|
137
|
+
}
|
138
|
+
),
|
139
|
+
**(extra_headers or {}),
|
140
|
+
}
|
141
|
+
return await self._post(
|
142
|
+
"/recognize/",
|
143
|
+
options=make_request_options(
|
144
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
145
|
+
),
|
146
|
+
cast_to=object,
|
147
|
+
)
|
148
|
+
|
149
|
+
|
150
|
+
class RecognizeResourceWithRawResponse:
|
151
|
+
def __init__(self, recognize: RecognizeResource) -> None:
|
152
|
+
self._recognize = recognize
|
153
|
+
|
154
|
+
self.create = to_raw_response_wrapper(
|
155
|
+
recognize.create,
|
156
|
+
)
|
157
|
+
|
158
|
+
|
159
|
+
class AsyncRecognizeResourceWithRawResponse:
|
160
|
+
def __init__(self, recognize: AsyncRecognizeResource) -> None:
|
161
|
+
self._recognize = recognize
|
162
|
+
|
163
|
+
self.create = async_to_raw_response_wrapper(
|
164
|
+
recognize.create,
|
165
|
+
)
|
166
|
+
|
167
|
+
|
168
|
+
class RecognizeResourceWithStreamingResponse:
|
169
|
+
def __init__(self, recognize: RecognizeResource) -> None:
|
170
|
+
self._recognize = recognize
|
171
|
+
|
172
|
+
self.create = to_streamed_response_wrapper(
|
173
|
+
recognize.create,
|
174
|
+
)
|
175
|
+
|
176
|
+
|
177
|
+
class AsyncRecognizeResourceWithStreamingResponse:
|
178
|
+
def __init__(self, recognize: AsyncRecognizeResource) -> None:
|
179
|
+
self._recognize = recognize
|
180
|
+
|
181
|
+
self.create = async_to_streamed_response_wrapper(
|
182
|
+
recognize.create,
|
183
|
+
)
|