mixpeek 0.15.1__py3-none-any.whl → 0.16.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.
Files changed (84) hide show
  1. mixpeek/_hooks/__init__.py +0 -1
  2. mixpeek/_hooks/sdkhooks.py +0 -2
  3. mixpeek/_version.py +1 -1
  4. mixpeek/assets.py +74 -56
  5. mixpeek/collections.py +46 -40
  6. mixpeek/{featureextractors.py → feature_extractors.py} +6 -6
  7. mixpeek/feature_search.py +330 -0
  8. mixpeek/features.py +44 -356
  9. mixpeek/health.py +3 -15
  10. mixpeek/{ingest.py → ingest_assets.py} +43 -25
  11. mixpeek/models/__init__.py +291 -160
  12. mixpeek/models/assignmentconfig.py +25 -0
  13. mixpeek/models/availablemodels.py +2 -1
  14. mixpeek/models/{availableindexesresponse.py → availablemodelsresponse.py} +8 -4
  15. mixpeek/models/classificationmatch.py +72 -0
  16. mixpeek/models/classificationwithfeature.py +73 -0
  17. mixpeek/models/classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py +73 -0
  18. mixpeek/models/{create_api_key_organizations_users_user_email_api_keys_postop.py → create_api_key_v1_organizations_users_user_email_api_keys_postop.py} +2 -2
  19. mixpeek/models/{create_collection_collections_postop.py → create_collection_v1_collections_postop.py} +2 -2
  20. mixpeek/models/create_taxonomy_v1_entities_taxonomies_postop.py +59 -0
  21. mixpeek/models/createnamespacerequest.py +2 -2
  22. mixpeek/models/{delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py → delete_api_key_v1_organizations_users_user_email_api_keys_key_name_deleteop.py} +2 -2
  23. mixpeek/models/{delete_asset_assets_asset_id_deleteop.py → delete_asset_v1_assets_asset_id_deleteop.py} +2 -2
  24. mixpeek/models/delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py +70 -0
  25. mixpeek/models/{delete_collection_collections_collection_deleteop.py → delete_collection_v1_collections_collection_deleteop.py} +2 -2
  26. mixpeek/models/{delete_feature_features_feature_id_deleteop.py → delete_feature_v1_features_feature_id_deleteop.py} +2 -2
  27. mixpeek/models/{delete_namespace_namespaces_namespace_deleteop.py → delete_namespace_v1_namespaces_namespace_deleteop.py} +2 -2
  28. mixpeek/models/delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py +59 -0
  29. mixpeek/models/{delete_user_organizations_users_user_email_deleteop.py → delete_user_v1_organizations_users_user_email_deleteop.py} +2 -2
  30. mixpeek/models/discoverrequest.py +74 -0
  31. mixpeek/models/embeddingconfig.py +33 -0
  32. mixpeek/models/embeddingrequest.py +40 -7
  33. mixpeek/models/featureoptions.py +25 -0
  34. mixpeek/models/{full_asset_update_assets_asset_id_putop.py → full_asset_update_v1_assets_asset_id_putop.py} +2 -2
  35. mixpeek/models/{full_feature_update_features_feature_id_putop.py → full_feature_update_v1_features_feature_id_putop.py} +2 -2
  36. mixpeek/models/genericsuccessresponse.py +17 -0
  37. mixpeek/models/{get_asset_assets_asset_id_getop.py → get_asset_v1_assets_asset_id_getop.py} +2 -2
  38. mixpeek/models/{get_asset_with_features_assets_asset_id_features_getop.py → get_asset_with_features_v1_assets_asset_id_features_getop.py} +2 -2
  39. mixpeek/models/{get_collection_collections_collection_getop.py → get_collection_v1_collections_collection_getop.py} +2 -2
  40. mixpeek/models/{get_feature_features_feature_id_getop.py → get_feature_v1_features_feature_id_getop.py} +2 -2
  41. mixpeek/models/{get_namespace_namespaces_namespace_getop.py → get_namespace_v1_namespaces_namespace_getop.py} +2 -2
  42. mixpeek/models/{get_task_tasks_task_id_getop.py → get_task_v1_tasks_task_id_getop.py} +2 -2
  43. mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +59 -0
  44. mixpeek/models/get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py +59 -0
  45. mixpeek/models/{get_user_organizations_users_user_email_getop.py → get_user_v1_organizations_users_user_email_getop.py} +2 -2
  46. mixpeek/models/{ingest_image_url_ingest_images_url_postop.py → ingest_image_url_v1_ingest_images_url_postop.py} +2 -2
  47. mixpeek/models/{ingest_text_ingest_text_postop.py → ingest_text_v1_ingest_text_postop.py} +2 -2
  48. mixpeek/models/{ingest_video_url_ingest_videos_url_postop.py → ingest_video_url_v1_ingest_videos_url_postop.py} +2 -2
  49. mixpeek/models/{kill_task_tasks_task_id_deleteop.py → kill_task_v1_tasks_task_id_deleteop.py} +2 -2
  50. mixpeek/models/{list_assets_assets_postop.py → list_assets_v1_assets_postop.py} +2 -2
  51. mixpeek/models/list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py +92 -0
  52. mixpeek/models/{list_collections_collections_getop.py → list_collections_v1_collections_getop.py} +2 -2
  53. mixpeek/models/{list_features_features_postop.py → list_features_v1_features_postop.py} +2 -2
  54. mixpeek/models/list_taxonomies_v1_entities_taxonomies_getop.py +67 -0
  55. mixpeek/models/listclassificationsrequest.py +69 -0
  56. mixpeek/models/listclassificationsresponse.py +31 -0
  57. mixpeek/models/listtaxonomiesresponse.py +24 -0
  58. mixpeek/models/modeldetails.py +9 -5
  59. mixpeek/models/nodeoptions.py +16 -0
  60. mixpeek/models/nodeupdate.py +51 -0
  61. mixpeek/models/{partial_asset_update_assets_asset_id_patchop.py → partial_asset_update_v1_assets_asset_id_patchop.py} +2 -2
  62. mixpeek/models/permission.py +12 -0
  63. mixpeek/models/{search_assets_assets_search_postop.py → search_assets_v1_assets_search_postop.py} +2 -2
  64. mixpeek/models/{search_features_features_search_postop.py → search_features_v1_features_search_postop.py} +4 -4
  65. mixpeek/models/taxonomycreate.py +20 -0
  66. mixpeek/models/taxonomymodel.py +27 -0
  67. mixpeek/models/taxonomynode.py +101 -0
  68. mixpeek/models/taxonomynodecreate.py +63 -0
  69. mixpeek/models/taxonomyupdate.py +55 -0
  70. mixpeek/models/{update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py → update_api_key_v1_organizations_users_user_email_api_keys_key_name_patchop.py} +2 -2
  71. mixpeek/models/{update_collection_collections_collection_putop.py → update_collection_v1_collections_collection_putop.py} +2 -2
  72. mixpeek/models/{update_namespace_namespaces_namespace_putop.py → update_namespace_v1_namespaces_namespace_putop.py} +2 -2
  73. mixpeek/models/update_node_v1_entities_taxonomies_nodes_node_patchop.py +71 -0
  74. mixpeek/models/update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py +71 -0
  75. mixpeek/models/vectormodel.py +1 -0
  76. mixpeek/namespaces.py +56 -56
  77. mixpeek/organizations.py +82 -58
  78. mixpeek/sdk.py +12 -6
  79. mixpeek/sdkconfiguration.py +4 -4
  80. mixpeek/tasks.py +22 -16
  81. mixpeek/taxonomy_entities.py +2214 -0
  82. {mixpeek-0.15.1.dist-info → mixpeek-0.16.0.dist-info}/METADATA +64 -49
  83. {mixpeek-0.15.1.dist-info → mixpeek-0.16.0.dist-info}/RECORD +84 -55
  84. {mixpeek-0.15.1.dist-info → mixpeek-0.16.0.dist-info}/WHEEL +1 -1
