mixpeek 0.20.19__py3-none-any.whl → 0.21.1__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 (228) hide show
  1. mixpeek/_version.py +3 -3
  2. mixpeek/{assets.py → bucket_objects.py} +309 -793
  3. mixpeek/buckets.py +1292 -0
  4. mixpeek/clusters.py +306 -0
  5. mixpeek/collection_cache.py +820 -0
  6. mixpeek/{taxonomyentities.py → collection_documents.py} +305 -559
  7. mixpeek/collections.py +122 -996
  8. mixpeek/features.py +45 -991
  9. mixpeek/models/__init__.py +625 -570
  10. mixpeek/models/aggregationtype.py +13 -0
  11. mixpeek/models/apikeyupdate.py +1 -1
  12. mixpeek/models/attributebasedconfig.py +21 -0
  13. mixpeek/models/automaticnaming.py +29 -0
  14. mixpeek/models/basicfeatureextractor.py +35 -0
  15. mixpeek/models/{classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py → batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py} +17 -15
  16. mixpeek/models/{update_collection_v1_collections_collection_putop.py → batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py} +29 -19
  17. mixpeek/models/blobdetails.py +72 -0
  18. mixpeek/models/blobmodel.py +107 -0
  19. mixpeek/models/bucketcreaterequest.py +75 -0
  20. mixpeek/models/bucketresponse.py +90 -0
  21. mixpeek/models/bucketschema_input.py +37 -0
  22. mixpeek/models/bucketschema_output.py +37 -0
  23. mixpeek/models/{featureresponse.py → bucketschemafield_input.py} +45 -18
  24. mixpeek/models/bucketschemafield_output.py +101 -0
  25. mixpeek/models/bucketschemafieldtype.py +29 -0
  26. mixpeek/models/bucketupdaterequest.py +68 -0
  27. mixpeek/models/cachestats.py +40 -0
  28. mixpeek/models/{list_collections_v1_collections_getop.py → cleanup_cache_v1_collections_cache_cleanup_postop.py} +23 -12
  29. mixpeek/models/{inputtype.py → clusteringmethod.py} +3 -5
  30. mixpeek/models/clustertype.py +9 -0
  31. mixpeek/models/collectioncacheconfig_input.py +92 -0
  32. mixpeek/models/collectioncacheconfig_output.py +92 -0
  33. mixpeek/models/collectionconfig.py +32 -0
  34. mixpeek/models/collectionmodel.py +79 -8
  35. mixpeek/models/{create_taxonomy_v1_entities_taxonomies_postop.py → create_bucket_v1_buckets_create_postop.py} +7 -7
  36. mixpeek/models/{search_assets_v1_assets_search_postop.py → create_cluster_v1_clusters_postop.py} +7 -7
  37. mixpeek/models/{create_collection_v1_collections_postop.py → create_collection_v1_collections_create_postop.py} +3 -3
  38. mixpeek/models/{ingest_video_url_v1_ingest_videos_url_postop.py → create_interaction_v1_retrievers_interactions_postop.py} +7 -7
  39. mixpeek/models/{partial_asset_update_v1_assets_asset_id_patchop.py → create_object_v1_buckets_bucket_identifier_objects_create_postop.py} +11 -9
  40. mixpeek/models/{ingest_text_v1_ingest_text_postop.py → create_retriever_v1_retrievers_retrievers_postop.py} +10 -7
  41. mixpeek/models/{ingest_image_url_v1_ingest_images_url_postop.py → create_taxonomy_v1_taxonomies_postop.py} +7 -7
  42. mixpeek/models/createblobrequest.py +80 -0
  43. mixpeek/models/createclusterrequest.py +74 -0
  44. mixpeek/models/createcollectionrequest.py +72 -3
  45. mixpeek/models/createnamespacerequest.py +14 -8
  46. mixpeek/models/createobjectrequest.py +75 -0
  47. mixpeek/models/createretrieverrequest.py +90 -0
  48. mixpeek/models/{taxonomyupdate.py → createtaxonomyrequest.py} +15 -13
  49. mixpeek/models/{delete_asset_v1_assets_asset_id_deleteop.py → delete_bucket_v1_buckets_bucket_identifier_deleteop.py} +5 -5
  50. mixpeek/models/{delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py → delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py} +11 -11
  51. mixpeek/models/{get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py → delete_interaction_v1_retrievers_interactions_interaction_id_deleteop.py} +7 -7
  52. mixpeek/models/delete_object_v1_buckets_bucket_identifier_objects_object_identifier_deleteop.py +70 -0
  53. mixpeek/models/{featureextractionembeddingrequest.py → documenthandlingconfig.py} +12 -15
  54. mixpeek/models/documentinputhandling.py +11 -0
  55. mixpeek/models/{jsontextoutputsettings.py → documentlistresponse.py} +15 -14
  56. mixpeek/models/documentoutputhandling.py +10 -0
  57. mixpeek/models/documentoutputtype.py +11 -0
  58. mixpeek/models/documentresponse.py +87 -0
  59. mixpeek/models/{nodeupdate.py → documentupdate.py} +22 -13
  60. mixpeek/models/enrichmentfield.py +25 -0
  61. mixpeek/models/errordetail.py +1 -1
  62. mixpeek/models/{update_node_v1_entities_taxonomies_nodes_node_patchop.py → execute_retriever_v1_retrievers_retrievers_retriever_id_execute_postop.py} +11 -11
  63. mixpeek/models/featureextractorconfig.py +116 -0
  64. mixpeek/models/featureextractordefinition.py +192 -0
  65. mixpeek/models/filtercondition.py +25 -25
  66. mixpeek/models/filteroperator.py +24 -0
  67. mixpeek/models/generativemodels.py +10 -0
  68. mixpeek/models/{delete_feature_v1_features_feature_id_deleteop.py → get_bucket_v1_buckets_bucket_identifier_getop.py} +5 -5
  69. mixpeek/models/{list_taxonomies_v1_entities_taxonomies_getop.py → get_cache_stats_v1_collections_cache_stats_getop.py} +16 -14
  70. mixpeek/models/get_collection_v1_collections_collection_id_getop.py +59 -0
  71. mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +70 -0
  72. mixpeek/models/get_feature_extractor_v1_features_extractors_feature_id_getop.py +16 -0
  73. mixpeek/models/get_interaction_v1_retrievers_interactions_interaction_id_getop.py +57 -0
  74. mixpeek/models/{delete_collection_v1_collections_collection_deleteop.py → get_object_v1_buckets_bucket_identifier_objects_object_identifier_getop.py} +16 -7
  75. mixpeek/models/get_research_v1_research_getop.py +52 -0
  76. mixpeek/models/get_retriever_stages_v1_retrievers_stages_getop.py +52 -0
  77. mixpeek/models/{delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py → get_retriever_v1_retrievers_retrievers_retriever_id_getop.py} +5 -7
  78. mixpeek/models/get_task_v1_tasks_task_id_getop.py +1 -1
  79. mixpeek/models/getusagerequestmodel.py +91 -0
  80. mixpeek/models/hdbscanparameters.py +26 -0
  81. mixpeek/models/interactionresponse.py +86 -0
  82. mixpeek/models/interactiontype.py +22 -0
  83. mixpeek/models/{search_features_v1_features_search_postop.py → invalidate_cache_v1_collections_cache_invalidate_postop.py} +60 -34
  84. mixpeek/models/invalidationevent.py +67 -0
  85. mixpeek/models/invalidationstrategy.py +12 -0
  86. mixpeek/models/kill_task_v1_tasks_task_id_deleteop.py +1 -1
  87. mixpeek/models/list_active_tasks_v1_tasks_getop.py +1 -1
  88. mixpeek/models/{list_assets_v1_assets_postop.py → list_buckets_v1_buckets_postop.py} +18 -18
  89. mixpeek/models/{list_features_v1_features_postop.py → list_documents_v1_collections_collection_identifier_documents_getop.py} +54 -19
  90. mixpeek/models/list_interactions_v1_retrievers_interactions_getop.py +96 -0
  91. mixpeek/models/{list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py → list_objects_v1_buckets_bucket_identifier_objects_postop.py} +22 -29
  92. mixpeek/models/{groupbyoptionsasset.py → listbucketsrequest.py} +19 -28
  93. mixpeek/models/listbucketsresponse.py +23 -0
  94. mixpeek/models/{groupbyoptions.py → listobjectsrequest.py} +19 -28
  95. mixpeek/models/listobjectsresponse.py +25 -0
  96. mixpeek/models/listtasksresponse.py +3 -6
  97. mixpeek/models/{logicaloperator.py → logicaloperator_input.py} +42 -24
  98. mixpeek/models/logicaloperator_output.py +121 -0
  99. mixpeek/models/multivectorindex.py +25 -0
  100. mixpeek/models/namespaceresponse.py +1 -1
  101. mixpeek/models/namespaceusage.py +45 -0
  102. mixpeek/models/namingmethod.py +8 -0
  103. mixpeek/models/objectresponse.py +124 -0
  104. mixpeek/models/{db_model_paginationresponse.py → paginationresponse.py} +3 -3
  105. mixpeek/models/payloadindexconfig.py +1 -1
  106. mixpeek/models/plan.py +82 -0
  107. mixpeek/models/recomputestrategy.py +12 -0
  108. mixpeek/models/resourcetotals.py +39 -0
  109. mixpeek/models/{jsonvideooutputsettings.py → retrieverbinding.py} +19 -11
  110. mixpeek/models/{logodetectsettings.py → retrievercacheconfig.py} +20 -11
  111. mixpeek/models/retrievermodel.py +95 -0
  112. mixpeek/models/retrieverqueryrequest.py +114 -0
  113. mixpeek/models/retrieverresponse.py +24 -0
  114. mixpeek/models/searchinteraction.py +81 -0
  115. mixpeek/models/singlelineageentry.py +99 -0
  116. mixpeek/models/sortdirection.py +11 -0
  117. mixpeek/models/sortoption.py +20 -12
  118. mixpeek/models/sourceconfig_input.py +72 -0
  119. mixpeek/models/sourceconfig_output.py +75 -0
  120. mixpeek/models/sourcetype.py +11 -0
  121. mixpeek/models/stageconfig_input.py +111 -0
  122. mixpeek/models/stageconfig_output.py +114 -0
  123. mixpeek/models/stagedefinition.py +110 -0
  124. mixpeek/models/{jsonimageoutputsettings.py → stageresponse.py} +21 -11
  125. mixpeek/models/taskresponse.py +1 -1
  126. mixpeek/models/taskstatus.py +1 -0
  127. mixpeek/models/{assetfeatures.py → taxonomyapplicationconfig.py} +23 -15
  128. mixpeek/models/taxonomyconfig.py +19 -0
  129. mixpeek/models/timeseriesdatapoint.py +25 -0
  130. mixpeek/models/timeseriesusage.py +36 -0
  131. mixpeek/models/{full_asset_update_v1_assets_asset_id_putop.py → update_bucket_v1_buckets_bucket_identifier_putop.py} +9 -9
  132. mixpeek/models/{update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py → update_document_v1_collections_collection_identifier_documents_document_id_putop.py} +25 -13
  133. mixpeek/models/{full_feature_update_v1_features_feature_id_putop.py → update_object_v1_buckets_bucket_identifier_objects_object_identifier_putop.py} +20 -9
  134. mixpeek/models/updatenamespacerequest.py +1 -1
  135. mixpeek/models/updateobjectrequest.py +75 -0
  136. mixpeek/models/usageresponse.py +86 -0
  137. mixpeek/models/usagesummary.py +39 -0
  138. mixpeek/models/usagetimerange.py +16 -0
  139. mixpeek/models/usermodel_input.py +3 -0
  140. mixpeek/models/usermodel_output.py +3 -0
  141. mixpeek/models/vectorbasedconfig.py +60 -0
  142. mixpeek/models/{collectionresult.py → vectorindex.py} +20 -15
  143. mixpeek/models/vectorindexdefinition.py +43 -0
  144. mixpeek/models/vectortype.py +4 -1
  145. mixpeek/namespaces.py +26 -480
  146. mixpeek/organization_notifications.py +214 -0
  147. mixpeek/organizations.py +6 -210
  148. mixpeek/{featureextractors.py → organizations_usage.py} +31 -39
  149. mixpeek/research.py +228 -0
  150. mixpeek/retriever_interactions.py +1036 -0
  151. mixpeek/retriever_stages.py +232 -0
  152. mixpeek/{ingestassets.py → retrievers.py} +209 -271
  153. mixpeek/sdk.py +40 -23
  154. mixpeek/taxonomies.py +43 -513
  155. mixpeek/types/basemodel.py +3 -3
  156. mixpeek/utils/enums.py +67 -27
  157. {mixpeek-0.20.19.dist-info → mixpeek-0.21.1.dist-info}/METADATA +68 -50
  158. mixpeek-0.21.1.dist-info/RECORD +216 -0
  159. {mixpeek-0.20.19.dist-info → mixpeek-0.21.1.dist-info}/WHEEL +1 -1
  160. mixpeek/models/actionusage.py +0 -16
  161. mixpeek/models/assetresponse.py +0 -166
  162. mixpeek/models/assets_model_searchquery.py +0 -21
  163. mixpeek/models/assetupdate.py +0 -28
  164. mixpeek/models/assignmentconfig.py +0 -67
  165. mixpeek/models/assignmentmode.py +0 -11
  166. mixpeek/models/availablemodels.py +0 -16
  167. mixpeek/models/availablemodelsresponse.py +0 -27
  168. mixpeek/models/classificationmatch.py +0 -77
  169. mixpeek/models/classificationwithfeature.py +0 -73
  170. mixpeek/models/collectiondetailsresponse.py +0 -83
  171. mixpeek/models/dateusage.py +0 -22
  172. mixpeek/models/denseembedding.py +0 -16
  173. mixpeek/models/discoverrequest.py +0 -64
  174. mixpeek/models/embeddingconfig.py +0 -33
  175. mixpeek/models/embeddingrequest.py +0 -92
  176. mixpeek/models/embeddingresponse.py +0 -64
  177. mixpeek/models/entitysettings.py +0 -50
  178. mixpeek/models/featureoptions.py +0 -25
  179. mixpeek/models/features_model_paginationresponse.py +0 -59
  180. mixpeek/models/featureupdaterequest.py +0 -21
  181. mixpeek/models/get_asset_v1_assets_asset_id_getop.py +0 -73
  182. mixpeek/models/get_asset_with_features_v1_assets_asset_id_features_getop.py +0 -73
  183. mixpeek/models/get_collection_details_v1_collections_collection_details_getop.py +0 -59
  184. mixpeek/models/get_collection_details_v1_collections_collection_getop.py +0 -59
  185. mixpeek/models/get_feature_v1_features_feature_id_getop.py +0 -70
  186. mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +0 -59
  187. mixpeek/models/groupedassetdata.py +0 -18
  188. mixpeek/models/imagedescribesettings.py +0 -82
  189. mixpeek/models/imagedetectsettings.py +0 -47
  190. mixpeek/models/imagereadsettings.py +0 -71
  191. mixpeek/models/imagesettings.py +0 -92
  192. mixpeek/models/listassetsrequest.py +0 -75
  193. mixpeek/models/listassetsresponse.py +0 -22
  194. mixpeek/models/listclassificationsrequest.py +0 -69
  195. mixpeek/models/listclassificationsresponse.py +0 -31
  196. mixpeek/models/listcollectionsresponse.py +0 -22
  197. mixpeek/models/listfeaturesrequest.py +0 -77
  198. mixpeek/models/listfeaturesresponse.py +0 -22
  199. mixpeek/models/listtaxonomiesresponse.py +0 -24
  200. mixpeek/models/modality.py +0 -13
  201. mixpeek/models/modeldetails.py +0 -61
  202. mixpeek/models/nodeoptions.py +0 -16
  203. mixpeek/models/patch_namespace_v1_namespaces_namespace_patchop.py +0 -28
  204. mixpeek/models/payloadindextype.py +0 -17
  205. mixpeek/models/processimageurlinput.py +0 -87
  206. mixpeek/models/processtextinput.py +0 -82
  207. mixpeek/models/processvideourlinput.py +0 -87
  208. mixpeek/models/querysettings.py +0 -56
  209. mixpeek/models/rerankingoptions.py +0 -47
  210. mixpeek/models/search_model_searchquery.py +0 -76
  211. mixpeek/models/searchassetsrequest.py +0 -78
  212. mixpeek/models/searchrequestfeatures.py +0 -153
  213. mixpeek/models/sparseembedding.py +0 -21
  214. mixpeek/models/taxonomycreate.py +0 -20
  215. mixpeek/models/taxonomyextractionconfig.py +0 -26
  216. mixpeek/models/taxonomymodel.py +0 -27
  217. mixpeek/models/taxonomynode.py +0 -101
  218. mixpeek/models/taxonomynodecreate.py +0 -63
  219. mixpeek/models/textsettings.py +0 -67
  220. mixpeek/models/updateassetrequest.py +0 -60
  221. mixpeek/models/usage.py +0 -18
  222. mixpeek/models/vectormodel.py +0 -15
  223. mixpeek/models/videodescribesettings.py +0 -82
  224. mixpeek/models/videodetectsettings.py +0 -47
  225. mixpeek/models/videoreadsettings.py +0 -71
  226. mixpeek/models/videosettings.py +0 -115
  227. mixpeek/models/videotranscriptionsettings.py +0 -69
  228. mixpeek-0.20.19.dist-info/RECORD +0 -201
