mixpeek 0.11.2__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 +9 -1
- 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 +12 -0
- 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 +21 -0
- 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.11.2.dist-info → mixpeek-0.13.dist-info}/WHEEL +1 -2
- py.typed +1 -0
- mixpeek/client.py +0 -27
- mixpeek/endpoints/__init__.py +0 -0
- mixpeek/endpoints/collections.py +0 -86
- mixpeek/endpoints/embed.py +0 -66
- mixpeek/endpoints/index.py +0 -51
- mixpeek/endpoints/register.py +0 -34
- mixpeek/endpoints/search.py +0 -44
- mixpeek/endpoints/tasks.py +0 -26
- mixpeek/endpoints/tools.py +0 -138
- mixpeek/exceptions.py +0 -13
- mixpeek-0.11.2.dist-info/METADATA +0 -375
- mixpeek-0.11.2.dist-info/RECORD +0 -15
- mixpeek-0.11.2.dist-info/top_level.txt +0 -1
mixpeek/py.typed
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Marker file for PEP 561. The package enables type hints.
|
mixpeek/sdk.py
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from .httpclient import AsyncHttpClient, HttpClient
|
5
|
+
from .sdkconfiguration import SDKConfiguration
|
6
|
+
from .utils.logger import Logger, get_default_logger
|
7
|
+
from .utils.retries import RetryConfig
|
8
|
+
import httpx
|
9
|
+
from mixpeek import utils
|
10
|
+
from mixpeek._hooks import SDKHooks
|
11
|
+
from mixpeek.assets import Assets
|
12
|
+
from mixpeek.collections import Collections
|
13
|
+
from mixpeek.featureextractors import FeatureExtractors
|
14
|
+
from mixpeek.features import Features
|
15
|
+
from mixpeek.health import Health
|
16
|
+
from mixpeek.ingest import Ingest
|
17
|
+
from mixpeek.interactions import Interactions
|
18
|
+
from mixpeek.namespaces import Namespaces
|
19
|
+
from mixpeek.organizations import Organizations
|
20
|
+
from mixpeek.searchinteractions import SearchInteractions
|
21
|
+
from mixpeek.tasks import Tasks
|
22
|
+
from mixpeek.types import OptionalNullable, UNSET
|
23
|
+
from typing import Dict, Optional
|
24
|
+
|
25
|
+
|
26
|
+
class Mixpeek(BaseSDK):
|
27
|
+
r"""Mixpeek API: This is the Mixpeek API, providing access to various endpoints for data processing and retrieval."""
|
28
|
+
|
29
|
+
organizations: Organizations
|
30
|
+
namespaces: Namespaces
|
31
|
+
features: Features
|
32
|
+
search_interactions: SearchInteractions
|
33
|
+
interactions: Interactions
|
34
|
+
feature_extractors: FeatureExtractors
|
35
|
+
ingest: Ingest
|
36
|
+
assets: Assets
|
37
|
+
collections: Collections
|
38
|
+
tasks: Tasks
|
39
|
+
health: Health
|
40
|
+
|
41
|
+
def __init__(
|
42
|
+
self,
|
43
|
+
server_idx: Optional[int] = None,
|
44
|
+
server_url: Optional[str] = None,
|
45
|
+
url_params: Optional[Dict[str, str]] = None,
|
46
|
+
client: Optional[HttpClient] = None,
|
47
|
+
async_client: Optional[AsyncHttpClient] = None,
|
48
|
+
retry_config: OptionalNullable[RetryConfig] = UNSET,
|
49
|
+
timeout_ms: Optional[int] = None,
|
50
|
+
debug_logger: Optional[Logger] = None,
|
51
|
+
) -> None:
|
52
|
+
r"""Instantiates the SDK configuring it with the provided parameters.
|
53
|
+
|
54
|
+
:param server_idx: The index of the server to use for all methods
|
55
|
+
:param server_url: The server URL to use for all methods
|
56
|
+
:param url_params: Parameters to optionally template the server URL with
|
57
|
+
:param client: The HTTP client to use for all synchronous methods
|
58
|
+
:param async_client: The Async HTTP client to use for all asynchronous methods
|
59
|
+
:param retry_config: The retry configuration to use for all supported methods
|
60
|
+
:param timeout_ms: Optional request timeout applied to each operation in milliseconds
|
61
|
+
"""
|
62
|
+
if client is None:
|
63
|
+
client = httpx.Client()
|
64
|
+
|
65
|
+
assert issubclass(
|
66
|
+
type(client), HttpClient
|
67
|
+
), "The provided client must implement the HttpClient protocol."
|
68
|
+
|
69
|
+
if async_client is None:
|
70
|
+
async_client = httpx.AsyncClient()
|
71
|
+
|
72
|
+
if debug_logger is None:
|
73
|
+
debug_logger = get_default_logger()
|
74
|
+
|
75
|
+
assert issubclass(
|
76
|
+
type(async_client), AsyncHttpClient
|
77
|
+
), "The provided async_client must implement the AsyncHttpClient protocol."
|
78
|
+
|
79
|
+
if server_url is not None:
|
80
|
+
if url_params is not None:
|
81
|
+
server_url = utils.template_url(server_url, url_params)
|
82
|
+
|
83
|
+
BaseSDK.__init__(
|
84
|
+
self,
|
85
|
+
SDKConfiguration(
|
86
|
+
client=client,
|
87
|
+
async_client=async_client,
|
88
|
+
server_url=server_url,
|
89
|
+
server_idx=server_idx,
|
90
|
+
retry_config=retry_config,
|
91
|
+
timeout_ms=timeout_ms,
|
92
|
+
debug_logger=debug_logger,
|
93
|
+
),
|
94
|
+
)
|
95
|
+
|
96
|
+
hooks = SDKHooks()
|
97
|
+
|
98
|
+
current_server_url, *_ = self.sdk_configuration.get_server_details()
|
99
|
+
server_url, self.sdk_configuration.client = hooks.sdk_init(
|
100
|
+
current_server_url, self.sdk_configuration.client
|
101
|
+
)
|
102
|
+
if current_server_url != server_url:
|
103
|
+
self.sdk_configuration.server_url = server_url
|
104
|
+
|
105
|
+
# pylint: disable=protected-access
|
106
|
+
self.sdk_configuration.__dict__["_hooks"] = hooks
|
107
|
+
|
108
|
+
self._init_sdks()
|
109
|
+
|
110
|
+
def _init_sdks(self):
|
111
|
+
self.organizations = Organizations(self.sdk_configuration)
|
112
|
+
self.namespaces = Namespaces(self.sdk_configuration)
|
113
|
+
self.features = Features(self.sdk_configuration)
|
114
|
+
self.search_interactions = SearchInteractions(self.sdk_configuration)
|
115
|
+
self.interactions = Interactions(self.sdk_configuration)
|
116
|
+
self.feature_extractors = FeatureExtractors(self.sdk_configuration)
|
117
|
+
self.ingest = Ingest(self.sdk_configuration)
|
118
|
+
self.assets = Assets(self.sdk_configuration)
|
119
|
+
self.collections = Collections(self.sdk_configuration)
|
120
|
+
self.tasks = Tasks(self.sdk_configuration)
|
121
|
+
self.health = Health(self.sdk_configuration)
|
122
|
+
|
123
|
+
def __enter__(self):
|
124
|
+
return self
|
125
|
+
|
126
|
+
async def __aenter__(self):
|
127
|
+
return self
|
128
|
+
|
129
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
130
|
+
if self.sdk_configuration.client is not None:
|
131
|
+
self.sdk_configuration.client.close()
|
132
|
+
|
133
|
+
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
134
|
+
if self.sdk_configuration.async_client is not None:
|
135
|
+
await self.sdk_configuration.async_client.aclose()
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from ._hooks import SDKHooks
|
4
|
+
from .httpclient import AsyncHttpClient, HttpClient
|
5
|
+
from .utils import Logger, RetryConfig, remove_suffix
|
6
|
+
from dataclasses import dataclass
|
7
|
+
from mixpeek.types import OptionalNullable, UNSET
|
8
|
+
from pydantic import Field
|
9
|
+
from typing import Dict, Optional, Tuple
|
10
|
+
|
11
|
+
|
12
|
+
SERVERS = [
|
13
|
+
"https://api.mixpeek.com/",
|
14
|
+
]
|
15
|
+
"""Contains the list of servers available to the SDK"""
|
16
|
+
|
17
|
+
|
18
|
+
@dataclass
|
19
|
+
class SDKConfiguration:
|
20
|
+
client: HttpClient
|
21
|
+
async_client: AsyncHttpClient
|
22
|
+
debug_logger: Logger
|
23
|
+
server_url: Optional[str] = ""
|
24
|
+
server_idx: Optional[int] = 0
|
25
|
+
language: str = "python"
|
26
|
+
openapi_doc_version: str = "0.81"
|
27
|
+
sdk_version: str = "0.13"
|
28
|
+
gen_version: str = "2.483.1"
|
29
|
+
user_agent: str = "speakeasy-sdk/python 0.13 2.483.1 0.81 mixpeek"
|
30
|
+
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
|
31
|
+
timeout_ms: Optional[int] = None
|
32
|
+
|
33
|
+
def __post_init__(self):
|
34
|
+
self._hooks = SDKHooks()
|
35
|
+
|
36
|
+
def get_server_details(self) -> Tuple[str, Dict[str, str]]:
|
37
|
+
if self.server_url is not None and self.server_url:
|
38
|
+
return remove_suffix(self.server_url, "/"), {}
|
39
|
+
if self.server_idx is None:
|
40
|
+
self.server_idx = 0
|
41
|
+
|
42
|
+
return SERVERS[self.server_idx], {}
|
43
|
+
|
44
|
+
def get_hooks(self) -> SDKHooks:
|
45
|
+
return self._hooks
|