mixpeek 0.12.0__py3-none-any.whl → 0.13__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/__init__.py +5 -79
- mixpeek/_hooks/__init__.py +5 -0
- mixpeek/_hooks/registration.py +13 -0
- mixpeek/_hooks/sdkhooks.py +76 -0
- mixpeek/_hooks/types.py +94 -0
- mixpeek/_version.py +11 -3
- mixpeek/assets.py +1561 -0
- mixpeek/basesdk.py +350 -0
- mixpeek/collections.py +1029 -0
- mixpeek/featureextractors.py +205 -0
- mixpeek/features.py +1181 -0
- mixpeek/health.py +167 -0
- mixpeek/httpclient.py +84 -0
- mixpeek/ingest.py +831 -0
- mixpeek/interactions.py +221 -0
- mixpeek/models/__init__.py +751 -0
- mixpeek/models/actionusage.py +16 -0
- mixpeek/models/apierror.py +22 -0
- mixpeek/models/apikey.py +25 -0
- mixpeek/models/apikeyupdate.py +49 -0
- mixpeek/models/assetfeatures.py +55 -0
- mixpeek/models/assetresponse.py +166 -0
- mixpeek/models/assets_model_searchquery.py +21 -0
- mixpeek/models/assetupdate.py +28 -0
- mixpeek/models/availableindexesresponse.py +23 -0
- mixpeek/models/availablemodels.py +12 -0
- mixpeek/models/boolindexparams.py +18 -0
- mixpeek/models/collectionmodel.py +70 -0
- mixpeek/models/collectionresult.py +73 -0
- mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +23 -0
- mixpeek/models/create_collection_collections_postop.py +62 -0
- mixpeek/models/create_interaction_features_search_interactions_postop.py +59 -0
- mixpeek/models/createcollectionrequest.py +59 -0
- mixpeek/models/createnamespacerequest.py +62 -0
- mixpeek/models/datetimeindexparams.py +18 -0
- mixpeek/models/dateusage.py +22 -0
- mixpeek/models/db_model_paginationresponse.py +59 -0
- mixpeek/models/db_model_taskresponse.py +20 -0
- mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +23 -0
- mixpeek/models/delete_asset_assets_asset_id_deleteop.py +57 -0
- mixpeek/models/delete_collection_collections_collection_deleteop.py +59 -0
- mixpeek/models/delete_feature_features_feature_id_deleteop.py +57 -0
- mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +59 -0
- mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +18 -0
- mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +16 -0
- mixpeek/models/denseembedding.py +16 -0
- mixpeek/models/embeddingrequest.py +59 -0
- mixpeek/models/embeddingresponse.py +64 -0
- mixpeek/models/errormessage.py +13 -0
- mixpeek/models/errorresponse.py +21 -0
- mixpeek/models/facedetectsettings.py +52 -0
- mixpeek/models/featureextractionembeddingrequest.py +54 -0
- mixpeek/models/featureresponse.py +74 -0
- mixpeek/models/features_model_paginationresponse.py +59 -0
- mixpeek/models/featureupdaterequest.py +21 -0
- mixpeek/models/filtercondition.py +74 -0
- mixpeek/models/floatindexparams.py +18 -0
- mixpeek/models/full_asset_update_assets_asset_id_putop.py +69 -0
- mixpeek/models/full_feature_update_features_feature_id_putop.py +69 -0
- mixpeek/models/geoindexparams.py +18 -0
- mixpeek/models/get_asset_assets_asset_id_getop.py +73 -0
- mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +73 -0
- mixpeek/models/get_collection_collections_collection_getop.py +59 -0
- mixpeek/models/get_feature_features_feature_id_getop.py +70 -0
- mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +59 -0
- mixpeek/models/get_namespace_namespaces_namespace_getop.py +18 -0
- mixpeek/models/get_task_tasks_task_id_getop.py +57 -0
- mixpeek/models/get_user_organizations_users_user_email_getop.py +16 -0
- mixpeek/models/groupbyoptions.py +71 -0
- mixpeek/models/groupbyoptionsasset.py +71 -0
- mixpeek/models/groupedassetdata.py +18 -0
- mixpeek/models/healthcheckresponse.py +13 -0
- mixpeek/models/httpvalidationerror.py +21 -0
- mixpeek/models/imagedescribesettings.py +82 -0
- mixpeek/models/imagedetectsettings.py +53 -0
- mixpeek/models/imagereadsettings.py +71 -0
- mixpeek/models/imagesettings.py +79 -0
- mixpeek/models/ingest_image_url_ingest_images_url_postop.py +59 -0
- mixpeek/models/ingest_text_ingest_text_postop.py +59 -0
- mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +59 -0
- mixpeek/models/inputtype.py +11 -0
- mixpeek/models/integerindexparams.py +24 -0
- mixpeek/models/interactionresponse.py +87 -0
- mixpeek/models/interactiontype.py +11 -0
- mixpeek/models/jsonimageoutputsettings.py +55 -0
- mixpeek/models/jsontextoutputsettings.py +55 -0
- mixpeek/models/jsonvideooutputsettings.py +55 -0
- mixpeek/models/keywordindexparams.py +21 -0
- mixpeek/models/kill_task_tasks_task_id_deleteop.py +57 -0
- mixpeek/models/list_assets_assets_postop.py +77 -0
- mixpeek/models/list_collections_collections_getop.py +65 -0
- mixpeek/models/list_features_features_postop.py +79 -0
- mixpeek/models/list_interactions_features_search_interactions_getop.py +96 -0
- mixpeek/models/listassetsrequest.py +75 -0
- mixpeek/models/listassetsresponse.py +22 -0
- mixpeek/models/listcollectionsresponse.py +22 -0
- mixpeek/models/listfeaturesrequest.py +77 -0
- mixpeek/models/listfeaturesresponse.py +22 -0
- mixpeek/models/logicaloperator_input.py +88 -0
- mixpeek/models/logicaloperator_output.py +103 -0
- mixpeek/models/logodetectsettings.py +52 -0
- mixpeek/models/modality.py +13 -0
- mixpeek/models/modeldetails.py +57 -0
- mixpeek/models/namespaceresponse.py +54 -0
- mixpeek/models/organizationmodel.py +45 -0
- mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +69 -0
- mixpeek/models/payloadindexconfig.py +94 -0
- mixpeek/models/payloadindextype.py +17 -0
- mixpeek/models/payloadschematype.py +15 -0
- mixpeek/models/percolaterequest.py +57 -0
- mixpeek/models/permission.py +10 -0
- mixpeek/models/processimageurlinput.py +99 -0
- mixpeek/models/processtextinput.py +94 -0
- mixpeek/models/processvideourlinput.py +99 -0
- mixpeek/models/querysettings.py +56 -0
- mixpeek/models/rerankingoptions.py +47 -0
- mixpeek/models/search_assets_assets_search_postop.py +59 -0
- mixpeek/models/search_features_features_search_postop.py +96 -0
- mixpeek/models/search_model_searchquery_input.py +76 -0
- mixpeek/models/searchassetsrequest.py +78 -0
- mixpeek/models/searchinteraction.py +82 -0
- mixpeek/models/searchquery_output.py +79 -0
- mixpeek/models/searchrequestfeatures_input.py +151 -0
- mixpeek/models/searchrequestfeatures_output.py +151 -0
- mixpeek/models/sortoption.py +28 -0
- mixpeek/models/sparseembedding.py +21 -0
- mixpeek/models/tasks_model_taskresponse.py +24 -0
- mixpeek/models/taskstatus.py +16 -0
- mixpeek/models/textindexparams.py +31 -0
- mixpeek/models/textsettings.py +61 -0
- mixpeek/models/tokenizertype.py +11 -0
- mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +30 -0
- mixpeek/models/update_collection_collections_collection_putop.py +74 -0
- mixpeek/models/update_namespace_namespaces_namespace_putop.py +28 -0
- mixpeek/models/updateassetrequest.py +60 -0
- mixpeek/models/updatenamespacerequest.py +26 -0
- mixpeek/models/usage.py +18 -0
- mixpeek/models/usermodel_input.py +36 -0
- mixpeek/models/usermodel_output.py +36 -0
- mixpeek/models/uuidindexparams.py +21 -0
- mixpeek/models/validationerror.py +26 -0
- mixpeek/models/vectormodel.py +11 -0
- mixpeek/models/vectortype.py +9 -0
- mixpeek/models/videodescribesettings.py +82 -0
- mixpeek/models/videodetectsettings.py +53 -0
- mixpeek/models/videoreadsettings.py +71 -0
- mixpeek/models/videosettings.py +101 -0
- mixpeek/models/videotranscriptionsettings.py +69 -0
- mixpeek/namespaces.py +1143 -0
- mixpeek/organizations.py +1508 -0
- mixpeek/py.typed +1 -0
- mixpeek/sdk.py +135 -0
- mixpeek/sdkconfiguration.py +45 -0
- mixpeek/searchinteractions.py +647 -0
- mixpeek/tasks.py +387 -0
- mixpeek/types/__init__.py +19 -29
- mixpeek/types/basemodel.py +39 -0
- mixpeek/utils/__init__.py +97 -0
- mixpeek/utils/annotations.py +55 -0
- mixpeek/utils/enums.py +34 -0
- mixpeek/utils/eventstreaming.py +238 -0
- mixpeek/utils/forms.py +202 -0
- mixpeek/utils/headers.py +136 -0
- mixpeek/utils/logger.py +27 -0
- mixpeek/utils/metadata.py +118 -0
- mixpeek/utils/queryparams.py +205 -0
- mixpeek/utils/requestbodies.py +66 -0
- mixpeek/utils/retries.py +217 -0
- mixpeek/utils/security.py +174 -0
- mixpeek/utils/serializers.py +215 -0
- mixpeek/utils/url.py +155 -0
- mixpeek/utils/values.py +134 -0
- mixpeek-0.13.dist-info/METADATA +439 -0
- mixpeek-0.13.dist-info/RECORD +176 -0
- {mixpeek-0.12.0.dist-info → mixpeek-0.13.dist-info}/WHEEL +1 -1
- py.typed +1 -0
- mixpeek/_base_client.py +0 -2041
- mixpeek/_client.py +0 -444
- mixpeek/_compat.py +0 -221
- mixpeek/_constants.py +0 -14
- mixpeek/_exceptions.py +0 -108
- mixpeek/_files.py +0 -123
- mixpeek/_models.py +0 -788
- mixpeek/_qs.py +0 -150
- mixpeek/_resource.py +0 -43
- mixpeek/_response.py +0 -824
- mixpeek/_streaming.py +0 -333
- mixpeek/_types.py +0 -219
- mixpeek/_utils/__init__.py +0 -56
- mixpeek/_utils/_logs.py +0 -25
- mixpeek/_utils/_proxy.py +0 -62
- mixpeek/_utils/_reflection.py +0 -42
- mixpeek/_utils/_streams.py +0 -12
- mixpeek/_utils/_sync.py +0 -81
- mixpeek/_utils/_transform.py +0 -387
- mixpeek/_utils/_typing.py +0 -120
- mixpeek/_utils/_utils.py +0 -414
- mixpeek/lib/.keep +0 -4
- mixpeek/resources/__init__.py +0 -117
- mixpeek/resources/accounts.py +0 -271
- mixpeek/resources/assets/__init__.py +0 -33
- mixpeek/resources/assets/assets.py +0 -708
- mixpeek/resources/assets/features.py +0 -172
- mixpeek/resources/collections.py +0 -283
- mixpeek/resources/entities/__init__.py +0 -47
- mixpeek/resources/entities/entities.py +0 -134
- mixpeek/resources/entities/faces.py +0 -514
- mixpeek/resources/entities/labels.py +0 -388
- mixpeek/resources/features/__init__.py +0 -33
- mixpeek/resources/features/features.py +0 -562
- mixpeek/resources/features/search.py +0 -731
- mixpeek/resources/healthcheck.py +0 -135
- mixpeek/resources/index/__init__.py +0 -47
- mixpeek/resources/index/images.py +0 -249
- mixpeek/resources/index/index.py +0 -289
- mixpeek/resources/index/videos.py +0 -249
- mixpeek/resources/tasks.py +0 -258
- mixpeek/types/account_update_params.py +0 -28
- mixpeek/types/asset_create_params.py +0 -36
- mixpeek/types/asset_create_response.py +0 -15
- mixpeek/types/asset_response.py +0 -46
- mixpeek/types/asset_search_params.py +0 -43
- mixpeek/types/asset_search_response.py +0 -15
- mixpeek/types/asset_update_params.py +0 -25
- mixpeek/types/asset_update_response.py +0 -11
- mixpeek/types/assets/__init__.py +0 -3
- mixpeek/types/collection_list_params.py +0 -19
- mixpeek/types/collection_list_response.py +0 -14
- mixpeek/types/entities/__init__.py +0 -13
- mixpeek/types/entities/face_create_params.py +0 -21
- mixpeek/types/entities/face_list_params.py +0 -18
- mixpeek/types/entities/face_list_response.py +0 -15
- mixpeek/types/entities/face_response.py +0 -17
- mixpeek/types/entities/face_update_params.py +0 -22
- mixpeek/types/entities/label_list_params.py +0 -18
- mixpeek/types/entities/label_list_response.py +0 -30
- mixpeek/types/entities/label_response.py +0 -30
- mixpeek/types/entities/label_update_params.py +0 -21
- mixpeek/types/feature.py +0 -32
- mixpeek/types/feature_list_params.py +0 -37
- mixpeek/types/feature_list_response.py +0 -28
- mixpeek/types/feature_retrieve_params.py +0 -18
- mixpeek/types/feature_update_params.py +0 -16
- mixpeek/types/features/__init__.py +0 -8
- mixpeek/types/features/search_feedback_params.py +0 -23
- mixpeek/types/features/search_file_params.py +0 -29
- mixpeek/types/features/search_text_params.py +0 -72
- mixpeek/types/features/search_url_params.py +0 -72
- mixpeek/types/grouped_asset_data.py +0 -24
- mixpeek/types/health_check_response.py +0 -10
- mixpeek/types/index/__init__.py +0 -8
- mixpeek/types/index/image_url_params.py +0 -135
- mixpeek/types/index/image_url_response.py +0 -20
- mixpeek/types/index/video_url_params.py +0 -154
- mixpeek/types/index/video_url_response.py +0 -20
- mixpeek/types/index_text_params.py +0 -77
- mixpeek/types/index_text_response.py +0 -14
- mixpeek/types/shared/__init__.py +0 -7
- mixpeek/types/shared/filter_condition.py +0 -19
- mixpeek/types/shared/logical_operator.py +0 -12
- mixpeek/types/shared/model_pagination_response.py +0 -21
- mixpeek/types/shared/sort_option.py +0 -15
- mixpeek/types/shared/task_response.py +0 -15
- mixpeek/types/shared_params/__init__.py +0 -4
- mixpeek/types/shared_params/logical_operator.py +0 -13
- mixpeek/types/shared_params/sort_option.py +0 -15
- mixpeek/types/user.py +0 -34
- mixpeek-0.12.0.dist-info/METADATA +0 -345
- mixpeek-0.12.0.dist-info/RECORD +0 -99
- mixpeek-0.12.0.dist-info/licenses/LICENSE +0 -201
@@ -1,388 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
from typing import Optional
|
6
|
-
|
7
|
-
import httpx
|
8
|
-
|
9
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
10
|
-
from ..._utils import (
|
11
|
-
maybe_transform,
|
12
|
-
strip_not_given,
|
13
|
-
async_maybe_transform,
|
14
|
-
)
|
15
|
-
from ..._compat import cached_property
|
16
|
-
from ..._resource import SyncAPIResource, AsyncAPIResource
|
17
|
-
from ..._response import (
|
18
|
-
to_raw_response_wrapper,
|
19
|
-
to_streamed_response_wrapper,
|
20
|
-
async_to_raw_response_wrapper,
|
21
|
-
async_to_streamed_response_wrapper,
|
22
|
-
)
|
23
|
-
from ..._base_client import make_request_options
|
24
|
-
from ...types.entities import label_list_params, label_update_params
|
25
|
-
from ...types.entities.label_response import LabelResponse
|
26
|
-
from ...types.entities.label_list_response import LabelListResponse
|
27
|
-
|
28
|
-
__all__ = ["LabelsResource", "AsyncLabelsResource"]
|
29
|
-
|
30
|
-
|
31
|
-
class LabelsResource(SyncAPIResource):
|
32
|
-
@cached_property
|
33
|
-
def with_raw_response(self) -> LabelsResourceWithRawResponse:
|
34
|
-
"""
|
35
|
-
This property can be used as a prefix for any HTTP method call to return the
|
36
|
-
the raw response object instead of the parsed content.
|
37
|
-
|
38
|
-
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
39
|
-
"""
|
40
|
-
return LabelsResourceWithRawResponse(self)
|
41
|
-
|
42
|
-
@cached_property
|
43
|
-
def with_streaming_response(self) -> LabelsResourceWithStreamingResponse:
|
44
|
-
"""
|
45
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
46
|
-
|
47
|
-
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
48
|
-
"""
|
49
|
-
return LabelsResourceWithStreamingResponse(self)
|
50
|
-
|
51
|
-
def update(
|
52
|
-
self,
|
53
|
-
*,
|
54
|
-
path_label_id: str,
|
55
|
-
body_label_id: str,
|
56
|
-
metadata: Optional[object],
|
57
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
58
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
59
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
60
|
-
extra_headers: Headers | None = None,
|
61
|
-
extra_query: Query | None = None,
|
62
|
-
extra_body: Body | None = None,
|
63
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
64
|
-
) -> LabelResponse:
|
65
|
-
"""
|
66
|
-
Update an existing label's metadata
|
67
|
-
|
68
|
-
Args:
|
69
|
-
index_id: filter by organization
|
70
|
-
|
71
|
-
extra_headers: Send extra headers
|
72
|
-
|
73
|
-
extra_query: Add additional query parameters to the request
|
74
|
-
|
75
|
-
extra_body: Add additional JSON properties to the request
|
76
|
-
|
77
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
78
|
-
"""
|
79
|
-
if not path_label_id:
|
80
|
-
raise ValueError(f"Expected a non-empty value for `path_label_id` but received {path_label_id!r}")
|
81
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
82
|
-
return self._patch(
|
83
|
-
f"/entities/labels/{path_label_id}",
|
84
|
-
body=maybe_transform(
|
85
|
-
{
|
86
|
-
"label_id": body_label_id,
|
87
|
-
"metadata": metadata,
|
88
|
-
},
|
89
|
-
label_update_params.LabelUpdateParams,
|
90
|
-
),
|
91
|
-
options=make_request_options(
|
92
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
93
|
-
),
|
94
|
-
cast_to=LabelResponse,
|
95
|
-
)
|
96
|
-
|
97
|
-
def list(
|
98
|
-
self,
|
99
|
-
*,
|
100
|
-
page: int | NotGiven = NOT_GIVEN,
|
101
|
-
page_size: int | NotGiven = NOT_GIVEN,
|
102
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
103
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
104
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
105
|
-
extra_headers: Headers | None = None,
|
106
|
-
extra_query: Query | None = None,
|
107
|
-
extra_body: Body | None = None,
|
108
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
109
|
-
) -> LabelListResponse:
|
110
|
-
"""
|
111
|
-
List all registered labels
|
112
|
-
|
113
|
-
Args:
|
114
|
-
index_id: filter by organization
|
115
|
-
|
116
|
-
extra_headers: Send extra headers
|
117
|
-
|
118
|
-
extra_query: Add additional query parameters to the request
|
119
|
-
|
120
|
-
extra_body: Add additional JSON properties to the request
|
121
|
-
|
122
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
123
|
-
"""
|
124
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
125
|
-
return self._get(
|
126
|
-
"/entities/labels",
|
127
|
-
options=make_request_options(
|
128
|
-
extra_headers=extra_headers,
|
129
|
-
extra_query=extra_query,
|
130
|
-
extra_body=extra_body,
|
131
|
-
timeout=timeout,
|
132
|
-
query=maybe_transform(
|
133
|
-
{
|
134
|
-
"page": page,
|
135
|
-
"page_size": page_size,
|
136
|
-
},
|
137
|
-
label_list_params.LabelListParams,
|
138
|
-
),
|
139
|
-
),
|
140
|
-
cast_to=LabelListResponse,
|
141
|
-
)
|
142
|
-
|
143
|
-
def delete(
|
144
|
-
self,
|
145
|
-
label_id: str,
|
146
|
-
*,
|
147
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
148
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
149
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
150
|
-
extra_headers: Headers | None = None,
|
151
|
-
extra_query: Query | None = None,
|
152
|
-
extra_body: Body | None = None,
|
153
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
154
|
-
) -> object:
|
155
|
-
"""
|
156
|
-
Delete a specific label
|
157
|
-
|
158
|
-
Args:
|
159
|
-
index_id: filter by organization
|
160
|
-
|
161
|
-
extra_headers: Send extra headers
|
162
|
-
|
163
|
-
extra_query: Add additional query parameters to the request
|
164
|
-
|
165
|
-
extra_body: Add additional JSON properties to the request
|
166
|
-
|
167
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
168
|
-
"""
|
169
|
-
if not label_id:
|
170
|
-
raise ValueError(f"Expected a non-empty value for `label_id` but received {label_id!r}")
|
171
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
172
|
-
return self._delete(
|
173
|
-
f"/entities/labels/{label_id}",
|
174
|
-
options=make_request_options(
|
175
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
176
|
-
),
|
177
|
-
cast_to=object,
|
178
|
-
)
|
179
|
-
|
180
|
-
|
181
|
-
class AsyncLabelsResource(AsyncAPIResource):
|
182
|
-
@cached_property
|
183
|
-
def with_raw_response(self) -> AsyncLabelsResourceWithRawResponse:
|
184
|
-
"""
|
185
|
-
This property can be used as a prefix for any HTTP method call to return the
|
186
|
-
the raw response object instead of the parsed content.
|
187
|
-
|
188
|
-
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
189
|
-
"""
|
190
|
-
return AsyncLabelsResourceWithRawResponse(self)
|
191
|
-
|
192
|
-
@cached_property
|
193
|
-
def with_streaming_response(self) -> AsyncLabelsResourceWithStreamingResponse:
|
194
|
-
"""
|
195
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
196
|
-
|
197
|
-
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
198
|
-
"""
|
199
|
-
return AsyncLabelsResourceWithStreamingResponse(self)
|
200
|
-
|
201
|
-
async def update(
|
202
|
-
self,
|
203
|
-
*,
|
204
|
-
path_label_id: str,
|
205
|
-
body_label_id: str,
|
206
|
-
metadata: Optional[object],
|
207
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
208
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
209
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
210
|
-
extra_headers: Headers | None = None,
|
211
|
-
extra_query: Query | None = None,
|
212
|
-
extra_body: Body | None = None,
|
213
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
214
|
-
) -> LabelResponse:
|
215
|
-
"""
|
216
|
-
Update an existing label's metadata
|
217
|
-
|
218
|
-
Args:
|
219
|
-
index_id: filter by organization
|
220
|
-
|
221
|
-
extra_headers: Send extra headers
|
222
|
-
|
223
|
-
extra_query: Add additional query parameters to the request
|
224
|
-
|
225
|
-
extra_body: Add additional JSON properties to the request
|
226
|
-
|
227
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
228
|
-
"""
|
229
|
-
if not path_label_id:
|
230
|
-
raise ValueError(f"Expected a non-empty value for `path_label_id` but received {path_label_id!r}")
|
231
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
232
|
-
return await self._patch(
|
233
|
-
f"/entities/labels/{path_label_id}",
|
234
|
-
body=await async_maybe_transform(
|
235
|
-
{
|
236
|
-
"label_id": body_label_id,
|
237
|
-
"metadata": metadata,
|
238
|
-
},
|
239
|
-
label_update_params.LabelUpdateParams,
|
240
|
-
),
|
241
|
-
options=make_request_options(
|
242
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
243
|
-
),
|
244
|
-
cast_to=LabelResponse,
|
245
|
-
)
|
246
|
-
|
247
|
-
async def list(
|
248
|
-
self,
|
249
|
-
*,
|
250
|
-
page: int | NotGiven = NOT_GIVEN,
|
251
|
-
page_size: int | NotGiven = NOT_GIVEN,
|
252
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
253
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
254
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
255
|
-
extra_headers: Headers | None = None,
|
256
|
-
extra_query: Query | None = None,
|
257
|
-
extra_body: Body | None = None,
|
258
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
259
|
-
) -> LabelListResponse:
|
260
|
-
"""
|
261
|
-
List all registered labels
|
262
|
-
|
263
|
-
Args:
|
264
|
-
index_id: filter by organization
|
265
|
-
|
266
|
-
extra_headers: Send extra headers
|
267
|
-
|
268
|
-
extra_query: Add additional query parameters to the request
|
269
|
-
|
270
|
-
extra_body: Add additional JSON properties to the request
|
271
|
-
|
272
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
273
|
-
"""
|
274
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
275
|
-
return await self._get(
|
276
|
-
"/entities/labels",
|
277
|
-
options=make_request_options(
|
278
|
-
extra_headers=extra_headers,
|
279
|
-
extra_query=extra_query,
|
280
|
-
extra_body=extra_body,
|
281
|
-
timeout=timeout,
|
282
|
-
query=await async_maybe_transform(
|
283
|
-
{
|
284
|
-
"page": page,
|
285
|
-
"page_size": page_size,
|
286
|
-
},
|
287
|
-
label_list_params.LabelListParams,
|
288
|
-
),
|
289
|
-
),
|
290
|
-
cast_to=LabelListResponse,
|
291
|
-
)
|
292
|
-
|
293
|
-
async def delete(
|
294
|
-
self,
|
295
|
-
label_id: str,
|
296
|
-
*,
|
297
|
-
index_id: str | NotGiven = NOT_GIVEN,
|
298
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
299
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
300
|
-
extra_headers: Headers | None = None,
|
301
|
-
extra_query: Query | None = None,
|
302
|
-
extra_body: Body | None = None,
|
303
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
304
|
-
) -> object:
|
305
|
-
"""
|
306
|
-
Delete a specific label
|
307
|
-
|
308
|
-
Args:
|
309
|
-
index_id: filter by organization
|
310
|
-
|
311
|
-
extra_headers: Send extra headers
|
312
|
-
|
313
|
-
extra_query: Add additional query parameters to the request
|
314
|
-
|
315
|
-
extra_body: Add additional JSON properties to the request
|
316
|
-
|
317
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
318
|
-
"""
|
319
|
-
if not label_id:
|
320
|
-
raise ValueError(f"Expected a non-empty value for `label_id` but received {label_id!r}")
|
321
|
-
extra_headers = {**strip_not_given({"index-id": index_id}), **(extra_headers or {})}
|
322
|
-
return await self._delete(
|
323
|
-
f"/entities/labels/{label_id}",
|
324
|
-
options=make_request_options(
|
325
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
326
|
-
),
|
327
|
-
cast_to=object,
|
328
|
-
)
|
329
|
-
|
330
|
-
|
331
|
-
class LabelsResourceWithRawResponse:
|
332
|
-
def __init__(self, labels: LabelsResource) -> None:
|
333
|
-
self._labels = labels
|
334
|
-
|
335
|
-
self.update = to_raw_response_wrapper(
|
336
|
-
labels.update,
|
337
|
-
)
|
338
|
-
self.list = to_raw_response_wrapper(
|
339
|
-
labels.list,
|
340
|
-
)
|
341
|
-
self.delete = to_raw_response_wrapper(
|
342
|
-
labels.delete,
|
343
|
-
)
|
344
|
-
|
345
|
-
|
346
|
-
class AsyncLabelsResourceWithRawResponse:
|
347
|
-
def __init__(self, labels: AsyncLabelsResource) -> None:
|
348
|
-
self._labels = labels
|
349
|
-
|
350
|
-
self.update = async_to_raw_response_wrapper(
|
351
|
-
labels.update,
|
352
|
-
)
|
353
|
-
self.list = async_to_raw_response_wrapper(
|
354
|
-
labels.list,
|
355
|
-
)
|
356
|
-
self.delete = async_to_raw_response_wrapper(
|
357
|
-
labels.delete,
|
358
|
-
)
|
359
|
-
|
360
|
-
|
361
|
-
class LabelsResourceWithStreamingResponse:
|
362
|
-
def __init__(self, labels: LabelsResource) -> None:
|
363
|
-
self._labels = labels
|
364
|
-
|
365
|
-
self.update = to_streamed_response_wrapper(
|
366
|
-
labels.update,
|
367
|
-
)
|
368
|
-
self.list = to_streamed_response_wrapper(
|
369
|
-
labels.list,
|
370
|
-
)
|
371
|
-
self.delete = to_streamed_response_wrapper(
|
372
|
-
labels.delete,
|
373
|
-
)
|
374
|
-
|
375
|
-
|
376
|
-
class AsyncLabelsResourceWithStreamingResponse:
|
377
|
-
def __init__(self, labels: AsyncLabelsResource) -> None:
|
378
|
-
self._labels = labels
|
379
|
-
|
380
|
-
self.update = async_to_streamed_response_wrapper(
|
381
|
-
labels.update,
|
382
|
-
)
|
383
|
-
self.list = async_to_streamed_response_wrapper(
|
384
|
-
labels.list,
|
385
|
-
)
|
386
|
-
self.delete = async_to_streamed_response_wrapper(
|
387
|
-
labels.delete,
|
388
|
-
)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from .search import (
|
4
|
-
SearchResource,
|
5
|
-
AsyncSearchResource,
|
6
|
-
SearchResourceWithRawResponse,
|
7
|
-
AsyncSearchResourceWithRawResponse,
|
8
|
-
SearchResourceWithStreamingResponse,
|
9
|
-
AsyncSearchResourceWithStreamingResponse,
|
10
|
-
)
|
11
|
-
from .features import (
|
12
|
-
FeaturesResource,
|
13
|
-
AsyncFeaturesResource,
|
14
|
-
FeaturesResourceWithRawResponse,
|
15
|
-
AsyncFeaturesResourceWithRawResponse,
|
16
|
-
FeaturesResourceWithStreamingResponse,
|
17
|
-
AsyncFeaturesResourceWithStreamingResponse,
|
18
|
-
)
|
19
|
-
|
20
|
-
__all__ = [
|
21
|
-
"SearchResource",
|
22
|
-
"AsyncSearchResource",
|
23
|
-
"SearchResourceWithRawResponse",
|
24
|
-
"AsyncSearchResourceWithRawResponse",
|
25
|
-
"SearchResourceWithStreamingResponse",
|
26
|
-
"AsyncSearchResourceWithStreamingResponse",
|
27
|
-
"FeaturesResource",
|
28
|
-
"AsyncFeaturesResource",
|
29
|
-
"FeaturesResourceWithRawResponse",
|
30
|
-
"AsyncFeaturesResourceWithRawResponse",
|
31
|
-
"FeaturesResourceWithStreamingResponse",
|
32
|
-
"AsyncFeaturesResourceWithStreamingResponse",
|
33
|
-
]
|