mixpeek/health.py CHANGED
@@ -5,7 +5,7 @@ from mixpeek import models, utils
5
5
  from mixpeek._hooks import HookContext
6
6
  from mixpeek.types import OptionalNullable, UNSET
7
7
  from mixpeek.utils import get_security_from_env
8
- from typing import Any, Mapping, Optional
8
+ from typing import Mapping, Optional
9
9
 
10
10
 
11
11
  class Health(BaseSDK):
@@ -64,18 +64,12 @@ class Health(BaseSDK):
64
64
  ),
65
65
  ),
66
66
  request=req,
67
- error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
67
+ error_status_codes=["4XX", "5XX"],
68
68
  retry_config=retry_config,
69
69
  )
70
70
 
71
- data: Any = None
72
71
  if utils.match_response(http_res, "200", "application/json"):
73
72
  return utils.unmarshal_json(http_res.text, models.HealthCheckResponse)
74
- if utils.match_response(
75
- http_res, ["400", "401", "403", "404", "500"], "application/json"
76
- ):
77
- data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
78
- raise models.ErrorResponse(data=data)
79
73
  if utils.match_response(http_res, ["4XX", "5XX"], "*"):
80
74
  http_res_text = utils.stream_to_text(http_res)
81
75
  raise models.APIError(
@@ -146,18 +140,12 @@ class Health(BaseSDK):
146
140
  ),
