mixpeek 0.21.7__py3-none-any.whl → 0.22.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mixpeek/_hooks/types.py +7 -0
- mixpeek/_version.py +3 -3
- mixpeek/basesdk.py +12 -20
- mixpeek/bucketobjects.py +19 -37
- mixpeek/buckets.py +19 -31
- mixpeek/clusters.py +2 -0
- mixpeek/collectioncache.py +6 -0
- mixpeek/collections.py +13 -19
- mixpeek/features.py +4 -0
- mixpeek/health.py +2 -0
- mixpeek/httpclient.py +6 -16
- mixpeek/models/__init__.py +752 -583
- mixpeek/models/blobmodel.py +3 -11
- mixpeek/models/bucketcreaterequest.py +3 -11
- mixpeek/models/bucketresponse.py +3 -11
- mixpeek/models/bucketschemafield_input.py +6 -22
- mixpeek/models/bucketschemafield_output.py +6 -22
- mixpeek/models/bucketschemafieldbase.py +81 -0
- mixpeek/models/bucketschemafieldtype.py +1 -0
- mixpeek/models/bucketupdaterequest.py +3 -10
- mixpeek/models/collectionmodel.py +3 -11
- mixpeek/models/createblobrequest.py +3 -11
- mixpeek/models/createcollectionrequest.py +3 -11
- mixpeek/models/createnamespacerequest.py +9 -9
- mixpeek/models/createobjectrequest.py +3 -11
- mixpeek/models/createretrieverrequest.py +8 -16
- mixpeek/models/errordetail.py +3 -10
- mixpeek/models/featureextractorconfig.py +3 -11
- mixpeek/models/featureextractordefinition.py +26 -46
- mixpeek/models/interactionresponse.py +3 -11
- mixpeek/models/internal/__init__.py +35 -1
- mixpeek/models/logicaloperator_input.py +30 -36
- mixpeek/models/logicaloperator_output.py +39 -45
- mixpeek/models/logicaloperatorbase_input.py +74 -0
- mixpeek/models/logicaloperatorbase_output.py +74 -0
- mixpeek/models/namespaceresponse.py +17 -6
- mixpeek/models/namespacestatus.py +10 -0
- mixpeek/models/objectresponse.py +3 -11
- mixpeek/models/organizationmodel.py +3 -11
- mixpeek/models/retrieverbinding.py +3 -10
- mixpeek/models/retrievermodel.py +11 -16
- mixpeek/models/retrieverqueryrequest.py +3 -11
- mixpeek/models/retrieverschema_input.py +37 -0
- mixpeek/models/retrieverschema_output.py +37 -0
- mixpeek/models/retrieverschemafield_input.py +91 -0
- mixpeek/models/retrieverschemafield_output.py +91 -0
- mixpeek/models/searchinteraction.py +3 -11
- mixpeek/models/stageconfig_input.py +8 -16
- mixpeek/models/stageconfig_output.py +8 -16
- mixpeek/models/stagedefinition.py +28 -17
- mixpeek/models/stageresponse.py +3 -11
- mixpeek/models/updateobjectrequest.py +3 -11
- mixpeek/models/usermodel_input.py +3 -11
- mixpeek/models/usermodel_output.py +3 -11
- mixpeek/namespaces.py +28 -22
- mixpeek/organizationnotifications.py +2 -0
- mixpeek/organizations.py +13 -13
- mixpeek/organizationsusage.py +2 -0
- mixpeek/research.py +2 -0
- mixpeek/retrieverinteractions.py +13 -19
- mixpeek/retrievers.py +21 -39
- mixpeek/retrieverstages.py +2 -0
- mixpeek/sdk.py +94 -65
- mixpeek/sdkconfiguration.py +0 -7
- mixpeek/tasks.py +6 -0
- mixpeek/taxonomies.py +2 -0
- mixpeek/users.py +6 -0
- mixpeek/utils/__init__.py +131 -45
- mixpeek/utils/datetimes.py +23 -0
- mixpeek/utils/serializers.py +32 -3
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/METADATA +3 -15
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/RECORD +73 -75
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/WHEEL +1 -1
- mixpeek/collectiondocuments.py +0 -1564
- mixpeek/models/batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py +0 -75
- mixpeek/models/batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py +0 -84
- mixpeek/models/delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py +0 -70
- mixpeek/models/documentlistresponse.py +0 -56
- mixpeek/models/documentresponse.py +0 -87
- mixpeek/models/documentupdate.py +0 -60
- mixpeek/models/genericsuccessresponse.py +0 -17
- mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +0 -70
- mixpeek/models/list_documents_v1_collections_collection_identifier_documents_getop.py +0 -114
- mixpeek/models/update_document_v1_collections_collection_identifier_documents_document_id_putop.py +0 -83
mixpeek/features.py
CHANGED
@@ -61,6 +61,7 @@ class Features(BaseSDK):
|
|
61
61
|
|
62
62
|
http_res = self.do_request(
|
63
63
|
hook_ctx=HookContext(
|
64
|
+
config=self.sdk_configuration,
|
64
65
|
base_url=base_url or "",
|
65
66
|
operation_id="list_feature_extractors_v1_features_extractors_get",
|
66
67
|
oauth2_scopes=[],
|
@@ -167,6 +168,7 @@ class Features(BaseSDK):
|
|
167
168
|
|
168
169
|
http_res = await self.do_request_async(
|
169
170
|
hook_ctx=HookContext(
|
171
|
+
config=self.sdk_configuration,
|
170
172
|
base_url=base_url or "",
|
171
173
|
operation_id="list_feature_extractors_v1_features_extractors_get",
|
172
174
|
oauth2_scopes=[],
|
@@ -280,6 +282,7 @@ class Features(BaseSDK):
|
|
280
282
|
|
281
283
|
http_res = self.do_request(
|
282
284
|
hook_ctx=HookContext(
|
285
|
+
config=self.sdk_configuration,
|
283
286
|
base_url=base_url or "",
|
284
287
|
operation_id="get_feature_extractor_v1_features_extractors__feature_id__get",
|
285
288
|
oauth2_scopes=[],
|
@@ -393,6 +396,7 @@ class Features(BaseSDK):
|
|
393
396
|
|
394
397
|
http_res = await self.do_request_async(
|
395
398
|
hook_ctx=HookContext(
|
399
|
+
config=self.sdk_configuration,
|
396
400
|
base_url=base_url or "",
|
397
401
|
operation_id="get_feature_extractor_v1_features_extractors__feature_id__get",
|
398
402
|
oauth2_scopes=[],
|
mixpeek/health.py
CHANGED
@@ -59,6 +59,7 @@ class Health(BaseSDK):
|
|
59
59
|
|
60
60
|
http_res = self.do_request(
|
61
61
|
hook_ctx=HookContext(
|
62
|
+
config=self.sdk_configuration,
|
62
63
|
base_url=base_url or "",
|
63
64
|
operation_id="healthcheck_healthcheck_get",
|
64
65
|
oauth2_scopes=[],
|
@@ -143,6 +144,7 @@ class Health(BaseSDK):
|
|
143
144
|
|
144
145
|
http_res = await self.do_request_async(
|
145
146
|
hook_ctx=HookContext(
|
147
|
+
config=self.sdk_configuration,
|
146
148
|
base_url=base_url or "",
|
147
149
|
operation_id="healthcheck_healthcheck_get",
|
148
150
|
oauth2_scopes=[],
|
mixpeek/httpclient.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
# pyright: reportReturnType = false
|
4
4
|
import asyncio
|
5
|
-
from concurrent.futures import ThreadPoolExecutor
|
6
5
|
from typing_extensions import Protocol, runtime_checkable
|
7
6
|
import httpx
|
8
7
|
from typing import Any, Optional, Union
|
@@ -116,21 +115,12 @@ def close_clients(
|
|
116
115
|
pass
|
117
116
|
|
118
117
|
if async_client is not None and not async_client_supplied:
|
119
|
-
is_async = False
|
120
118
|
try:
|
121
|
-
asyncio.get_running_loop()
|
122
|
-
|
119
|
+
loop = asyncio.get_running_loop()
|
120
|
+
asyncio.run_coroutine_threadsafe(async_client.aclose(), loop)
|
123
121
|
except RuntimeError:
|
124
|
-
|
125
|
-
|
126
|
-
try:
|
127
|
-
# If this function is called in an async loop then start another
|
128
|
-
# loop in a separate thread to close the async http client.
|
129
|
-
if is_async:
|
130
|
-
with ThreadPoolExecutor(max_workers=1) as executor:
|
131
|
-
future = executor.submit(asyncio.run, async_client.aclose())
|
132
|
-
future.result()
|
133
|
-
else:
|
122
|
+
try:
|
134
123
|
asyncio.run(async_client.aclose())
|
135
|
-
|
136
|
-
|
124
|
+
except RuntimeError:
|
125
|
+
# best effort
|
126
|
+
pass
|