mixpeek 0.17.9__py3-none-any.whl → 0.18.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/_version.py +2 -2
- mixpeek/assets.py +14 -14
- mixpeek/collections.py +10 -10
- mixpeek/{feature_extractors.py → featureextractors.py} +2 -2
- mixpeek/features.py +348 -8
- mixpeek/{ingest_assets.py → ingestassets.py} +6 -6
- mixpeek/namespaces.py +12 -12
- mixpeek/organizations.py +10 -626
- mixpeek/sdk.py +9 -6
- mixpeek/tasks.py +6 -6
- mixpeek/taxonomies.py +686 -0
- mixpeek/{taxonomy_entities.py → taxonomyentities.py} +14 -690
- mixpeek/users.py +626 -0
- {mixpeek-0.17.9.dist-info → mixpeek-0.18.0.dist-info}/METADATA +57 -54
- {mixpeek-0.17.9.dist-info → mixpeek-0.18.0.dist-info}/RECORD +16 -15
- mixpeek/feature_search.py +0 -350
- {mixpeek-0.17.9.dist-info → mixpeek-0.18.0.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: mixpeek
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.18.0
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
5
5
|
Author: Speakeasy
|
6
6
|
Requires-Python: >=3.9
|
@@ -160,36 +160,33 @@ with Mixpeek(
|
|
160
160
|
|
161
161
|
### [assets](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md)
|
162
162
|
|
163
|
-
* [
|
164
|
-
* [
|
165
|
-
* [
|
166
|
-
* [
|
167
|
-
* [
|
168
|
-
* [
|
169
|
-
* [
|
163
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#get) - Get Asset
|
164
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#delete) - Delete Asset
|
165
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#update) - Full Asset Update
|
166
|
+
* [partial_update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#partial_update) - Partial Asset Update
|
167
|
+
* [get_with_features](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#get_with_features) - Get Asset With Features
|
168
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#list) - List Assets
|
169
|
+
* [search](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#search) - Search Assets
|
170
170
|
|
171
171
|
### [collections](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md)
|
172
172
|
|
173
|
-
* [
|
174
|
-
* [
|
175
|
-
* [
|
176
|
-
* [
|
177
|
-
* [
|
173
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#list) - List Collections
|
174
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#create) - Create Collection
|
175
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#delete) - Delete Collection
|
176
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#update) - Update Collection
|
177
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#get) - Get Collection
|
178
178
|
|
179
179
|
### [feature_extractors](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featureextractors/README.md)
|
180
180
|
|
181
|
-
* [
|
182
|
-
|
183
|
-
### [feature_search](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featuresearch/README.md)
|
184
|
-
|
185
|
-
* [search_features_v1_features_search_post](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featuresearch/README.md#search_features_v1_features_search_post) - Search Features
|
181
|
+
* [extract_embeddings](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featureextractors/README.md#extract_embeddings) - Extract Embeddings
|
186
182
|
|
187
183
|
### [features](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md)
|
188
184
|
|
189
|
-
* [
|
190
|
-
* [
|
191
|
-
* [
|
192
|
-
* [
|
185
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#get) - Get Feature
|
186
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#delete) - Delete Feature
|
187
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#update) - Full Feature Update
|
188
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#list) - List Features
|
189
|
+
* [search](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#search) - Search Features
|
193
190
|
|
194
191
|
### [health](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/health/README.md)
|
195
192
|
|
@@ -197,49 +194,55 @@ with Mixpeek(
|
|
197
194
|
|
198
195
|
### [ingest_assets](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingestassets/README.md)
|
199
196
|
|
200
|
-
* [
|
201
|
-
* [
|
202
|
-
* [
|
197
|
+
* [ingest_text](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingestassets/README.md#ingest_text) - Ingest Text
|
198
|
+
* [ingest_video_url](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingestassets/README.md#ingest_video_url) - Ingest Video Url
|
199
|
+
* [ingest_image_url](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingestassets/README.md#ingest_image_url) - Ingest Image Url
|
203
200
|
|
204
201
|
|
205
202
|
### [namespaces](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md)
|
206
203
|
|
207
|
-
* [
|
208
|
-
* [
|
209
|
-
* [
|
210
|
-
* [
|
211
|
-
* [
|
212
|
-
* [
|
204
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#create) - Create Namespace
|
205
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#list) - List Namespaces
|
206
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#delete) - Delete Namespace
|
207
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#update) - Update Namespace
|
208
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#get) - Get Namespace
|
209
|
+
* [list_models](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#list_models) - List Available Models
|
213
210
|
|
214
211
|
### [organizations](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md)
|
215
212
|
|
216
|
-
* [
|
217
|
-
* [
|
218
|
-
* [
|
219
|
-
* [
|
220
|
-
* [
|
221
|
-
* [create_api_key_v1_organizations_users_user_email_api_keys_post](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#create_api_key_v1_organizations_users_user_email_api_keys_post) - Create Api Key
|
222
|
-
* [delete_api_key_v1_organizations_users_user_email_api_keys_key_name_delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#delete_api_key_v1_organizations_users_user_email_api_keys_key_name_delete) - Delete Api Key
|
223
|
-
* [update_api_key_v1_organizations_users_user_email_api_keys_key_name_patch](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#update_api_key_v1_organizations_users_user_email_api_keys_key_name_patch) - Update Api Key
|
213
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#get) - Get Organization
|
214
|
+
* [get_usage](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#get_usage) - Get Usage
|
215
|
+
* [add_user](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#add_user) - Add User
|
216
|
+
* [delete_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#delete_api_key) - Delete Api Key
|
217
|
+
* [update_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#update_api_key) - Update Api Key
|
224
218
|
|
225
219
|
### [tasks](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md)
|
226
220
|
|
227
|
-
* [
|
228
|
-
* [
|
229
|
-
* [
|
221
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md#delete) - Kill Task
|
222
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md#get) - Get Task Information
|
223
|
+
* [list_active](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md#list_active) - List Active Tasks
|
224
|
+
|
225
|
+
### [taxonomies](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomies/README.md)
|
226
|
+
|
227
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomies/README.md#get) - Get Taxonomy
|
228
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomies/README.md#delete) - Delete Taxonomy
|
229
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomies/README.md#update) - Update Taxonomy
|
230
230
|
|
231
231
|
### [taxonomy_entities](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md)
|
232
232
|
|
233
|
-
* [
|
234
|
-
* [
|
235
|
-
* [
|
236
|
-
* [
|
237
|
-
* [
|
238
|
-
* [
|
239
|
-
* [
|
240
|
-
|
241
|
-
|
242
|
-
|
233
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#create) - Create Taxonomy
|
234
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#list) - List Taxonomies
|
235
|
+
* [get_node](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#get_node) - Get Taxonomy Node
|
236
|
+
* [update_node](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#update_node) - Update Node
|
237
|
+
* [classify_features](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#classify_features) - Classify Features against Taxonomy
|
238
|
+
* [list_classifications](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#list_classifications) - List Taxonomy Classifications
|
239
|
+
* [delete_classification](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/taxonomyentities/README.md#delete_classification) - Delete Classifications
|
240
|
+
|
241
|
+
### [users](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/users/README.md)
|
242
|
+
|
243
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/users/README.md#get) - Get User
|
244
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/users/README.md#delete) - Delete User
|
245
|
+
* [create_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/users/README.md#create_api_key) - Create Api Key
|
243
246
|
|
244
247
|
</details>
|
245
248
|
<!-- End Available Resources and Operations [operations] -->
|
@@ -300,7 +303,7 @@ By default, an API error will raise a models.APIError exception, which has the f
|
|
300
303
|
| `.raw_response` | *httpx.Response* | The raw HTTP response |
|
301
304
|
| `.body` | *str* | The response content |
|
302
305
|
|
303
|
-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `
|
306
|
+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_async` method may raise the following exceptions:
|
304
307
|
|
305
308
|
| Error Type | Status Code | Content Type |
|
306
309
|
| -------------------------- | ------------------ | ---------------- |
|
@@ -321,7 +324,7 @@ with Mixpeek(
|
|
321
324
|
res = None
|
322
325
|
try:
|
323
326
|
|
324
|
-
res = mixpeek.organizations.
|
327
|
+
res = mixpeek.organizations.get()
|
325
328
|
|
326
329
|
# Handle response
|
327
330
|
print(res)
|
@@ -3,16 +3,15 @@ mixpeek/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,11
|
|
3
3
|
mixpeek/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
4
4
|
mixpeek/_hooks/sdkhooks.py,sha256=T0xbVPw8mvvFszHZlrZdtFrJBovAqE-JQfw4dS9Xi7Y,2495
|
5
5
|
mixpeek/_hooks/types.py,sha256=Qh9pO5ndynMrWpMLPkJUsOmAJ1AJHntJAXb5Yxe_a4o,2568
|
6
|
-
mixpeek/_version.py,sha256=
|
7
|
-
mixpeek/assets.py,sha256=
|
6
|
+
mixpeek/_version.py,sha256=KuUQQ0Pm5z7zBM0Sad58G9KvG-sY7I50hSN2TTtzcvM,458
|
7
|
+
mixpeek/assets.py,sha256=cggTlrFg6BAlddsB3TJS67XAO7oaaEZxuXE7rac6ASw,75414
|
8
8
|
mixpeek/basesdk.py,sha256=j_PZqE6WgIfx1cPCK5gAVn-rgPy9iLhUN5ELtefoEU0,11976
|
9
|
-
mixpeek/collections.py,sha256=
|
10
|
-
mixpeek/
|
11
|
-
mixpeek/
|
12
|
-
mixpeek/features.py,sha256=dRQMzv1TEEz4ytz1VfjLBAPP7MoLPNVPySj0AQUSeOk,41774
|
9
|
+
mixpeek/collections.py,sha256=mh0ypu89kY78Lnfal7OdBrHsCpJ3O54DVR3ejhD5oSo,49021
|
10
|
+
mixpeek/featureextractors.py,sha256=uMZncapRYj7dM_qAJ5hbT86Uyb9x1N1IraNMupGp7UE,9598
|
11
|
+
mixpeek/features.py,sha256=z_JoaD_k_HNcHLrRpdOxcbnNLUjVljZmpnsbiZLHy3I,58748
|
13
12
|
mixpeek/health.py,sha256=4i7KHGS2bYHCAE0nyHDw5g24MXcTZYVaTviQNKPW5o0,6742
|
14
13
|
mixpeek/httpclient.py,sha256=WDbLpMzo7qmWki_ryOJcCAYNI1T4uyWKV08rRuCdNII,2688
|
15
|
-
mixpeek/
|
14
|
+
mixpeek/ingestassets.py,sha256=yW6eDg9JpSQzWM1Zl-GqDIpacKrUItXBL6LOOaDo8q8,40442
|
16
15
|
mixpeek/models/__init__.py,sha256=tA15wFp9zSk7e76MF48-to5yygR17id6EGWQjXnQ6W4,31191
|
17
16
|
mixpeek/models/actionusage.py,sha256=WAnnBVTeQ9j0dtIrubfyyJQwbBamxManfS8fc2OFNyo,324
|
18
17
|
mixpeek/models/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
|
@@ -168,15 +167,17 @@ mixpeek/models/videodetectsettings.py,sha256=tb_r0ahLA1IejuX5Er0I-N5AFbobL5OW7yH
|
|
168
167
|
mixpeek/models/videoreadsettings.py,sha256=qFtWMM2XXZwlPgB4L-a3fQ3koxDLNtWOcGSkp7FPNdw,2427
|
169
168
|
mixpeek/models/videosettings.py,sha256=sNww8ZgmL4O4pp3wTgp76ZNzA6mC9NtOD2p-sC72pbM,4530
|
170
169
|
mixpeek/models/videotranscriptionsettings.py,sha256=70EN-PX2QiQAQjDLYaV2coUCnVjRJI2Y1pXNQYUBH2g,2471
|
171
|
-
mixpeek/namespaces.py,sha256=
|
172
|
-
mixpeek/organizations.py,sha256=
|
170
|
+
mixpeek/namespaces.py,sha256=ED42wsbEksGpW61sUvtnjJPl8O6ktVE7R7K5ZTHiZko,53848
|
171
|
+
mixpeek/organizations.py,sha256=Q0Nu_eg7bXCZniB0a8Gj7Kt8kRkVLzs5h_-T5w4c1Ic,44795
|
173
172
|
mixpeek/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
174
|
-
mixpeek/sdk.py,sha256=
|
173
|
+
mixpeek/sdk.py,sha256=GfRtkLl__iaA04EY_E9_-ASxvY1Fp2ejYiKBZBARlnc,6071
|
175
174
|
mixpeek/sdkconfiguration.py,sha256=WDFDVblhsi547ZxDPEPR243zKLM1shTDSt9w3nporHc,1703
|
176
|
-
mixpeek/tasks.py,sha256=
|
177
|
-
mixpeek/
|
175
|
+
mixpeek/tasks.py,sha256=tQMg5XUINdXAjbTVbJP63zLfRs5eNl5Fk46onDo5yFo,27602
|
176
|
+
mixpeek/taxonomies.py,sha256=M3q8g39M6VK3saT0sIgjsV5vs-4NO7iKdCJ894VxnLk,29553
|
177
|
+
mixpeek/taxonomyentities.py,sha256=5SpoST9KjU2JQk_kDu6Zbw5rcvarVw_XJjiNXNdYvsQ,74488
|
178
178
|
mixpeek/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
179
179
|
mixpeek/types/basemodel.py,sha256=PexI39iKiOkIlobB8Ueo0yn8PLHp6_wb-WO-zelNDZY,1170
|
180
|
+
mixpeek/users.py,sha256=uAR1mqEMl2srPW44wlQo1UbD4aAXiGbXIe2r3mHKbl0,25634
|
180
181
|
mixpeek/utils/__init__.py,sha256=8npwwHS-7zjVrbkzBGO-Uk4GkjC240PCleMbgPK1Axs,2418
|
181
182
|
mixpeek/utils/annotations.py,sha256=aR7mZG34FzgRdew7WZPYEu9QGBerpuKxCF4sek5Z_5Y,1699
|
182
183
|
mixpeek/utils/enums.py,sha256=VzjeslROrAr2luZOTJlvu-4UlxgTaGOKlRYtJJ7IfyY,1006
|
@@ -192,6 +193,6 @@ mixpeek/utils/security.py,sha256=XoK-R2YMyZtVWQte7FoezfGJS-dea9jz4qQ7w5dwNWc,600
|
|
192
193
|
mixpeek/utils/serializers.py,sha256=BSJT7kBOkNBFyP7KREyMoe14JGbgijD1M6AXFMbdmco,4924
|
193
194
|
mixpeek/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
194
195
|
mixpeek/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs,3428
|
195
|
-
mixpeek-0.
|
196
|
-
mixpeek-0.
|
197
|
-
mixpeek-0.
|
196
|
+
mixpeek-0.18.0.dist-info/METADATA,sha256=s1Kl76TS1orSAJNg0Utli0c-a5ayZsTCJAoEa2X9EuE,20655
|
197
|
+
mixpeek-0.18.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
198
|
+
mixpeek-0.18.0.dist-info/RECORD,,
|
mixpeek/feature_search.py
DELETED
@@ -1,350 +0,0 @@
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
-
|
3
|
-
from .basesdk import BaseSDK
|
4
|
-
from mixpeek import models, utils
|
5
|
-
from mixpeek._hooks import HookContext
|
6
|
-
from mixpeek.types import OptionalNullable, UNSET
|
7
|
-
from mixpeek.utils import get_security_from_env
|
8
|
-
from typing import Any, List, Mapping, Optional, Union
|
9
|
-
|
10
|
-
|
11
|
-
class FeatureSearch(BaseSDK):
|
12
|
-
def search_features_v1_features_search_post(
|
13
|
-
self,
|
14
|
-
*,
|
15
|
-
collections: List[str],
|
16
|
-
offset_position: OptionalNullable[int] = UNSET,
|
17
|
-
page_size: Optional[int] = 10,
|
18
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
19
|
-
queries: OptionalNullable[
|
20
|
-
Union[
|
21
|
-
List[models.SearchModelSearchQuery],
|
22
|
-
List[models.SearchModelSearchQueryTypedDict],
|
23
|
-
]
|
24
|
-
] = UNSET,
|
25
|
-
filters: OptionalNullable[
|
26
|
-
Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
|
27
|
-
] = UNSET,
|
28
|
-
group_by: OptionalNullable[
|
29
|
-
Union[models.GroupByOptions, models.GroupByOptionsTypedDict]
|
30
|
-
] = UNSET,
|
31
|
-
sort: OptionalNullable[
|
32
|
-
Union[models.SortOption, models.SortOptionTypedDict]
|
33
|
-
] = UNSET,
|
34
|
-
select: OptionalNullable[List[str]] = UNSET,
|
35
|
-
reranking_options: OptionalNullable[
|
36
|
-
Union[models.RerankingOptions, models.RerankingOptionsTypedDict]
|
37
|
-
] = UNSET,
|
38
|
-
session_id: OptionalNullable[str] = UNSET,
|
39
|
-
return_url: OptionalNullable[bool] = UNSET,
|
40
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
41
|
-
server_url: Optional[str] = None,
|
42
|
-
timeout_ms: Optional[int] = None,
|
43
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
44
|
-
) -> models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost:
|
45
|
-
r"""Search Features
|
46
|
-
|
47
|
-
This endpoint allows you to search features.
|
48
|
-
|
49
|
-
:param collections: List of Collection names to search within, required
|
50
|
-
:param offset_position: The position to start returning results from. Used for pagination. Does not work with group_by
|
51
|
-
:param page_size: Number of results to return per page.
|
52
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
53
|
-
:param queries: List of search queries to perform. Behavior: - Single query: Results are returned directly from that query - Multiple queries: Results are combined using Reciprocal Rank Fusion (RRF) RRF combines results from multiple queries by: 1. Taking each item's rank position in each result list 2. Re-ranking all items by their combined RRF scores When merging lists from different sources, RRF considers all items that appear in any of the input lists, not just items that appear in all lists. This helps surface items that rank well across multiple queries while reducing the impact of outlier high rankings in single queries. NOTE: If query array is empty, it will return all features.
|
54
|
-
:param filters: Used for filtering across all indexes
|
55
|
-
:param group_by: Grouping options for search results
|
56
|
-
:param sort: List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields.
|
57
|
-
:param select: List of fields to return in results, supports dot notation. If None, all fields are returned.
|
58
|
-
:param reranking_options: Options for ranking the search results, including weights and feedback application
|
59
|
-
:param session_id: Identifier for tracking search session interactions
|
60
|
-
:param return_url: Return the presigned URL for the asset and preview asset, this will introduce additional latency
|
61
|
-
:param retries: Override the default retry configuration for this method
|
62
|
-
:param server_url: Override the default server URL for this method
|
63
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
64
|
-
:param http_headers: Additional headers to set or replace on requests.
|
65
|
-
"""
|
66
|
-
base_url = None
|
67
|
-
url_variables = None
|
68
|
-
if timeout_ms is None:
|
69
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
70
|
-
|
71
|
-
if server_url is not None:
|
72
|
-
base_url = server_url
|
73
|
-
|
74
|
-
request = models.SearchFeaturesV1FeaturesSearchPostRequest(
|
75
|
-
offset_position=offset_position,
|
76
|
-
page_size=page_size,
|
77
|
-
x_namespace=x_namespace,
|
78
|
-
search_request_features=models.SearchRequestFeatures(
|
79
|
-
queries=utils.get_pydantic_model(
|
80
|
-
queries, OptionalNullable[List[models.SearchModelSearchQuery]]
|
81
|
-
),
|
82
|
-
collections=collections,
|
83
|
-
filters=utils.get_pydantic_model(
|
84
|
-
filters, OptionalNullable[models.LogicalOperator]
|
85
|
-
),
|
86
|
-
group_by=utils.get_pydantic_model(
|
87
|
-
group_by, OptionalNullable[models.GroupByOptions]
|
88
|
-
),
|
89
|
-
sort=utils.get_pydantic_model(
|
90
|
-
sort, OptionalNullable[models.SortOption]
|
91
|
-
),
|
92
|
-
select=select,
|
93
|
-
reranking_options=utils.get_pydantic_model(
|
94
|
-
reranking_options, OptionalNullable[models.RerankingOptions]
|
95
|
-
),
|
96
|
-
session_id=session_id,
|
97
|
-
return_url=return_url,
|
98
|
-
),
|
99
|
-
)
|
100
|
-
|
101
|
-
req = self._build_request(
|
102
|
-
method="POST",
|
103
|
-
path="/v1/features/search",
|
104
|
-
base_url=base_url,
|
105
|
-
url_variables=url_variables,
|
106
|
-
request=request,
|
107
|
-
request_body_required=True,
|
108
|
-
request_has_path_params=False,
|
109
|
-
request_has_query_params=True,
|
110
|
-
user_agent_header="user-agent",
|
111
|
-
accept_header_value="application/json",
|
112
|
-
http_headers=http_headers,
|
113
|
-
security=self.sdk_configuration.security,
|
114
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
115
|
-
request.search_request_features,
|
116
|
-
False,
|
117
|
-
False,
|
118
|
-
"json",
|
119
|
-
models.SearchRequestFeatures,
|
120
|
-
),
|
121
|
-
timeout_ms=timeout_ms,
|
122
|
-
)
|
123
|
-
|
124
|
-
if retries == UNSET:
|
125
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
126
|
-
retries = self.sdk_configuration.retry_config
|
127
|
-
|
128
|
-
retry_config = None
|
129
|
-
if isinstance(retries, utils.RetryConfig):
|
130
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
131
|
-
|
132
|
-
http_res = self.do_request(
|
133
|
-
hook_ctx=HookContext(
|
134
|
-
operation_id="search_features_v1_features_search_post",
|
135
|
-
oauth2_scopes=[],
|
136
|
-
security_source=get_security_from_env(
|
137
|
-
self.sdk_configuration.security, models.Security
|
138
|
-
),
|
139
|
-
),
|
140
|
-
request=req,
|
141
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
142
|
-
retry_config=retry_config,
|
143
|
-
)
|
144
|
-
|
145
|
-
data: Any = None
|
146
|
-
if utils.match_response(http_res, "200", "application/json"):
|
147
|
-
return utils.unmarshal_json(
|
148
|
-
http_res.text,
|
149
|
-
models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
|
150
|
-
)
|
151
|
-
if utils.match_response(
|
152
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
153
|
-
):
|
154
|
-
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
155
|
-
raise models.ErrorResponse(data=data)
|
156
|
-
if utils.match_response(http_res, "422", "application/json"):
|
157
|
-
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
158
|
-
raise models.HTTPValidationError(data=data)
|
159
|
-
if utils.match_response(http_res, "500", "application/json"):
|
160
|
-
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
161
|
-
raise models.ErrorResponse(data=data)
|
162
|
-
if utils.match_response(http_res, "4XX", "*"):
|
163
|
-
http_res_text = utils.stream_to_text(http_res)
|
164
|
-
raise models.APIError(
|
165
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
166
|
-
)
|
167
|
-
if utils.match_response(http_res, "5XX", "*"):
|
168
|
-
http_res_text = utils.stream_to_text(http_res)
|
169
|
-
raise models.APIError(
|
170
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
171
|
-
)
|
172
|
-
|
173
|
-
content_type = http_res.headers.get("Content-Type")
|
174
|
-
http_res_text = utils.stream_to_text(http_res)
|
175
|
-
raise models.APIError(
|
176
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
177
|
-
http_res.status_code,
|
178
|
-
http_res_text,
|
179
|
-
http_res,
|
180
|
-
)
|
181
|
-
|
182
|
-
async def search_features_v1_features_search_post_async(
|
183
|
-
self,
|
184
|
-
*,
|
185
|
-
collections: List[str],
|
186
|
-
offset_position: OptionalNullable[int] = UNSET,
|
187
|
-
page_size: Optional[int] = 10,
|
188
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
189
|
-
queries: OptionalNullable[
|
190
|
-
Union[
|
191
|
-
List[models.SearchModelSearchQuery],
|
192
|
-
List[models.SearchModelSearchQueryTypedDict],
|
193
|
-
]
|
194
|
-
] = UNSET,
|
195
|
-
filters: OptionalNullable[
|
196
|
-
Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
|
197
|
-
] = UNSET,
|
198
|
-
group_by: OptionalNullable[
|
199
|
-
Union[models.GroupByOptions, models.GroupByOptionsTypedDict]
|
200
|
-
] = UNSET,
|
201
|
-
sort: OptionalNullable[
|
202
|
-
Union[models.SortOption, models.SortOptionTypedDict]
|
203
|
-
] = UNSET,
|
204
|
-
select: OptionalNullable[List[str]] = UNSET,
|
205
|
-
reranking_options: OptionalNullable[
|
206
|
-
Union[models.RerankingOptions, models.RerankingOptionsTypedDict]
|
207
|
-
] = UNSET,
|
208
|
-
session_id: OptionalNullable[str] = UNSET,
|
209
|
-
return_url: OptionalNullable[bool] = UNSET,
|
210
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
211
|
-
server_url: Optional[str] = None,
|
212
|
-
timeout_ms: Optional[int] = None,
|
213
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
214
|
-
) -> models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost:
|
215
|
-
r"""Search Features
|
216
|
-
|
217
|
-
This endpoint allows you to search features.
|
218
|
-
|
219
|
-
:param collections: List of Collection names to search within, required
|
220
|
-
:param offset_position: The position to start returning results from. Used for pagination. Does not work with group_by
|
221
|
-
:param page_size: Number of results to return per page.
|
222
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
223
|
-
:param queries: List of search queries to perform. Behavior: - Single query: Results are returned directly from that query - Multiple queries: Results are combined using Reciprocal Rank Fusion (RRF) RRF combines results from multiple queries by: 1. Taking each item's rank position in each result list 2. Re-ranking all items by their combined RRF scores When merging lists from different sources, RRF considers all items that appear in any of the input lists, not just items that appear in all lists. This helps surface items that rank well across multiple queries while reducing the impact of outlier high rankings in single queries. NOTE: If query array is empty, it will return all features.
|
224
|
-
:param filters: Used for filtering across all indexes
|
225
|
-
:param group_by: Grouping options for search results
|
226
|
-
:param sort: List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields.
|
227
|
-
:param select: List of fields to return in results, supports dot notation. If None, all fields are returned.
|
228
|
-
:param reranking_options: Options for ranking the search results, including weights and feedback application
|
229
|
-
:param session_id: Identifier for tracking search session interactions
|
230
|
-
:param return_url: Return the presigned URL for the asset and preview asset, this will introduce additional latency
|
231
|
-
:param retries: Override the default retry configuration for this method
|
232
|
-
:param server_url: Override the default server URL for this method
|
233
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
234
|
-
:param http_headers: Additional headers to set or replace on requests.
|
235
|
-
"""
|
236
|
-
base_url = None
|
237
|
-
url_variables = None
|
238
|
-
if timeout_ms is None:
|
239
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
240
|
-
|
241
|
-
if server_url is not None:
|
242
|
-
base_url = server_url
|
243
|
-
|
244
|
-
request = models.SearchFeaturesV1FeaturesSearchPostRequest(
|
245
|
-
offset_position=offset_position,
|
246
|
-
page_size=page_size,
|
247
|
-
x_namespace=x_namespace,
|
248
|
-
search_request_features=models.SearchRequestFeatures(
|
249
|
-
queries=utils.get_pydantic_model(
|
250
|
-
queries, OptionalNullable[List[models.SearchModelSearchQuery]]
|
251
|
-
),
|
252
|
-
collections=collections,
|
253
|
-
filters=utils.get_pydantic_model(
|
254
|
-
filters, OptionalNullable[models.LogicalOperator]
|
255
|
-
),
|
256
|
-
group_by=utils.get_pydantic_model(
|
257
|
-
group_by, OptionalNullable[models.GroupByOptions]
|
258
|
-
),
|
259
|
-
sort=utils.get_pydantic_model(
|
260
|
-
sort, OptionalNullable[models.SortOption]
|
261
|
-
),
|
262
|
-
select=select,
|
263
|
-
reranking_options=utils.get_pydantic_model(
|
264
|
-
reranking_options, OptionalNullable[models.RerankingOptions]
|
265
|
-
),
|
266
|
-
session_id=session_id,
|
267
|
-
return_url=return_url,
|
268
|
-
),
|
269
|
-
)
|
270
|
-
|
271
|
-
req = self._build_request_async(
|
272
|
-
method="POST",
|
273
|
-
path="/v1/features/search",
|
274
|
-
base_url=base_url,
|
275
|
-
url_variables=url_variables,
|
276
|
-
request=request,
|
277
|
-
request_body_required=True,
|
278
|
-
request_has_path_params=False,
|
279
|
-
request_has_query_params=True,
|
280
|
-
user_agent_header="user-agent",
|
281
|
-
accept_header_value="application/json",
|
282
|
-
http_headers=http_headers,
|
283
|
-
security=self.sdk_configuration.security,
|
284
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
285
|
-
request.search_request_features,
|
286
|
-
False,
|
287
|
-
False,
|
288
|
-
"json",
|
289
|
-
models.SearchRequestFeatures,
|
290
|
-
),
|
291
|
-
timeout_ms=timeout_ms,
|
292
|
-
)
|
293
|
-
|
294
|
-
if retries == UNSET:
|
295
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
296
|
-
retries = self.sdk_configuration.retry_config
|
297
|
-
|
298
|
-
retry_config = None
|
299
|
-
if isinstance(retries, utils.RetryConfig):
|
300
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
301
|
-
|
302
|
-
http_res = await self.do_request_async(
|
303
|
-
hook_ctx=HookContext(
|
304
|
-
operation_id="search_features_v1_features_search_post",
|
305
|
-
oauth2_scopes=[],
|
306
|
-
security_source=get_security_from_env(
|
307
|
-
self.sdk_configuration.security, models.Security
|
308
|
-
),
|
309
|
-
),
|
310
|
-
request=req,
|
311
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
312
|
-
retry_config=retry_config,
|
313
|
-
)
|
314
|
-
|
315
|
-
data: Any = None
|
316
|
-
if utils.match_response(http_res, "200", "application/json"):
|
317
|
-
return utils.unmarshal_json(
|
318
|
-
http_res.text,
|
319
|
-
models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
|
320
|
-
)
|
321
|
-
if utils.match_response(
|
322
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
323
|
-
):
|
324
|
-
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
325
|
-
raise models.ErrorResponse(data=data)
|
326
|
-
if utils.match_response(http_res, "422", "application/json"):
|
327
|
-
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
328
|
-
raise models.HTTPValidationError(data=data)
|
329
|
-
if utils.match_response(http_res, "500", "application/json"):
|
330
|
-
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
331
|
-
raise models.ErrorResponse(data=data)
|
332
|
-
if utils.match_response(http_res, "4XX", "*"):
|
333
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
334
|
-
raise models.APIError(
|
335
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
336
|
-
)
|
337
|
-
if utils.match_response(http_res, "5XX", "*"):
|
338
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
339
|
-
raise models.APIError(
|
340
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
341
|
-
)
|
342
|
-
|
343
|
-
content_type = http_res.headers.get("Content-Type")
|
344
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
345
|
-
raise models.APIError(
|
346
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
347
|
-
http_res.status_code,
|
348
|
-
http_res_text,
|
349
|
-
http_res,
|
350
|
-
)
|
File without changes
|