mixpeek/features.py CHANGED
@@ -5,26 +5,22 @@ 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, List, Mapping, Optional, Union
8
+ from typing import Any, List, Mapping, Optional
9
9
 
10
10
 
11
11
  class Features(BaseSDK):
12
- def get(
12
+ def list_feature_extractors_v1_features_extractors_get(
13
13
  self,
14
14
  *,
15
- feature_id: str,
16
- return_vectors: OptionalNullable[bool] = UNSET,
17
- x_namespace: OptionalNullable[str] = UNSET,
18
15
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
19
16
  server_url: Optional[str] = None,
20
17
  timeout_ms: Optional[int] = None,
21
18
  http_headers: Optional[Mapping[str, str]] = None,
22
- ) -> models.FeatureResponse:
23
- r"""Get Feature
19
+ ) -> List[models.FeatureExtractorDefinition]:
20
+ r"""List Feature Extractors
21
+
22
+ List all available feature extractors grouped by category
24
23
 
25
- :param feature_id:
26
- :param return_vectors: When true, includes the feature's vector embeddings in the response
27
- :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.
28
24
  :param retries: Override the default retry configuration for this method
29
25
  :param server_url: Override the default server URL for this method
30
26
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -39,21 +35,14 @@ class Features(BaseSDK):
39
35
  base_url = server_url
40
36
  else:
41
37
  base_url = self._get_url(base_url, url_variables)
42
-
43
- request = models.GetFeatureV1FeaturesFeatureIDGetRequest(
44
- feature_id=feature_id,
45
- return_vectors=return_vectors,
46
- x_namespace=x_namespace,
47
- )
48
-
49
38
  req = self._build_request(
50
39
  method="GET",
51
- path="/v1/features/{feature_id}",
40
+ path="/v1/features/extractors",
52
41
  base_url=base_url,
53
42
  url_variables=url_variables,
54
- request=request,
43
+ request=None,
55
44
  request_body_required=False,
56
- request_has_path_params=True,
45
+ request_has_path_params=False,
57
46
  request_has_query_params=True,
58
47
  user_agent_header="user-agent",
59
48
  accept_header_value="application/json",
@@ -73,7 +62,7 @@ class Features(BaseSDK):
73
62
  http_res = self.do_request(
74
63
  hook_ctx=HookContext(
75
64
  base_url=base_url or "",
76
- operation_id="get_feature_v1_features__feature_id__get",
65
+ operation_id="list_feature_extractors_v1_features_extractors_get",
77
66
  oauth2_scopes=[],
78
67
  security_source=get_security_from_env(
79
68
  self.sdk_configuration.security, models.Security
@@ -86,7 +75,9 @@ class Features(BaseSDK):
86
75
 
87
76
  response_data: Any = None
88
77
  if utils.match_response(http_res, "200", "application/json"):
89
- return utils.unmarshal_json(http_res.text, models.FeatureResponse)
78
+ return utils.unmarshal_json(
79
+ http_res.text, List[models.FeatureExtractorDefinition]
80
+ )
90
81
  if utils.match_response(
91
82
  http_res, ["400", "401", "403", "404"], "application/json"
92
83
  ):
@@ -124,22 +115,18 @@ class Features(BaseSDK):
124
115
  http_res,
125
116
  )
126
117
 
127
- async def get_async(
118
+ async def list_feature_extractors_v1_features_extractors_get_async(
128
119
  self,
129
120
  *,
130
- feature_id: str,
131
- return_vectors: OptionalNullable[bool] = UNSET,
132
- x_namespace: OptionalNullable[str] = UNSET,
133
121
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
134
122
  server_url: Optional[str] = None,
135
123
  timeout_ms: Optional[int] = None,
136
124
  http_headers: Optional[Mapping[str, str]] = None,
137
- ) -> models.FeatureResponse:
138
- r"""Get Feature
125
+ ) -> List[models.FeatureExtractorDefinition]:
126
+ r"""List Feature Extractors
127
+
128
+ List all available feature extractors grouped by category
139
129
 
140
- :param feature_id:
141
- :param return_vectors: When true, includes the feature's vector embeddings in the response
142
- :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.
143
130
  :param retries: Override the default retry configuration for this method
144
131
  :param server_url: Override the default server URL for this method
145
132
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -154,21 +141,14 @@ class Features(BaseSDK):
154
141
  base_url = server_url
155
142
  else:
156
143
  base_url = self._get_url(base_url, url_variables)
157
-
158
- request = models.GetFeatureV1FeaturesFeatureIDGetRequest(
159
- feature_id=feature_id,
160
- return_vectors=return_vectors,
161
- x_namespace=x_namespace,
162
- )
163
-
164
144
  req = self._build_request_async(
165
145
  method="GET",
166
- path="/v1/features/{feature_id}",
146
+ path="/v1/features/extractors",
167
147
  base_url=base_url,
168
148
  url_variables=url_variables,
169
- request=request,
149
+ request=None,
170
150
  request_body_required=False,
171
- request_has_path_params=True,
151
+ request_has_path_params=False,
172
152
  request_has_query_params=True,
173
153
  user_agent_header="user-agent",
174
154
  accept_header_value="application/json",
@@ -188,7 +168,7 @@ class Features(BaseSDK):
188
168
  http_res = await self.do_request_async(
189
169
  hook_ctx=HookContext(
190
170
  base_url=base_url or "",
191
- operation_id="get_feature_v1_features__feature_id__get",
171
+ operation_id="list_feature_extractors_v1_features_extractors_get",
192
172
  oauth2_scopes=[],
193
173
  security_source=get_security_from_env(
194
174
  self.sdk_configuration.security, models.Security
@@ -201,7 +181,9 @@ class Features(BaseSDK):
201
181
 
202
182
  response_data: Any = None
203
183
  if utils.match_response(http_res, "200", "application/json"):
204
- return utils.unmarshal_json(http_res.text, models.FeatureResponse)
184
+ return utils.unmarshal_json(
185
+ http_res.text, List[models.FeatureExtractorDefinition]
186
+ )
205
187
  if utils.match_response(
206
188
  http_res, ["400", "401", "403", "404"], "application/json"
207
189
  ):
@@ -239,23 +221,20 @@ class Features(BaseSDK):
239
221
  http_res,
240
222
  )
241
223
 
242
- def delete(
224
+ def get_feature_extractor_v1_features_extractors_feature_id_get(
243
225
  self,
244
226
  *,
245
227
  feature_id: str,
246
- x_namespace: OptionalNullable[str] = UNSET,
247
228
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
248
229
  server_url: Optional[str] = None,
249
230
  timeout_ms: Optional[int] = None,
250
231
  http_headers: Optional[Mapping[str, str]] = None,
251
- ) -> models.GenericSuccessResponse:
252
- r"""Delete Feature
232
+ ) -> models.FeatureExtractorDefinition:
233
+ r"""Get Feature Extractor Details
253
234
 
254
- **Requirements:**
255
- - Required permissions: write
235
+ Get detailed information about a specific feature extractor
256
236
 
257
237
  :param feature_id:
258
- :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.
259
238
  :param retries: Override the default retry configuration for this method
260
239
  :param server_url: Override the default server URL for this method
261
240
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -271,14 +250,13 @@ class Features(BaseSDK):
271
250
  else:
272
251
  base_url = self._get_url(base_url, url_variables)
273
252
 
274
- request = models.DeleteFeatureV1FeaturesFeatureIDDeleteRequest(
253
+ request = models.GetFeatureExtractorV1FeaturesExtractorsFeatureIDGetRequest(
275
254
  feature_id=feature_id,
276
- x_namespace=x_namespace,
277
255
  )
278
256
 
279
257
  req = self._build_request(
280
- method="DELETE",
281
- path="/v1/features/{feature_id}",
258
+ method="GET",
259
+ path="/v1/features/extractors/{feature_id}",
282
260
  base_url=base_url,
283
261
  url_variables=url_variables,
284
262
  request=request,
@@ -303,122 +281,7 @@ class Features(BaseSDK):
303
281
  http_res = self.do_request(
304
282
  hook_ctx=HookContext(
305
283
  base_url=base_url or "",
306
- operation_id="delete_feature_v1_features__feature_id__delete",
307
- oauth2_scopes=[],
308
- security_source=get_security_from_env(
309
- self.sdk_configuration.security, models.Security
310
- ),
311
- ),
312
- request=req,
313
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
314
- retry_config=retry_config,
315
- )
316
-
317
- response_data: Any = None
318
- if utils.match_response(http_res, "200", "application/json"):
319
- return utils.unmarshal_json(http_res.text, models.GenericSuccessResponse)
320
- if utils.match_response(
321
- http_res, ["400", "401", "403", "404"], "application/json"
322
- ):
323
- response_data = utils.unmarshal_json(
324
- http_res.text, models.ErrorResponseData
325
- )
326
- raise models.ErrorResponse(data=response_data)
327
- if utils.match_response(http_res, "422", "application/json"):
328
- response_data = utils.unmarshal_json(
329
- http_res.text, models.HTTPValidationErrorData
330
- )
331
- raise models.HTTPValidationError(data=response_data)
332
- if utils.match_response(http_res, "500", "application/json"):
333
- response_data = utils.unmarshal_json(
334
- http_res.text, models.ErrorResponseData
335
- )
336
- raise models.ErrorResponse(data=response_data)
337
- if utils.match_response(http_res, "4XX", "*"):
338
- http_res_text = utils.stream_to_text(http_res)
339
- raise models.APIError(
340
- "API error occurred", http_res.status_code, http_res_text, http_res
341
- )
342
- if utils.match_response(http_res, "5XX", "*"):
343
- http_res_text = utils.stream_to_text(http_res)
344
- raise models.APIError(
345
- "API error occurred", http_res.status_code, http_res_text, http_res
346
- )
347
-
348
- content_type = http_res.headers.get("Content-Type")
349
- http_res_text = utils.stream_to_text(http_res)
350
- raise models.APIError(
351
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
352
- http_res.status_code,
353
- http_res_text,
354
- http_res,
355
- )
356
-
357
- async def delete_async(
358
- self,
359
- *,
360
- feature_id: str,
361
- x_namespace: OptionalNullable[str] = UNSET,
362
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
363
- server_url: Optional[str] = None,
364
- timeout_ms: Optional[int] = None,
365
- http_headers: Optional[Mapping[str, str]] = None,
366
- ) -> models.GenericSuccessResponse:
367
- r"""Delete Feature
368
-
369
- **Requirements:**
370
- - Required permissions: write
371
-
372
- :param feature_id:
373
- :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.
374
- :param retries: Override the default retry configuration for this method
375
- :param server_url: Override the default server URL for this method
376
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
377
- :param http_headers: Additional headers to set or replace on requests.
378
- """
379
- base_url = None
380
- url_variables = None
381
- if timeout_ms is None:
382
- timeout_ms = self.sdk_configuration.timeout_ms
383
-
384
- if server_url is not None:
385
- base_url = server_url
386
- else:
387
- base_url = self._get_url(base_url, url_variables)
388
-
389
- request = models.DeleteFeatureV1FeaturesFeatureIDDeleteRequest(
390
- feature_id=feature_id,
391
- x_namespace=x_namespace,
392
- )
393
-
394
- req = self._build_request_async(
395
- method="DELETE",
396
- path="/v1/features/{feature_id}",
397
- base_url=base_url,
398
- url_variables=url_variables,
399
- request=request,
400
- request_body_required=False,
401
- request_has_path_params=True,
402
- request_has_query_params=True,
403
- user_agent_header="user-agent",
404
- accept_header_value="application/json",
405
- http_headers=http_headers,
406
- security=self.sdk_configuration.security,
407
- timeout_ms=timeout_ms,
408
- )
409
-
410
- if retries == UNSET:
411
- if self.sdk_configuration.retry_config is not UNSET:
412
- retries = self.sdk_configuration.retry_config
413
-
414
- retry_config = None
415
- if isinstance(retries, utils.RetryConfig):
416
- retry_config = (retries, ["429", "500", "502", "503", "504"])
417
-
418
- http_res = await self.do_request_async(
419
- hook_ctx=HookContext(
420
- base_url=base_url or "",
421
- operation_id="delete_feature_v1_features__feature_id__delete",
284
+ operation_id="get_feature_extractor_v1_features_extractors__feature_id__get",
422
285
  oauth2_scopes=[],
423
286
  security_source=get_security_from_env(
424
287
  self.sdk_configuration.security, models.Security
@@ -431,139 +294,9 @@ class Features(BaseSDK):
431
294
 
432
295
  response_data: Any = None
433
296
  if utils.match_response(http_res, "200", "application/json"):
434
- return utils.unmarshal_json(http_res.text, models.GenericSuccessResponse)
435
- if utils.match_response(
436
- http_res, ["400", "401", "403", "404"], "application/json"
437
- ):
438
- response_data = utils.unmarshal_json(
439
- http_res.text, models.ErrorResponseData
440
- )
441
- raise models.ErrorResponse(data=response_data)
442
- if utils.match_response(http_res, "422", "application/json"):
443
- response_data = utils.unmarshal_json(
444
- http_res.text, models.HTTPValidationErrorData
445
- )
446
- raise models.HTTPValidationError(data=response_data)
447
- if utils.match_response(http_res, "500", "application/json"):
448
- response_data = utils.unmarshal_json(
449
- http_res.text, models.ErrorResponseData
450
- )
451
- raise models.ErrorResponse(data=response_data)
452
- if utils.match_response(http_res, "4XX", "*"):
453
- http_res_text = await utils.stream_to_text_async(http_res)
454
- raise models.APIError(
455
- "API error occurred", http_res.status_code, http_res_text, http_res
456
- )
457
- if utils.match_response(http_res, "5XX", "*"):
458
- http_res_text = await utils.stream_to_text_async(http_res)
459
- raise models.APIError(
460
- "API error occurred", http_res.status_code, http_res_text, http_res
297
+ return utils.unmarshal_json(
298
+ http_res.text, models.FeatureExtractorDefinition
461
299
  )
462
-
463
- content_type = http_res.headers.get("Content-Type")
464
- http_res_text = await utils.stream_to_text_async(http_res)
465
- raise models.APIError(
466
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
467
- http_res.status_code,
468
- http_res_text,
469
- http_res,
470
- )
471
-
472
- def update(
473
- self,
474
- *,
475
- feature_id: str,
476
- metadata: Union[
477
- models.FeatureUpdateRequestMetadata,
478
- models.FeatureUpdateRequestMetadataTypedDict,
479
- ],
480
- x_namespace: OptionalNullable[str] = UNSET,
481
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
482
- server_url: Optional[str] = None,
483
- timeout_ms: Optional[int] = None,
484
- http_headers: Optional[Mapping[str, str]] = None,
485
- ) -> models.FeatureResponse:
486
- r"""Full Feature Update
487
-
488
- **Requirements:**
489
- - Required permissions: write
490
-
491
- :param feature_id:
492
- :param metadata:
493
- :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.
494
- :param retries: Override the default retry configuration for this method
495
- :param server_url: Override the default server URL for this method
496
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
497
- :param http_headers: Additional headers to set or replace on requests.
498
- """
499
- base_url = None
500
- url_variables = None
501
- if timeout_ms is None:
502
- timeout_ms = self.sdk_configuration.timeout_ms
503
-
504
- if server_url is not None:
505
- base_url = server_url
506
- else:
507
- base_url = self._get_url(base_url, url_variables)
508
-
509
- request = models.FullFeatureUpdateV1FeaturesFeatureIDPutRequest(
510
- feature_id=feature_id,
511
- x_namespace=x_namespace,
512
- feature_update_request=models.FeatureUpdateRequest(
513
- metadata=utils.get_pydantic_model(
514
- metadata, models.FeatureUpdateRequestMetadata
515
- ),
516
- ),
517
- )
518
-
519
- req = self._build_request(
520
- method="PUT",
521
- path="/v1/features/{feature_id}",
522
- base_url=base_url,
523
- url_variables=url_variables,
524
- request=request,
525
- request_body_required=True,
526
- request_has_path_params=True,
527
- request_has_query_params=True,
528
- user_agent_header="user-agent",
529
- accept_header_value="application/json",
530
- http_headers=http_headers,
531
- security=self.sdk_configuration.security,
532
- get_serialized_body=lambda: utils.serialize_request_body(
533
- request.feature_update_request,
534
- False,
535
- False,
536
- "json",
537
- models.FeatureUpdateRequest,
538
- ),
539
- timeout_ms=timeout_ms,
540
- )
541
-
542
- if retries == UNSET:
543
- if self.sdk_configuration.retry_config is not UNSET:
544
- retries = self.sdk_configuration.retry_config
545
-
546
- retry_config = None
547
- if isinstance(retries, utils.RetryConfig):
548
- retry_config = (retries, ["429", "500", "502", "503", "504"])
549
-
550
- http_res = self.do_request(
551
- hook_ctx=HookContext(
552
- base_url=base_url or "",
553
- operation_id="full_feature_update_v1_features__feature_id__put",
554
- oauth2_scopes=[],
555
- security_source=get_security_from_env(
556
- self.sdk_configuration.security, models.Security
557
- ),
558
- ),
559
- request=req,
560
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
561
- retry_config=retry_config,
562
- )
563
-
564
- response_data: Any = None
565
- if utils.match_response(http_res, "200", "application/json"):
566
- return utils.unmarshal_json(http_res.text, models.FeatureResponse)
567
300
  if utils.match_response(
568
301
  http_res, ["400", "401", "403", "404"], "application/json"
569
302
  ):
@@ -601,28 +334,20 @@ class Features(BaseSDK):
601
334
  http_res,
602
335
  )
603
336
 
604
- async def update_async(
337
+ async def get_feature_extractor_v1_features_extractors_feature_id_get_async(
605
338
  self,
606
339
  *,
607
340
  feature_id: str,
608
- metadata: Union[
609
- models.FeatureUpdateRequestMetadata,
610
- models.FeatureUpdateRequestMetadataTypedDict,
611
- ],
612
- x_namespace: OptionalNullable[str] = UNSET,
613
341
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
614
342
  server_url: Optional[str] = None,
615
343
  timeout_ms: Optional[int] = None,
616
344
  http_headers: Optional[Mapping[str, str]] = None,
617
- ) -> models.FeatureResponse:
618
- r"""Full Feature Update
345
+ ) -> models.FeatureExtractorDefinition:
346
+ r"""Get Feature Extractor Details
619
347
 
620
- **Requirements:**
621
- - Required permissions: write
348
+ Get detailed information about a specific feature extractor
622
349
 
623
350
  :param feature_id:
624
- :param metadata:
625
- :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.
626
351
  :param retries: Override the default retry configuration for this method
627
352
  :param server_url: Override the default server URL for this method
628
353
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -638,693 +363,23 @@ class Features(BaseSDK):
638
363
  else:
639
364
  base_url = self._get_url(base_url, url_variables)
640
365
 
641
- request = models.FullFeatureUpdateV1FeaturesFeatureIDPutRequest(
366
+ request = models.GetFeatureExtractorV1FeaturesExtractorsFeatureIDGetRequest(
642
367
  feature_id=feature_id,
643
- x_namespace=x_namespace,
644
- feature_update_request=models.FeatureUpdateRequest(
645
- metadata=utils.get_pydantic_model(
646
- metadata, models.FeatureUpdateRequestMetadata
647
- ),
648
- ),
649
368
  )
650
369
 
651
370
  req = self._build_request_async(
652
- method="PUT",
653
- path="/v1/features/{feature_id}",
371
+ method="GET",
372
+ path="/v1/features/extractors/{feature_id}",
654
373
  base_url=base_url,
655
374
  url_variables=url_variables,
656
375
  request=request,
657
- request_body_required=True,
376
+ request_body_required=False,
658
377
  request_has_path_params=True,
659
378
  request_has_query_params=True,
660
379
  user_agent_header="user-agent",
661
380
  accept_header_value="application/json",
662
381
  http_headers=http_headers,
663
382
  security=self.sdk_configuration.security,
664
- get_serialized_body=lambda: utils.serialize_request_body(
665
- request.feature_update_request,
666
- False,
667
- False,
668
- "json",
669
- models.FeatureUpdateRequest,
670
- ),
671
- timeout_ms=timeout_ms,
672
- )
673
-
674
- if retries == UNSET:
675
- if self.sdk_configuration.retry_config is not UNSET:
676
- retries = self.sdk_configuration.retry_config
677
-
678
- retry_config = None
679
- if isinstance(retries, utils.RetryConfig):
680
- retry_config = (retries, ["429", "500", "502", "503", "504"])
681
-
682
- http_res = await self.do_request_async(
683
- hook_ctx=HookContext(
684
- base_url=base_url or "",
685
- operation_id="full_feature_update_v1_features__feature_id__put",
686
- oauth2_scopes=[],
687
- security_source=get_security_from_env(
688
- self.sdk_configuration.security, models.Security
689
- ),
690
- ),
691
- request=req,
692
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
693
- retry_config=retry_config,
694
- )
695
-
696
- response_data: Any = None
697
- if utils.match_response(http_res, "200", "application/json"):
698
- return utils.unmarshal_json(http_res.text, models.FeatureResponse)
699
- if utils.match_response(
700
- http_res, ["400", "401", "403", "404"], "application/json"
701
- ):
702
- response_data = utils.unmarshal_json(
703
- http_res.text, models.ErrorResponseData
704
- )
705
- raise models.ErrorResponse(data=response_data)
706
- if utils.match_response(http_res, "422", "application/json"):
707
- response_data = utils.unmarshal_json(
708
- http_res.text, models.HTTPValidationErrorData
709
- )
710
- raise models.HTTPValidationError(data=response_data)
711
- if utils.match_response(http_res, "500", "application/json"):
712
- response_data = utils.unmarshal_json(
713
- http_res.text, models.ErrorResponseData
714
- )
715
- raise models.ErrorResponse(data=response_data)
716
- if utils.match_response(http_res, "4XX", "*"):
717
- http_res_text = await utils.stream_to_text_async(http_res)
718
- raise models.APIError(
719
- "API error occurred", http_res.status_code, http_res_text, http_res
720
- )
721
- if utils.match_response(http_res, "5XX", "*"):
722
- http_res_text = await utils.stream_to_text_async(http_res)
723
- raise models.APIError(
724
- "API error occurred", http_res.status_code, http_res_text, http_res
725
- )
726
-
727
- content_type = http_res.headers.get("Content-Type")
728
- http_res_text = await utils.stream_to_text_async(http_res)
729
- raise models.APIError(
730
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
731
- http_res.status_code,
732
- http_res_text,
733
- http_res,
734
- )
735
-
736
- def list(
737
- self,
738
- *,
739
- collections: List[str],
740
- offset_feature_id: OptionalNullable[str] = UNSET,
741
- page_size: Optional[int] = 10,
742
- x_namespace: OptionalNullable[str] = UNSET,
743
- filters: OptionalNullable[
744
- Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
745
- ] = UNSET,
746
- sort: OptionalNullable[
747
- Union[models.SortOption, models.SortOptionTypedDict]
748
- ] = UNSET,
749
- select: OptionalNullable[List[Any]] = UNSET,
750
- return_urls: Optional[bool] = False,
751
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
752
- server_url: Optional[str] = None,
753
- timeout_ms: Optional[int] = None,
754
- http_headers: Optional[Mapping[str, str]] = None,
755
- ) -> models.ListFeaturesResponse:
756
- r"""List Features
757
-
758
- Retrieves a list of features based on
759
- the provided filters and sorting criteria.
760
- If you provide a sort, then pagination isn't supported.
761
-
762
- :param collections: Collection identifiers - can be either collection IDs or collection names
763
- :param offset_feature_id: The offset id to start returning results from. Used for pagination
764
- :param page_size:
765
- :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.
766
- :param filters: Complex nested query filters
767
- :param sort: List of fields to sort by, with direction (asc or desc). NOTE: fields will require a specialty index to use this, consult with the team.
768
- :param select: List of fields to return in results, supports dot notation. Everything else is excluded.
769
- :param return_urls: When true, generates presigned URLs for assets
770
- :param retries: Override the default retry configuration for this method
771
- :param server_url: Override the default server URL for this method
772
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
773
- :param http_headers: Additional headers to set or replace on requests.
774
- """
775
- base_url = None
776
- url_variables = None
777
- if timeout_ms is None:
778
- timeout_ms = self.sdk_configuration.timeout_ms
779
-
780
- if server_url is not None:
781
- base_url = server_url
782
- else:
783
- base_url = self._get_url(base_url, url_variables)
784
-
785
- request = models.ListFeaturesV1FeaturesPostRequest(
786
- offset_feature_id=offset_feature_id,
787
- page_size=page_size,
788
- x_namespace=x_namespace,
789
- list_features_request=models.ListFeaturesRequest(
790
- collections=collections,
791
- filters=utils.get_pydantic_model(
792
- filters, OptionalNullable[models.LogicalOperator]
793
- ),
794
- sort=utils.get_pydantic_model(
795
- sort, OptionalNullable[models.SortOption]
796
- ),
797
- select=select,
798
- return_urls=return_urls,
799
- ),
800
- )
801
-
802
- req = self._build_request(
803
- method="POST",
804
- path="/v1/features",
805
- base_url=base_url,
806
- url_variables=url_variables,
807
- request=request,
808
- request_body_required=True,
809
- request_has_path_params=False,
810
- request_has_query_params=True,
811
- user_agent_header="user-agent",
812
- accept_header_value="application/json",
813
- http_headers=http_headers,
814
- security=self.sdk_configuration.security,
815
- get_serialized_body=lambda: utils.serialize_request_body(
816
- request.list_features_request,
817
- False,
818
- False,
819
- "json",
820
- models.ListFeaturesRequest,
821
- ),
822
- timeout_ms=timeout_ms,
823
- )
824
-
825
- if retries == UNSET:
826
- if self.sdk_configuration.retry_config is not UNSET:
827
- retries = self.sdk_configuration.retry_config
828
-
829
- retry_config = None
830
- if isinstance(retries, utils.RetryConfig):
831
- retry_config = (retries, ["429", "500", "502", "503", "504"])
832
-
833
- http_res = self.do_request(
834
- hook_ctx=HookContext(
835
- base_url=base_url or "",
836
- operation_id="list_features_v1_features_post",
837
- oauth2_scopes=[],
838
- security_source=get_security_from_env(
839
- self.sdk_configuration.security, models.Security
840
- ),
841
- ),
842
- request=req,
843
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
844
- retry_config=retry_config,
845
- )
846
-
847
- response_data: Any = None
848
- if utils.match_response(http_res, "200", "application/json"):
849
- return utils.unmarshal_json(http_res.text, models.ListFeaturesResponse)
850
- if utils.match_response(
851
- http_res, ["400", "401", "403", "404"], "application/json"
852
- ):
853
- response_data = utils.unmarshal_json(
854
- http_res.text, models.ErrorResponseData
855
- )
856
- raise models.ErrorResponse(data=response_data)
857
- if utils.match_response(http_res, "422", "application/json"):
858
- response_data = utils.unmarshal_json(
859
- http_res.text, models.HTTPValidationErrorData
860
- )
861
- raise models.HTTPValidationError(data=response_data)
862
- if utils.match_response(http_res, "500", "application/json"):
863
- response_data = utils.unmarshal_json(
864
- http_res.text, models.ErrorResponseData
865
- )
866
- raise models.ErrorResponse(data=response_data)
867
- if utils.match_response(http_res, "4XX", "*"):
868
- http_res_text = utils.stream_to_text(http_res)
869
- raise models.APIError(
870
- "API error occurred", http_res.status_code, http_res_text, http_res
871
- )
872
- if utils.match_response(http_res, "5XX", "*"):
873
- http_res_text = utils.stream_to_text(http_res)
874
- raise models.APIError(
875
- "API error occurred", http_res.status_code, http_res_text, http_res
876
- )
877
-
878
- content_type = http_res.headers.get("Content-Type")
879
- http_res_text = utils.stream_to_text(http_res)
880
- raise models.APIError(
881
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
882
- http_res.status_code,
883
- http_res_text,
884
- http_res,
885
- )
886
-
887
- async def list_async(
888
- self,
889
- *,
890
- collections: List[str],
891
- offset_feature_id: OptionalNullable[str] = UNSET,
892
- page_size: Optional[int] = 10,
893
- x_namespace: OptionalNullable[str] = UNSET,
894
- filters: OptionalNullable[
895
- Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
896
- ] = UNSET,
897
- sort: OptionalNullable[
898
- Union[models.SortOption, models.SortOptionTypedDict]
899
- ] = UNSET,
900
- select: OptionalNullable[List[Any]] = UNSET,
901
- return_urls: Optional[bool] = False,
902
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
903
- server_url: Optional[str] = None,
904
- timeout_ms: Optional[int] = None,
905
- http_headers: Optional[Mapping[str, str]] = None,
906
- ) -> models.ListFeaturesResponse:
907
- r"""List Features
908
-
909
- Retrieves a list of features based on
910
- the provided filters and sorting criteria.
911
- If you provide a sort, then pagination isn't supported.
912
-
913
- :param collections: Collection identifiers - can be either collection IDs or collection names
914
- :param offset_feature_id: The offset id to start returning results from. Used for pagination
915
- :param page_size:
916
- :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.
917
- :param filters: Complex nested query filters
918
- :param sort: List of fields to sort by, with direction (asc or desc). NOTE: fields will require a specialty index to use this, consult with the team.
919
- :param select: List of fields to return in results, supports dot notation. Everything else is excluded.
920
- :param return_urls: When true, generates presigned URLs for assets
921
- :param retries: Override the default retry configuration for this method
922
- :param server_url: Override the default server URL for this method
923
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
924
- :param http_headers: Additional headers to set or replace on requests.
925
- """
926
- base_url = None
927
- url_variables = None
928
- if timeout_ms is None:
929
- timeout_ms = self.sdk_configuration.timeout_ms
930
-
931
- if server_url is not None:
932
- base_url = server_url
933
- else:
934
- base_url = self._get_url(base_url, url_variables)
935
-
936
- request = models.ListFeaturesV1FeaturesPostRequest(
937
- offset_feature_id=offset_feature_id,
938
- page_size=page_size,
939
- x_namespace=x_namespace,
940
- list_features_request=models.ListFeaturesRequest(
941
- collections=collections,
942
- filters=utils.get_pydantic_model(
943
- filters, OptionalNullable[models.LogicalOperator]
944
- ),
945
- sort=utils.get_pydantic_model(
946
- sort, OptionalNullable[models.SortOption]
947
- ),
948
- select=select,
949
- return_urls=return_urls,
950
- ),
951
- )
952
-
953
- req = self._build_request_async(
954
- method="POST",
955
- path="/v1/features",
956
- base_url=base_url,
957
- url_variables=url_variables,
958
- request=request,
959
- request_body_required=True,
960
- request_has_path_params=False,
961
- request_has_query_params=True,
962
- user_agent_header="user-agent",
963
- accept_header_value="application/json",
964
- http_headers=http_headers,
965
- security=self.sdk_configuration.security,
966
- get_serialized_body=lambda: utils.serialize_request_body(
967
- request.list_features_request,
968
- False,
969
- False,
970
- "json",
971
- models.ListFeaturesRequest,
972
- ),
973
- timeout_ms=timeout_ms,
974
- )
975
-
976
- if retries == UNSET:
977
- if self.sdk_configuration.retry_config is not UNSET:
978
- retries = self.sdk_configuration.retry_config
979
-
980
- retry_config = None
981
- if isinstance(retries, utils.RetryConfig):
982
- retry_config = (retries, ["429", "500", "502", "503", "504"])
983
-
984
- http_res = await self.do_request_async(
985
- hook_ctx=HookContext(
986
- base_url=base_url or "",
987
- operation_id="list_features_v1_features_post",
988
- oauth2_scopes=[],
989
- security_source=get_security_from_env(
990
- self.sdk_configuration.security, models.Security
991
- ),
992
- ),
993
- request=req,
994
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
995
- retry_config=retry_config,
996
- )
997
-
998
- response_data: Any = None
999
- if utils.match_response(http_res, "200", "application/json"):
1000
- return utils.unmarshal_json(http_res.text, models.ListFeaturesResponse)
1001
- if utils.match_response(
1002
- http_res, ["400", "401", "403", "404"], "application/json"
1003
- ):
1004
- response_data = utils.unmarshal_json(
1005
- http_res.text, models.ErrorResponseData
1006
- )
1007
- raise models.ErrorResponse(data=response_data)
1008
- if utils.match_response(http_res, "422", "application/json"):
1009
- response_data = utils.unmarshal_json(
1010
- http_res.text, models.HTTPValidationErrorData
1011
- )
1012
- raise models.HTTPValidationError(data=response_data)
1013
- if utils.match_response(http_res, "500", "application/json"):
1014
- response_data = utils.unmarshal_json(
1015
- http_res.text, models.ErrorResponseData
1016
- )
1017
- raise models.ErrorResponse(data=response_data)
1018
- if utils.match_response(http_res, "4XX", "*"):
1019
- http_res_text = await utils.stream_to_text_async(http_res)
1020
- raise models.APIError(
1021
- "API error occurred", http_res.status_code, http_res_text, http_res
1022
- )
1023
- if utils.match_response(http_res, "5XX", "*"):
1024
- http_res_text = await utils.stream_to_text_async(http_res)
1025
- raise models.APIError(
1026
- "API error occurred", http_res.status_code, http_res_text, http_res
1027
- )
1028
-
1029
- content_type = http_res.headers.get("Content-Type")
1030
- http_res_text = await utils.stream_to_text_async(http_res)
1031
- raise models.APIError(
1032
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1033
- http_res.status_code,
1034
- http_res_text,
1035
- http_res,
1036
- )
1037
-
1038
- def search(
1039
- self,
1040
- *,
1041
- collections: List[str],
1042
- offset_position: OptionalNullable[int] = UNSET,
1043
- page_size: Optional[int] = 10,
1044
- x_namespace: OptionalNullable[str] = UNSET,
1045
- queries: OptionalNullable[
1046
- Union[
1047
- List[models.SearchModelSearchQuery],
1048
- List[models.SearchModelSearchQueryTypedDict],
1049
- ]
1050
- ] = UNSET,
1051
- filters: OptionalNullable[
1052
- Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
1053
- ] = UNSET,
1054
- group_by: OptionalNullable[
1055
- Union[models.GroupByOptions, models.GroupByOptionsTypedDict]
1056
- ] = UNSET,
1057
- sort: OptionalNullable[
1058
- Union[models.SortOption, models.SortOptionTypedDict]
1059
- ] = UNSET,
1060
- select: OptionalNullable[List[str]] = UNSET,
1061
- reranking_options: OptionalNullable[
1062
- Union[models.RerankingOptions, models.RerankingOptionsTypedDict]
1063
- ] = UNSET,
1064
- session_id: OptionalNullable[str] = UNSET,
1065
- return_url: OptionalNullable[bool] = UNSET,
1066
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1067
- server_url: Optional[str] = None,
1068
- timeout_ms: Optional[int] = None,
1069
- http_headers: Optional[Mapping[str, str]] = None,
1070
- ) -> models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost:
1071
- r"""Search Features
1072
-
1073
- This endpoint allows you to search features.
1074
-
1075
- :param collections: List of Collection names to search within, required
1076
- :param offset_position: The position to start returning results from. Used for pagination. Does not work with group_by
1077
- :param page_size: Number of results to return per page.
1078
- :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.
1079
- :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.
1080
- :param filters: Used for filtering across all indexes
1081
- :param group_by: Grouping options for search results
1082
- :param sort: List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields.
1083
- :param select: List of fields to return in results, supports dot notation. If None, all fields are returned.
1084
- :param reranking_options: Options for ranking the search results, including weights and feedback application
1085
- :param session_id: Identifier for tracking search session interactions
1086
- :param return_url: Return the presigned URL for the asset and preview asset, this will introduce additional latency
1087
- :param retries: Override the default retry configuration for this method
1088
- :param server_url: Override the default server URL for this method
1089
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1090
- :param http_headers: Additional headers to set or replace on requests.
1091
- """
1092
- base_url = None
1093
- url_variables = None
1094
- if timeout_ms is None:
1095
- timeout_ms = self.sdk_configuration.timeout_ms
1096
-
1097
- if server_url is not None:
1098
- base_url = server_url
1099
- else:
1100
- base_url = self._get_url(base_url, url_variables)
1101
-
1102
- request = models.SearchFeaturesV1FeaturesSearchPostRequest(
1103
- offset_position=offset_position,
1104
- page_size=page_size,
1105
- x_namespace=x_namespace,
1106
- search_request_features=models.SearchRequestFeatures(
1107
- queries=utils.get_pydantic_model(
1108
- queries, OptionalNullable[List[models.SearchModelSearchQuery]]
1109
- ),
1110
- collections=collections,
1111
- filters=utils.get_pydantic_model(
1112
- filters, OptionalNullable[models.LogicalOperator]
1113
- ),
1114
- group_by=utils.get_pydantic_model(
1115
- group_by, OptionalNullable[models.GroupByOptions]
1116
- ),
1117
- sort=utils.get_pydantic_model(
1118
- sort, OptionalNullable[models.SortOption]
1119
- ),
1120
- select=select,
1121
- reranking_options=utils.get_pydantic_model(
1122
- reranking_options, OptionalNullable[models.RerankingOptions]
1123
- ),
1124
- session_id=session_id,
1125
- return_url=return_url,
1126
- ),
1127
- )
1128
-
1129
- req = self._build_request(
1130
- method="POST",
1131
- path="/v1/features/search",
1132
- base_url=base_url,
1133
- url_variables=url_variables,
1134
- request=request,
1135
- request_body_required=True,
1136
- request_has_path_params=False,
1137
- request_has_query_params=True,
1138
- user_agent_header="user-agent",
1139
- accept_header_value="application/json",
1140
- http_headers=http_headers,
1141
- security=self.sdk_configuration.security,
1142
- get_serialized_body=lambda: utils.serialize_request_body(
1143
- request.search_request_features,
1144
- False,
1145
- False,
1146
- "json",
1147
- models.SearchRequestFeatures,
1148
- ),
1149
- timeout_ms=timeout_ms,
1150
- )
1151
-
1152
- if retries == UNSET:
1153
- if self.sdk_configuration.retry_config is not UNSET:
1154
- retries = self.sdk_configuration.retry_config
1155
-
1156
- retry_config = None
1157
- if isinstance(retries, utils.RetryConfig):
1158
- retry_config = (retries, ["429", "500", "502", "503", "504"])
1159
-
1160
- http_res = self.do_request(
1161
- hook_ctx=HookContext(
1162
- base_url=base_url or "",
1163
- operation_id="search_features_v1_features_search_post",
1164
- oauth2_scopes=[],
1165
- security_source=get_security_from_env(
1166
- self.sdk_configuration.security, models.Security
1167
- ),
1168
- ),
1169
- request=req,
1170
- error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
1171
- retry_config=retry_config,
1172
- )
1173
-
1174
- response_data: Any = None
1175
- if utils.match_response(http_res, "200", "application/json"):
1176
- return utils.unmarshal_json(
1177
- http_res.text,
1178
- models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
1179
- )
1180
- if utils.match_response(
1181
- http_res, ["400", "401", "403", "404"], "application/json"
1182
- ):
1183
- response_data = utils.unmarshal_json(
1184
- http_res.text, models.ErrorResponseData
1185
- )
1186
- raise models.ErrorResponse(data=response_data)
1187
- if utils.match_response(http_res, "422", "application/json"):
1188
- response_data = utils.unmarshal_json(
1189
- http_res.text, models.HTTPValidationErrorData
1190
- )
1191
- raise models.HTTPValidationError(data=response_data)
1192
- if utils.match_response(http_res, "500", "application/json"):
1193
- response_data = utils.unmarshal_json(
1194
- http_res.text, models.ErrorResponseData
1195
- )
1196
- raise models.ErrorResponse(data=response_data)
1197
- if utils.match_response(http_res, "4XX", "*"):
1198
- http_res_text = utils.stream_to_text(http_res)
1199
- raise models.APIError(
1200
- "API error occurred", http_res.status_code, http_res_text, http_res
1201
- )
1202
- if utils.match_response(http_res, "5XX", "*"):
1203
- http_res_text = utils.stream_to_text(http_res)
1204
- raise models.APIError(
1205
- "API error occurred", http_res.status_code, http_res_text, http_res
1206
- )
1207
-
1208
- content_type = http_res.headers.get("Content-Type")
1209
- http_res_text = utils.stream_to_text(http_res)
1210
- raise models.APIError(
1211
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1212
- http_res.status_code,
1213
- http_res_text,
1214
- http_res,
1215
- )
1216
-
1217
- async def search_async(
1218
- self,
1219
- *,
1220
- collections: List[str],
1221
- offset_position: OptionalNullable[int] = UNSET,
1222
- page_size: Optional[int] = 10,
1223
- x_namespace: OptionalNullable[str] = UNSET,
1224
- queries: OptionalNullable[
1225
- Union[
1226
- List[models.SearchModelSearchQuery],
1227
- List[models.SearchModelSearchQueryTypedDict],
1228
- ]
1229
- ] = UNSET,
1230
- filters: OptionalNullable[
1231
- Union[models.LogicalOperator, models.LogicalOperatorTypedDict]
1232
- ] = UNSET,
1233
- group_by: OptionalNullable[
1234
- Union[models.GroupByOptions, models.GroupByOptionsTypedDict]
1235
- ] = UNSET,
1236
- sort: OptionalNullable[
1237
- Union[models.SortOption, models.SortOptionTypedDict]
1238
- ] = UNSET,
1239
- select: OptionalNullable[List[str]] = UNSET,
1240
- reranking_options: OptionalNullable[
1241
- Union[models.RerankingOptions, models.RerankingOptionsTypedDict]
1242
- ] = UNSET,
1243
- session_id: OptionalNullable[str] = UNSET,
1244
- return_url: OptionalNullable[bool] = UNSET,
1245
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1246
- server_url: Optional[str] = None,
1247
- timeout_ms: Optional[int] = None,
1248
- http_headers: Optional[Mapping[str, str]] = None,
1249
- ) -> models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost:
1250
- r"""Search Features
1251
-
1252
- This endpoint allows you to search features.
1253
-
1254
- :param collections: List of Collection names to search within, required
1255
- :param offset_position: The position to start returning results from. Used for pagination. Does not work with group_by
1256
- :param page_size: Number of results to return per page.
1257
- :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.
1258
- :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.
1259
- :param filters: Used for filtering across all indexes
1260
- :param group_by: Grouping options for search results
1261
- :param sort: List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields.
1262
- :param select: List of fields to return in results, supports dot notation. If None, all fields are returned.
1263
- :param reranking_options: Options for ranking the search results, including weights and feedback application
1264
- :param session_id: Identifier for tracking search session interactions
1265
- :param return_url: Return the presigned URL for the asset and preview asset, this will introduce additional latency
1266
- :param retries: Override the default retry configuration for this method
1267
- :param server_url: Override the default server URL for this method
1268
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1269
- :param http_headers: Additional headers to set or replace on requests.
1270
- """
1271
- base_url = None
1272
- url_variables = None
1273
- if timeout_ms is None:
1274
- timeout_ms = self.sdk_configuration.timeout_ms
1275
-
1276
- if server_url is not None:
1277
- base_url = server_url
1278
- else:
1279
- base_url = self._get_url(base_url, url_variables)
1280
-
1281
- request = models.SearchFeaturesV1FeaturesSearchPostRequest(
1282
- offset_position=offset_position,
1283
- page_size=page_size,
1284
- x_namespace=x_namespace,
1285
- search_request_features=models.SearchRequestFeatures(
1286
- queries=utils.get_pydantic_model(
1287
- queries, OptionalNullable[List[models.SearchModelSearchQuery]]
1288
- ),
1289
- collections=collections,
1290
- filters=utils.get_pydantic_model(
1291
- filters, OptionalNullable[models.LogicalOperator]
1292
- ),
1293
- group_by=utils.get_pydantic_model(
1294
- group_by, OptionalNullable[models.GroupByOptions]
1295
- ),
1296
- sort=utils.get_pydantic_model(
1297
- sort, OptionalNullable[models.SortOption]
1298
- ),
1299
- select=select,
1300
- reranking_options=utils.get_pydantic_model(
1301
- reranking_options, OptionalNullable[models.RerankingOptions]
1302
- ),
1303
- session_id=session_id,
1304
- return_url=return_url,
1305
- ),
1306
- )
1307
-
1308
- req = self._build_request_async(
1309
- method="POST",
1310
- path="/v1/features/search",
1311
- base_url=base_url,
1312
- url_variables=url_variables,
1313
- request=request,
1314
- request_body_required=True,
1315
- request_has_path_params=False,
1316
- request_has_query_params=True,
1317
- user_agent_header="user-agent",
1318
- accept_header_value="application/json",
1319
- http_headers=http_headers,
1320
- security=self.sdk_configuration.security,
1321
- get_serialized_body=lambda: utils.serialize_request_body(
1322
- request.search_request_features,
1323
- False,
1324
- False,
1325
- "json",
1326
- models.SearchRequestFeatures,
1327
- ),
1328
383
  timeout_ms=timeout_ms,
1329
384
  )
1330
385
 
@@ -1339,7 +394,7 @@ class Features(BaseSDK):
1339
394
  http_res = await self.do_request_async(
1340
395
  hook_ctx=HookContext(
1341
396
  base_url=base_url or "",
1342
- operation_id="search_features_v1_features_search_post",
397
+ operation_id="get_feature_extractor_v1_features_extractors__feature_id__get",
1343
398
  oauth2_scopes=[],
1344
399
  security_source=get_security_from_env(
1345
400
  self.sdk_configuration.security, models.Security
@@ -1353,8 +408,7 @@ class Features(BaseSDK):
1353
408
  response_data: Any = None
1354
409
  if utils.match_response(http_res, "200", "application/json"):
1355
410
  return utils.unmarshal_json(
1356
- http_res.text,
1357
- models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
411
+ http_res.text, models.FeatureExtractorDefinition
1358
412
  )
1359
413
  if utils.match_response(
1360
414
  http_res, ["400", "401", "403", "404"], "application/json"