147
141
  ),
148
142
  request=req,
149
- error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
143
+ error_status_codes=["4XX", "5XX"],
150
144
  retry_config=retry_config,
151
145
  )
152
146
 
153
- data: Any = None
154
147
  if utils.match_response(http_res, "200", "application/json"):
155
148
  return utils.unmarshal_json(http_res.text, models.HealthCheckResponse)
156
- if utils.match_response(
157
- http_res, ["400", "401", "403", "404", "500"], "application/json"
158
- ):
159
- data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
160
- raise models.ErrorResponse(data=data)
161
149
  if utils.match_response(http_res, ["4XX", "5XX"], "*"):
162
150
  http_res_text = await utils.stream_to_text_async(http_res)
163
151
  raise models.APIError(
@@ -8,8 +8,8 @@ from mixpeek.utils import get_security_from_env
8
8
  from typing import Any, List, Mapping, Optional, Union
9
9
 
10
10
 
11
- class Ingest(BaseSDK):
12
- def text(
11
+ class IngestAssets(BaseSDK):
12
+ def ingest_text_v1_ingest_text_post(
13
13
  self,
14
14
  *,
15
15
  collection: str,
@@ -34,6 +34,9 @@ class Ingest(BaseSDK):
34
34
  ) -> models.TaskResponse:
35
35
  r"""Ingest Text
36
36
 
37
+ **Requirements:**
38
+ - Required permissions: write
39
+
37
40
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
38
41
  :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.
39
42
  :param asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
@@ -53,7 +56,7 @@ class Ingest(BaseSDK):
53
56
  if server_url is not None:
54
57
  base_url = server_url
55
58
 
56
- request = models.IngestTextIngestTextPostRequest(
59
+ request = models.IngestTextV1IngestTextPostRequest(
57
60
  x_namespace=x_namespace,
58
61
  process_text_input=models.ProcessTextInput(
59
62
  collection=collection,
@@ -72,7 +75,7 @@ class Ingest(BaseSDK):
72
75
 
73
76
  req = self._build_request(
74
77
  method="POST",
75
- path="/ingest/text",
78
+ path="/v1/ingest/text",
76
79
  base_url=base_url,
77
80
  url_variables=url_variables,
78
81
  request=request,
@@ -103,7 +106,7 @@ class Ingest(BaseSDK):
103
106
 
104
107
  http_res = self.do_request(
105
108
  hook_ctx=HookContext(
106
- operation_id="ingest_text_ingest_text_post",
109
+ operation_id="ingest_text_v1_ingest_text_post",
107
110
  oauth2_scopes=[],
108
111
  security_source=get_security_from_env(
109
112
  self.sdk_configuration.security, models.Security
@@ -140,7 +143,7 @@ class Ingest(BaseSDK):
140
143
  http_res,
141
144
  )
142
145
 
143
- async def text_async(
146
+ async def ingest_text_v1_ingest_text_post_async(
144
147
  self,
145
148
  *,
146
149
  collection: str,
@@ -165,6 +168,9 @@ class Ingest(BaseSDK):
165
168
  ) -> models.TaskResponse:
166
169
  r"""Ingest Text
167
170
 
171
+ **Requirements:**
172
+ - Required permissions: write
173
+
168
174
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
169
175
  :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.
170
176
  :param asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
@@ -184,7 +190,7 @@ class Ingest(BaseSDK):
184
190
  if server_url is not None:
185
191
  base_url = server_url
186
192
 
187
- request = models.IngestTextIngestTextPostRequest(
193
+ request = models.IngestTextV1IngestTextPostRequest(
188
194
  x_namespace=x_namespace,
189
195
  process_text_input=models.ProcessTextInput(
190
196
  collection=collection,
@@ -203,7 +209,7 @@ class Ingest(BaseSDK):
203
209
 
204
210
  req = self._build_request_async(
205
211
  method="POST",
206
- path="/ingest/text",
212
+ path="/v1/ingest/text",
207
213
  base_url=base_url,
208
214
  url_variables=url_variables,
209
215
  request=request,
@@ -234,7 +240,7 @@ class Ingest(BaseSDK):
234
240
 
235
241
  http_res = await self.do_request_async(
236
242
  hook_ctx=HookContext(
237
- operation_id="ingest_text_ingest_text_post",
243
+ operation_id="ingest_text_v1_ingest_text_post",
238
244
  oauth2_scopes=[],
239
245
  security_source=get_security_from_env(
240
246
  self.sdk_configuration.security, models.Security
@@ -271,7 +277,7 @@ class Ingest(BaseSDK):
271
277
  http_res,
272
278
  )
273
279
 
274
- def video_from_url(
280
+ def ingest_video_url_v1_ingest_videos_url_post(
275
281
  self,
276
282
  *,
277
283
  url: str,
@@ -297,6 +303,9 @@ class Ingest(BaseSDK):
297
303
  ) -> models.TaskResponse:
298
304
  r"""Ingest Video Url
299
305
 
306
+ **Requirements:**
307
+ - Required permissions: write
308
+
300
309
  :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
301
310
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
302
311
  :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.
@@ -317,7 +326,7 @@ class Ingest(BaseSDK):
317
326
  if server_url is not None:
318
327
  base_url = server_url
319
328
 
320
- request = models.IngestVideoURLIngestVideosURLPostRequest(
329
+ request = models.IngestVideoURLV1IngestVideosURLPostRequest(
321
330
  x_namespace=x_namespace,
322
331
  process_video_url_input=models.ProcessVideoURLInput(
323
332
  url=url,
@@ -337,7 +346,7 @@ class Ingest(BaseSDK):
337
346
 
338
347
  req = self._build_request(
339
348
  method="POST",
340
- path="/ingest/videos/url",
349
+ path="/v1/ingest/videos/url",
341
350
  base_url=base_url,
342
351
  url_variables=url_variables,
343
352
  request=request,
@@ -368,7 +377,7 @@ class Ingest(BaseSDK):
368
377
 
369
378
  http_res = self.do_request(
370
379
  hook_ctx=HookContext(
371
- operation_id="ingest_video_url_ingest_videos_url_post",
380
+ operation_id="ingest_video_url_v1_ingest_videos_url_post",
372
381
  oauth2_scopes=[],
373
382
  security_source=get_security_from_env(
374
383
  self.sdk_configuration.security, models.Security
@@ -405,7 +414,7 @@ class Ingest(BaseSDK):
405
414
  http_res,
406
415
  )
407
416
 
408
- async def video_from_url_async(
417
+ async def ingest_video_url_v1_ingest_videos_url_post_async(
409
418
  self,
410
419
  *,
411
420
  url: str,
@@ -431,6 +440,9 @@ class Ingest(BaseSDK):
431
440
  ) -> models.TaskResponse:
432
441
  r"""Ingest Video Url
433
442
 
443
+ **Requirements:**
444
+ - Required permissions: write
445
+
434
446
  :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
435
447
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
436
448
  :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.
@@ -451,7 +463,7 @@ class Ingest(BaseSDK):
451
463
  if server_url is not None:
452
464
  base_url = server_url
453
465
 
454
- request = models.IngestVideoURLIngestVideosURLPostRequest(
466
+ request = models.IngestVideoURLV1IngestVideosURLPostRequest(
455
467
  x_namespace=x_namespace,
456
468
  process_video_url_input=models.ProcessVideoURLInput(
457
469
  url=url,
@@ -471,7 +483,7 @@ class Ingest(BaseSDK):
471
483
 
472
484
  req = self._build_request_async(
473
485
  method="POST",
474
- path="/ingest/videos/url",
486
+ path="/v1/ingest/videos/url",
475
487
  base_url=base_url,
476
488
  url_variables=url_variables,
477
489
  request=request,
@@ -502,7 +514,7 @@ class Ingest(BaseSDK):
502
514
 
503
515
  http_res = await self.do_request_async(
504
516
  hook_ctx=HookContext(
505
- operation_id="ingest_video_url_ingest_videos_url_post",
517
+ operation_id="ingest_video_url_v1_ingest_videos_url_post",
506
518
  oauth2_scopes=[],
507
519
  security_source=get_security_from_env(
508
520
  self.sdk_configuration.security, models.Security
@@ -539,7 +551,7 @@ class Ingest(BaseSDK):
539
551
  http_res,
540
552
  )
541
553
 
542
- def image_url(
554
+ def ingest_image_url_v1_ingest_images_url_post(
543
555
  self,
544
556
  *,
545
557
  url: str,
@@ -565,6 +577,9 @@ class Ingest(BaseSDK):
565
577
  ) -> models.TaskResponse:
566
578
  r"""Ingest Image Url
567
579
 
580
+ **Requirements:**
581
+ - Required permissions: write
582
+
568
583
  :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
569
584
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
570
585
  :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.
@@ -585,7 +600,7 @@ class Ingest(BaseSDK):
585
600
  if server_url is not None:
586
601
  base_url = server_url
587
602
 
588
- request = models.IngestImageURLIngestImagesURLPostRequest(
603
+ request = models.IngestImageURLV1IngestImagesURLPostRequest(
589
604
  x_namespace=x_namespace,
590
605
  process_image_url_input=models.ProcessImageURLInput(
591
606
  url=url,
@@ -605,7 +620,7 @@ class Ingest(BaseSDK):
605
620
 
606
621
  req = self._build_request(
607
622
  method="POST",
608
- path="/ingest/images/url",
623
+ path="/v1/ingest/images/url",
609
624
  base_url=base_url,
610
625
  url_variables=url_variables,
611
626
  request=request,
@@ -636,7 +651,7 @@ class Ingest(BaseSDK):
636
651
 
637
652
  http_res = self.do_request(
638
653
  hook_ctx=HookContext(
639
- operation_id="ingest_image_url_ingest_images_url_post",
654
+ operation_id="ingest_image_url_v1_ingest_images_url_post",
640
655
  oauth2_scopes=[],
641
656
  security_source=get_security_from_env(
642
657
  self.sdk_configuration.security, models.Security
@@ -673,7 +688,7 @@ class Ingest(BaseSDK):
673
688
  http_res,
674
689
  )
675
690
 
676
- async def image_url_async(
691
+ async def ingest_image_url_v1_ingest_images_url_post_async(
677
692
  self,
678
693
  *,
679
694
  url: str,
@@ -699,6 +714,9 @@ class Ingest(BaseSDK):
699
714
  ) -> models.TaskResponse:
700
715
  r"""Ingest Image Url
701
716
 
717
+ **Requirements:**
718
+ - Required permissions: write
719
+
702
720
  :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
703
721
  :param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
704
722
  :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.
@@ -719,7 +737,7 @@ class Ingest(BaseSDK):
719
737
  if server_url is not None:
720
738
  base_url = server_url
721
739
 
722
- request = models.IngestImageURLIngestImagesURLPostRequest(
740
+ request = models.IngestImageURLV1IngestImagesURLPostRequest(
723
741
  x_namespace=x_namespace,
724
742
  process_image_url_input=models.ProcessImageURLInput(
725
743
  url=url,
@@ -739,7 +757,7 @@ class Ingest(BaseSDK):
739
757
 
740
758
  req = self._build_request_async(
741
759
  method="POST",
742
- path="/ingest/images/url",
760
+ path="/v1/ingest/images/url",
743
761
  base_url=base_url,
744
762
  url_variables=url_variables,
745
763
  request=request,
@@ -770,7 +788,7 @@ class Ingest(BaseSDK):
770
788
 
771
789
  http_res = await self.do_request_async(
772
790
  hook_ctx=HookContext(
773
- operation_id="ingest_image_url_ingest_images_url_post",
791
+ operation_id="ingest_image_url_v1_ingest_images_url_post",
774
792
  oauth2_scopes=[],
775
793
  security_source=get_security_from_env(
776
794
  self.sdk_configuration.security, models.Security