mixpeek 0.11.2__tar.gz → 0.13__tar.gz
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-0.13/PKG-INFO +439 -0
- mixpeek-0.13/README-PYPI.md +415 -0
- mixpeek-0.13/py.typed +1 -0
- mixpeek-0.13/pyproject.toml +55 -0
- mixpeek-0.13/src/mixpeek/__init__.py +9 -0
- mixpeek-0.13/src/mixpeek/_hooks/__init__.py +5 -0
- mixpeek-0.13/src/mixpeek/_hooks/registration.py +13 -0
- mixpeek-0.13/src/mixpeek/_hooks/sdkhooks.py +76 -0
- mixpeek-0.13/src/mixpeek/_hooks/types.py +94 -0
- mixpeek-0.13/src/mixpeek/_version.py +12 -0
- mixpeek-0.13/src/mixpeek/assets.py +1561 -0
- mixpeek-0.13/src/mixpeek/basesdk.py +350 -0
- mixpeek-0.13/src/mixpeek/collections.py +1029 -0
- mixpeek-0.13/src/mixpeek/featureextractors.py +205 -0
- mixpeek-0.13/src/mixpeek/features.py +1181 -0
- mixpeek-0.13/src/mixpeek/health.py +167 -0
- mixpeek-0.13/src/mixpeek/httpclient.py +84 -0
- mixpeek-0.13/src/mixpeek/ingest.py +831 -0
- mixpeek-0.13/src/mixpeek/interactions.py +221 -0
- mixpeek-0.13/src/mixpeek/models/__init__.py +751 -0
- mixpeek-0.13/src/mixpeek/models/actionusage.py +16 -0
- mixpeek-0.13/src/mixpeek/models/apierror.py +22 -0
- mixpeek-0.13/src/mixpeek/models/apikey.py +25 -0
- mixpeek-0.13/src/mixpeek/models/apikeyupdate.py +49 -0
- mixpeek-0.13/src/mixpeek/models/assetfeatures.py +55 -0
- mixpeek-0.13/src/mixpeek/models/assetresponse.py +166 -0
- mixpeek-0.13/src/mixpeek/models/assets_model_searchquery.py +21 -0
- mixpeek-0.13/src/mixpeek/models/assetupdate.py +28 -0
- mixpeek-0.13/src/mixpeek/models/availableindexesresponse.py +23 -0
- mixpeek-0.13/src/mixpeek/models/availablemodels.py +12 -0
- mixpeek-0.13/src/mixpeek/models/boolindexparams.py +18 -0
- mixpeek-0.13/src/mixpeek/models/collectionmodel.py +70 -0
- mixpeek-0.13/src/mixpeek/models/collectionresult.py +73 -0
- mixpeek-0.13/src/mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +23 -0
- mixpeek-0.13/src/mixpeek/models/create_collection_collections_postop.py +62 -0
- mixpeek-0.13/src/mixpeek/models/create_interaction_features_search_interactions_postop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/createcollectionrequest.py +59 -0
- mixpeek-0.13/src/mixpeek/models/createnamespacerequest.py +62 -0
- mixpeek-0.13/src/mixpeek/models/datetimeindexparams.py +18 -0
- mixpeek-0.13/src/mixpeek/models/dateusage.py +22 -0
- mixpeek-0.13/src/mixpeek/models/db_model_paginationresponse.py +59 -0
- mixpeek-0.13/src/mixpeek/models/db_model_taskresponse.py +20 -0
- mixpeek-0.13/src/mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +23 -0
- mixpeek-0.13/src/mixpeek/models/delete_asset_assets_asset_id_deleteop.py +57 -0
- mixpeek-0.13/src/mixpeek/models/delete_collection_collections_collection_deleteop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/delete_feature_features_feature_id_deleteop.py +57 -0
- mixpeek-0.13/src/mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +18 -0
- mixpeek-0.13/src/mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +16 -0
- mixpeek-0.13/src/mixpeek/models/denseembedding.py +16 -0
- mixpeek-0.13/src/mixpeek/models/embeddingrequest.py +59 -0
- mixpeek-0.13/src/mixpeek/models/embeddingresponse.py +64 -0
- mixpeek-0.13/src/mixpeek/models/errormessage.py +13 -0
- mixpeek-0.13/src/mixpeek/models/errorresponse.py +21 -0
- mixpeek-0.13/src/mixpeek/models/facedetectsettings.py +52 -0
- mixpeek-0.13/src/mixpeek/models/featureextractionembeddingrequest.py +54 -0
- mixpeek-0.13/src/mixpeek/models/featureresponse.py +74 -0
- mixpeek-0.13/src/mixpeek/models/features_model_paginationresponse.py +59 -0
- mixpeek-0.13/src/mixpeek/models/featureupdaterequest.py +21 -0
- mixpeek-0.13/src/mixpeek/models/filtercondition.py +74 -0
- mixpeek-0.13/src/mixpeek/models/floatindexparams.py +18 -0
- mixpeek-0.13/src/mixpeek/models/full_asset_update_assets_asset_id_putop.py +69 -0
- mixpeek-0.13/src/mixpeek/models/full_feature_update_features_feature_id_putop.py +69 -0
- mixpeek-0.13/src/mixpeek/models/geoindexparams.py +18 -0
- mixpeek-0.13/src/mixpeek/models/get_asset_assets_asset_id_getop.py +73 -0
- mixpeek-0.13/src/mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +73 -0
- mixpeek-0.13/src/mixpeek/models/get_collection_collections_collection_getop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/get_feature_features_feature_id_getop.py +70 -0
- mixpeek-0.13/src/mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/get_namespace_namespaces_namespace_getop.py +18 -0
- mixpeek-0.13/src/mixpeek/models/get_task_tasks_task_id_getop.py +57 -0
- mixpeek-0.13/src/mixpeek/models/get_user_organizations_users_user_email_getop.py +16 -0
- mixpeek-0.13/src/mixpeek/models/groupbyoptions.py +71 -0
- mixpeek-0.13/src/mixpeek/models/groupbyoptionsasset.py +71 -0
- mixpeek-0.13/src/mixpeek/models/groupedassetdata.py +18 -0
- mixpeek-0.13/src/mixpeek/models/healthcheckresponse.py +13 -0
- mixpeek-0.13/src/mixpeek/models/httpvalidationerror.py +21 -0
- mixpeek-0.13/src/mixpeek/models/imagedescribesettings.py +82 -0
- mixpeek-0.13/src/mixpeek/models/imagedetectsettings.py +53 -0
- mixpeek-0.13/src/mixpeek/models/imagereadsettings.py +71 -0
- mixpeek-0.13/src/mixpeek/models/imagesettings.py +79 -0
- mixpeek-0.13/src/mixpeek/models/ingest_image_url_ingest_images_url_postop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/ingest_text_ingest_text_postop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/inputtype.py +11 -0
- mixpeek-0.13/src/mixpeek/models/integerindexparams.py +24 -0
- mixpeek-0.13/src/mixpeek/models/interactionresponse.py +87 -0
- mixpeek-0.13/src/mixpeek/models/interactiontype.py +11 -0
- mixpeek-0.13/src/mixpeek/models/jsonimageoutputsettings.py +55 -0
- mixpeek-0.13/src/mixpeek/models/jsontextoutputsettings.py +55 -0
- mixpeek-0.13/src/mixpeek/models/jsonvideooutputsettings.py +55 -0
- mixpeek-0.13/src/mixpeek/models/keywordindexparams.py +21 -0
- mixpeek-0.13/src/mixpeek/models/kill_task_tasks_task_id_deleteop.py +57 -0
- mixpeek-0.13/src/mixpeek/models/list_assets_assets_postop.py +77 -0
- mixpeek-0.13/src/mixpeek/models/list_collections_collections_getop.py +65 -0
- mixpeek-0.13/src/mixpeek/models/list_features_features_postop.py +79 -0
- mixpeek-0.13/src/mixpeek/models/list_interactions_features_search_interactions_getop.py +96 -0
- mixpeek-0.13/src/mixpeek/models/listassetsrequest.py +75 -0
- mixpeek-0.13/src/mixpeek/models/listassetsresponse.py +22 -0
- mixpeek-0.13/src/mixpeek/models/listcollectionsresponse.py +22 -0
- mixpeek-0.13/src/mixpeek/models/listfeaturesrequest.py +77 -0
- mixpeek-0.13/src/mixpeek/models/listfeaturesresponse.py +22 -0
- mixpeek-0.13/src/mixpeek/models/logicaloperator_input.py +88 -0
- mixpeek-0.13/src/mixpeek/models/logicaloperator_output.py +103 -0
- mixpeek-0.13/src/mixpeek/models/logodetectsettings.py +52 -0
- mixpeek-0.13/src/mixpeek/models/modality.py +13 -0
- mixpeek-0.13/src/mixpeek/models/modeldetails.py +57 -0
- mixpeek-0.13/src/mixpeek/models/namespaceresponse.py +54 -0
- mixpeek-0.13/src/mixpeek/models/organizationmodel.py +45 -0
- mixpeek-0.13/src/mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +69 -0
- mixpeek-0.13/src/mixpeek/models/payloadindexconfig.py +94 -0
- mixpeek-0.13/src/mixpeek/models/payloadindextype.py +17 -0
- mixpeek-0.13/src/mixpeek/models/payloadschematype.py +15 -0
- mixpeek-0.13/src/mixpeek/models/percolaterequest.py +57 -0
- mixpeek-0.13/src/mixpeek/models/permission.py +10 -0
- mixpeek-0.13/src/mixpeek/models/processimageurlinput.py +99 -0
- mixpeek-0.13/src/mixpeek/models/processtextinput.py +94 -0
- mixpeek-0.13/src/mixpeek/models/processvideourlinput.py +99 -0
- mixpeek-0.13/src/mixpeek/models/querysettings.py +56 -0
- mixpeek-0.13/src/mixpeek/models/rerankingoptions.py +47 -0
- mixpeek-0.13/src/mixpeek/models/search_assets_assets_search_postop.py +59 -0
- mixpeek-0.13/src/mixpeek/models/search_features_features_search_postop.py +96 -0
- mixpeek-0.13/src/mixpeek/models/search_model_searchquery_input.py +76 -0
- mixpeek-0.13/src/mixpeek/models/searchassetsrequest.py +78 -0
- mixpeek-0.13/src/mixpeek/models/searchinteraction.py +82 -0
- mixpeek-0.13/src/mixpeek/models/searchquery_output.py +79 -0
- mixpeek-0.13/src/mixpeek/models/searchrequestfeatures_input.py +151 -0
- mixpeek-0.13/src/mixpeek/models/searchrequestfeatures_output.py +151 -0
- mixpeek-0.13/src/mixpeek/models/sortoption.py +28 -0
- mixpeek-0.13/src/mixpeek/models/sparseembedding.py +21 -0
- mixpeek-0.13/src/mixpeek/models/tasks_model_taskresponse.py +24 -0
- mixpeek-0.13/src/mixpeek/models/taskstatus.py +16 -0
- mixpeek-0.13/src/mixpeek/models/textindexparams.py +31 -0
- mixpeek-0.13/src/mixpeek/models/textsettings.py +61 -0
- mixpeek-0.13/src/mixpeek/models/tokenizertype.py +11 -0
- mixpeek-0.13/src/mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +30 -0
- mixpeek-0.13/src/mixpeek/models/update_collection_collections_collection_putop.py +74 -0
- mixpeek-0.13/src/mixpeek/models/update_namespace_namespaces_namespace_putop.py +28 -0
- mixpeek-0.13/src/mixpeek/models/updateassetrequest.py +60 -0
- mixpeek-0.13/src/mixpeek/models/updatenamespacerequest.py +26 -0
- mixpeek-0.13/src/mixpeek/models/usage.py +18 -0
- mixpeek-0.13/src/mixpeek/models/usermodel_input.py +36 -0
- mixpeek-0.13/src/mixpeek/models/usermodel_output.py +36 -0
- mixpeek-0.13/src/mixpeek/models/uuidindexparams.py +21 -0
- mixpeek-0.13/src/mixpeek/models/validationerror.py +26 -0
- mixpeek-0.13/src/mixpeek/models/vectormodel.py +11 -0
- mixpeek-0.13/src/mixpeek/models/vectortype.py +9 -0
- mixpeek-0.13/src/mixpeek/models/videodescribesettings.py +82 -0
- mixpeek-0.13/src/mixpeek/models/videodetectsettings.py +53 -0
- mixpeek-0.13/src/mixpeek/models/videoreadsettings.py +71 -0
- mixpeek-0.13/src/mixpeek/models/videosettings.py +101 -0
- mixpeek-0.13/src/mixpeek/models/videotranscriptionsettings.py +69 -0
- mixpeek-0.13/src/mixpeek/namespaces.py +1143 -0
- mixpeek-0.13/src/mixpeek/organizations.py +1508 -0
- mixpeek-0.13/src/mixpeek/py.typed +1 -0
- mixpeek-0.13/src/mixpeek/sdk.py +135 -0
- mixpeek-0.13/src/mixpeek/sdkconfiguration.py +45 -0
- mixpeek-0.13/src/mixpeek/searchinteractions.py +647 -0
- mixpeek-0.13/src/mixpeek/tasks.py +387 -0
- mixpeek-0.13/src/mixpeek/types/__init__.py +21 -0
- mixpeek-0.13/src/mixpeek/types/basemodel.py +39 -0
- mixpeek-0.13/src/mixpeek/utils/__init__.py +97 -0
- mixpeek-0.13/src/mixpeek/utils/annotations.py +55 -0
- mixpeek-0.13/src/mixpeek/utils/enums.py +34 -0
- mixpeek-0.13/src/mixpeek/utils/eventstreaming.py +238 -0
- mixpeek-0.13/src/mixpeek/utils/forms.py +202 -0
- mixpeek-0.13/src/mixpeek/utils/headers.py +136 -0
- mixpeek-0.13/src/mixpeek/utils/logger.py +27 -0
- mixpeek-0.13/src/mixpeek/utils/metadata.py +118 -0
- mixpeek-0.13/src/mixpeek/utils/queryparams.py +205 -0
- mixpeek-0.13/src/mixpeek/utils/requestbodies.py +66 -0
- mixpeek-0.13/src/mixpeek/utils/retries.py +217 -0
- mixpeek-0.13/src/mixpeek/utils/security.py +174 -0
- mixpeek-0.13/src/mixpeek/utils/serializers.py +215 -0
- mixpeek-0.13/src/mixpeek/utils/url.py +155 -0
- mixpeek-0.13/src/mixpeek/utils/values.py +134 -0
- mixpeek-0.11.2/MANIFEST.in +0 -1
- mixpeek-0.11.2/PKG-INFO +0 -375
- mixpeek-0.11.2/README.md +0 -357
- mixpeek-0.11.2/mixpeek/__init__.py +0 -1
- mixpeek-0.11.2/mixpeek/client.py +0 -27
- mixpeek-0.11.2/mixpeek/endpoints/__init__.py +0 -0
- mixpeek-0.11.2/mixpeek/endpoints/collections.py +0 -86
- mixpeek-0.11.2/mixpeek/endpoints/embed.py +0 -66
- mixpeek-0.11.2/mixpeek/endpoints/index.py +0 -51
- mixpeek-0.11.2/mixpeek/endpoints/register.py +0 -34
- mixpeek-0.11.2/mixpeek/endpoints/search.py +0 -44
- mixpeek-0.11.2/mixpeek/endpoints/tasks.py +0 -26
- mixpeek-0.11.2/mixpeek/endpoints/tools.py +0 -138
- mixpeek-0.11.2/mixpeek/exceptions.py +0 -13
- mixpeek-0.11.2/mixpeek.egg-info/PKG-INFO +0 -375
- mixpeek-0.11.2/mixpeek.egg-info/SOURCES.txt +0 -20
- mixpeek-0.11.2/mixpeek.egg-info/dependency_links.txt +0 -1
- mixpeek-0.11.2/mixpeek.egg-info/requires.txt +0 -5
- mixpeek-0.11.2/mixpeek.egg-info/top_level.txt +0 -1
- mixpeek-0.11.2/requirements.txt +0 -5
- mixpeek-0.11.2/setup.cfg +0 -4
- mixpeek-0.11.2/setup.py +0 -24
mixpeek-0.13/PKG-INFO
ADDED
@@ -0,0 +1,439 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: mixpeek
|
3
|
+
Version: 0.13
|
4
|
+
Summary: Python Client SDK Generated by Speakeasy.
|
5
|
+
Home-page: https://github.com/mixpeek/python-sdk.git
|
6
|
+
Author: Speakeasy
|
7
|
+
Requires-Python: >=3.8,<4.0
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
15
|
+
Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0)
|
16
|
+
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
17
|
+
Requires-Dist: jsonpath-python (>=1.0.6,<2.0.0)
|
18
|
+
Requires-Dist: pydantic (>=2.10.3,<2.11.0)
|
19
|
+
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
20
|
+
Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
|
21
|
+
Project-URL: Repository, https://github.com/mixpeek/python-sdk.git
|
22
|
+
Description-Content-Type: text/markdown
|
23
|
+
|
24
|
+
# mixpeek
|
25
|
+
|
26
|
+
Developer-friendly & type-safe Python SDK specifically catered to leverage *mixpeek* API.
|
27
|
+
|
28
|
+
<div align="left">
|
29
|
+
<a href="https://www.speakeasy.com/?utm_source=mixpeek&utm_campaign=python"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
30
|
+
<a href="https://opensource.org/licenses/MIT">
|
31
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
32
|
+
</a>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
|
36
|
+
<br /><br />
|
37
|
+
> [!IMPORTANT]
|
38
|
+
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/mixpeek/api). Delete this section before > publishing to a package manager.
|
39
|
+
|
40
|
+
<!-- Start Summary [summary] -->
|
41
|
+
## Summary
|
42
|
+
|
43
|
+
Mixpeek API: This is the Mixpeek API, providing access to various endpoints for data processing and retrieval.
|
44
|
+
<!-- End Summary [summary] -->
|
45
|
+
|
46
|
+
<!-- Start Table of Contents [toc] -->
|
47
|
+
## Table of Contents
|
48
|
+
<!-- $toc-max-depth=2 -->
|
49
|
+
* [mixpeek](https://github.com/mixpeek/python-sdk/blob/master/#mixpeek)
|
50
|
+
* [SDK Installation](https://github.com/mixpeek/python-sdk/blob/master/#sdk-installation)
|
51
|
+
* [IDE Support](https://github.com/mixpeek/python-sdk/blob/master/#ide-support)
|
52
|
+
* [SDK Example Usage](https://github.com/mixpeek/python-sdk/blob/master/#sdk-example-usage)
|
53
|
+
* [Available Resources and Operations](https://github.com/mixpeek/python-sdk/blob/master/#available-resources-and-operations)
|
54
|
+
* [Retries](https://github.com/mixpeek/python-sdk/blob/master/#retries)
|
55
|
+
* [Error Handling](https://github.com/mixpeek/python-sdk/blob/master/#error-handling)
|
56
|
+
* [Server Selection](https://github.com/mixpeek/python-sdk/blob/master/#server-selection)
|
57
|
+
* [Custom HTTP Client](https://github.com/mixpeek/python-sdk/blob/master/#custom-http-client)
|
58
|
+
* [Debugging](https://github.com/mixpeek/python-sdk/blob/master/#debugging)
|
59
|
+
* [Development](https://github.com/mixpeek/python-sdk/blob/master/#development)
|
60
|
+
* [Maturity](https://github.com/mixpeek/python-sdk/blob/master/#maturity)
|
61
|
+
* [Contributions](https://github.com/mixpeek/python-sdk/blob/master/#contributions)
|
62
|
+
|
63
|
+
<!-- End Table of Contents [toc] -->
|
64
|
+
|
65
|
+
<!-- Start SDK Installation [installation] -->
|
66
|
+
## SDK Installation
|
67
|
+
|
68
|
+
The SDK can be installed with either *pip* or *poetry* package managers.
|
69
|
+
|
70
|
+
### PIP
|
71
|
+
|
72
|
+
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
73
|
+
|
74
|
+
```bash
|
75
|
+
pip install mixpeek
|
76
|
+
```
|
77
|
+
|
78
|
+
### Poetry
|
79
|
+
|
80
|
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
81
|
+
|
82
|
+
```bash
|
83
|
+
poetry add mixpeek
|
84
|
+
```
|
85
|
+
<!-- End SDK Installation [installation] -->
|
86
|
+
|
87
|
+
<!-- Start IDE Support [idesupport] -->
|
88
|
+
## IDE Support
|
89
|
+
|
90
|
+
### PyCharm
|
91
|
+
|
92
|
+
Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
|
93
|
+
|
94
|
+
- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
|
95
|
+
<!-- End IDE Support [idesupport] -->
|
96
|
+
|
97
|
+
<!-- Start SDK Example Usage [usage] -->
|
98
|
+
## SDK Example Usage
|
99
|
+
|
100
|
+
### Example
|
101
|
+
|
102
|
+
```python
|
103
|
+
# Synchronous Example
|
104
|
+
from mixpeek import Mixpeek
|
105
|
+
|
106
|
+
with Mixpeek() as mixpeek:
|
107
|
+
|
108
|
+
res = mixpeek.organizations.get()
|
109
|
+
|
110
|
+
# Handle response
|
111
|
+
print(res)
|
112
|
+
```
|
113
|
+
|
114
|
+
</br>
|
115
|
+
|
116
|
+
The same SDK client can also be used to make asychronous requests by importing asyncio.
|
117
|
+
```python
|
118
|
+
# Asynchronous Example
|
119
|
+
import asyncio
|
120
|
+
from mixpeek import Mixpeek
|
121
|
+
|
122
|
+
async def main():
|
123
|
+
async with Mixpeek() as mixpeek:
|
124
|
+
|
125
|
+
res = await mixpeek.organizations.get_async()
|
126
|
+
|
127
|
+
# Handle response
|
128
|
+
print(res)
|
129
|
+
|
130
|
+
asyncio.run(main())
|
131
|
+
```
|
132
|
+
<!-- End SDK Example Usage [usage] -->
|
133
|
+
|
134
|
+
<!-- Start Available Resources and Operations [operations] -->
|
135
|
+
## Available Resources and Operations
|
136
|
+
|
137
|
+
<details open>
|
138
|
+
<summary>Available methods</summary>
|
139
|
+
|
140
|
+
### [assets](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md)
|
141
|
+
|
142
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#get) - Get Asset
|
143
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#delete) - Delete Asset
|
144
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#update) - Full Asset Update
|
145
|
+
* [partial_update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#partial_update) - Partial Asset Update
|
146
|
+
* [get_features](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#get_features) - Get Asset With Features
|
147
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#list) - List Assets
|
148
|
+
* [search](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/assets/README.md#search) - Search Assets
|
149
|
+
|
150
|
+
### [collections](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md)
|
151
|
+
|
152
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#list) - List Collections
|
153
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#create) - Create Collection
|
154
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#delete) - Delete Collection
|
155
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#update) - Update Collection
|
156
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/collections/README.md#get) - Get Collection
|
157
|
+
|
158
|
+
### [feature_extractors](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featureextractors/README.md)
|
159
|
+
|
160
|
+
* [extract_embeddings](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/featureextractors/README.md#extract_embeddings) - Extract Embeddings
|
161
|
+
|
162
|
+
### [features](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md)
|
163
|
+
|
164
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#get) - Get Feature
|
165
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#delete) - Delete Feature
|
166
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#update) - Full Feature Update
|
167
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#list) - List Features
|
168
|
+
* [search](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/features/README.md#search) - Search Features
|
169
|
+
|
170
|
+
### [health](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/health/README.md)
|
171
|
+
|
172
|
+
* [check](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/health/README.md#check) - Healthcheck
|
173
|
+
|
174
|
+
### [ingest](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingest/README.md)
|
175
|
+
|
176
|
+
* [text](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingest/README.md#text) - Ingest Text
|
177
|
+
* [video_from_url](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingest/README.md#video_from_url) - Ingest Video Url
|
178
|
+
* [image_url](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/ingest/README.md#image_url) - Ingest Image Url
|
179
|
+
|
180
|
+
### [interactions](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/interactions/README.md)
|
181
|
+
|
182
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/interactions/README.md#list) - List Interactions
|
183
|
+
|
184
|
+
|
185
|
+
### [namespaces](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md)
|
186
|
+
|
187
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#create) - Create Namespace
|
188
|
+
* [list](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#list) - List Namespaces
|
189
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#delete) - Delete Namespace
|
190
|
+
* [update](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#update) - Update Namespace
|
191
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#get) - Get Namespace
|
192
|
+
* [list_indexes](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/namespaces/README.md#list_indexes) - List Available Indexes
|
193
|
+
|
194
|
+
### [organizations](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md)
|
195
|
+
|
196
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#get) - Get Organization
|
197
|
+
* [get_usage](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#get_usage) - Get Usage
|
198
|
+
* [get_user](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#get_user) - Get User
|
199
|
+
* [delete_user](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#delete_user) - Delete User
|
200
|
+
* [add_user](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#add_user) - Add User
|
201
|
+
* [create_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#create_api_key) - Create Api Key
|
202
|
+
* [delete_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#delete_api_key) - Delete Api Key
|
203
|
+
* [update_api_key](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/organizations/README.md#update_api_key) - Update Api Key
|
204
|
+
|
205
|
+
### [search_interactions](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/searchinteractions/README.md)
|
206
|
+
|
207
|
+
* [create](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/searchinteractions/README.md#create) - Create Interaction
|
208
|
+
* [get_interaction](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/searchinteractions/README.md#get_interaction) - Get Interaction
|
209
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/searchinteractions/README.md#delete) - Delete Interaction
|
210
|
+
|
211
|
+
### [tasks](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md)
|
212
|
+
|
213
|
+
* [delete](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md#delete) - Kill Task
|
214
|
+
* [get](https://github.com/mixpeek/python-sdk/blob/master/docs/sdks/tasks/README.md#get) - Get Task Information
|
215
|
+
|
216
|
+
</details>
|
217
|
+
<!-- End Available Resources and Operations [operations] -->
|
218
|
+
|
219
|
+
<!-- Start Retries [retries] -->
|
220
|
+
## Retries
|
221
|
+
|
222
|
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
223
|
+
|
224
|
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
225
|
+
```python
|
226
|
+
from mixpeek import Mixpeek
|
227
|
+
from mixpeek.utils import BackoffStrategy, RetryConfig
|
228
|
+
|
229
|
+
with Mixpeek() as mixpeek:
|
230
|
+
|
231
|
+
res = mixpeek.organizations.get(,
|
232
|
+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
233
|
+
|
234
|
+
# Handle response
|
235
|
+
print(res)
|
236
|
+
|
237
|
+
```
|
238
|
+
|
239
|
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
|
240
|
+
```python
|
241
|
+
from mixpeek import Mixpeek
|
242
|
+
from mixpeek.utils import BackoffStrategy, RetryConfig
|
243
|
+
|
244
|
+
with Mixpeek(
|
245
|
+
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
246
|
+
) as mixpeek:
|
247
|
+
|
248
|
+
res = mixpeek.organizations.get()
|
249
|
+
|
250
|
+
# Handle response
|
251
|
+
print(res)
|
252
|
+
|
253
|
+
```
|
254
|
+
<!-- End Retries [retries] -->
|
255
|
+
|
256
|
+
<!-- Start Error Handling [errors] -->
|
257
|
+
## Error Handling
|
258
|
+
|
259
|
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
|
260
|
+
|
261
|
+
By default, an API error will raise a models.APIError exception, which has the following properties:
|
262
|
+
|
263
|
+
| Property | Type | Description |
|
264
|
+
|-----------------|------------------|-----------------------|
|
265
|
+
| `.status_code` | *int* | The HTTP status code |
|
266
|
+
| `.message` | *str* | The error message |
|
267
|
+
| `.raw_response` | *httpx.Response* | The raw HTTP response |
|
268
|
+
| `.body` | *str* | The response content |
|
269
|
+
|
270
|
+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_async` method may raise the following exceptions:
|
271
|
+
|
272
|
+
| Error Type | Status Code | Content Type |
|
273
|
+
| -------------------------- | ----------------------- | ---------------- |
|
274
|
+
| models.ErrorResponse | 400, 401, 403, 404, 500 | application/json |
|
275
|
+
| models.HTTPValidationError | 422 | application/json |
|
276
|
+
| models.APIError | 4XX, 5XX | \*/\* |
|
277
|
+
|
278
|
+
### Example
|
279
|
+
|
280
|
+
```python
|
281
|
+
from mixpeek import Mixpeek, models
|
282
|
+
|
283
|
+
with Mixpeek() as mixpeek:
|
284
|
+
res = None
|
285
|
+
try:
|
286
|
+
|
287
|
+
res = mixpeek.organizations.get()
|
288
|
+
|
289
|
+
# Handle response
|
290
|
+
print(res)
|
291
|
+
|
292
|
+
except models.ErrorResponse as e:
|
293
|
+
# handle e.data: models.ErrorResponseData
|
294
|
+
raise(e)
|
295
|
+
except models.HTTPValidationError as e:
|
296
|
+
# handle e.data: models.HTTPValidationErrorData
|
297
|
+
raise(e)
|
298
|
+
except models.APIError as e:
|
299
|
+
# handle exception
|
300
|
+
raise(e)
|
301
|
+
```
|
302
|
+
<!-- End Error Handling [errors] -->
|
303
|
+
|
304
|
+
<!-- Start Server Selection [server] -->
|
305
|
+
## Server Selection
|
306
|
+
|
307
|
+
### Override Server URL Per-Client
|
308
|
+
|
309
|
+
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
310
|
+
```python
|
311
|
+
from mixpeek import Mixpeek
|
312
|
+
|
313
|
+
with Mixpeek(
|
314
|
+
server_url="https://api.mixpeek.com/",
|
315
|
+
) as mixpeek:
|
316
|
+
|
317
|
+
res = mixpeek.organizations.get()
|
318
|
+
|
319
|
+
# Handle response
|
320
|
+
print(res)
|
321
|
+
|
322
|
+
```
|
323
|
+
<!-- End Server Selection [server] -->
|
324
|
+
|
325
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
326
|
+
## Custom HTTP Client
|
327
|
+
|
328
|
+
The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
|
329
|
+
Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
|
330
|
+
This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
|
331
|
+
|
332
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
333
|
+
```python
|
334
|
+
from mixpeek import Mixpeek
|
335
|
+
import httpx
|
336
|
+
|
337
|
+
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
338
|
+
s = Mixpeek(client=http_client)
|
339
|
+
```
|
340
|
+
|
341
|
+
or you could wrap the client with your own custom logic:
|
342
|
+
```python
|
343
|
+
from mixpeek import Mixpeek
|
344
|
+
from mixpeek.httpclient import AsyncHttpClient
|
345
|
+
import httpx
|
346
|
+
|
347
|
+
class CustomClient(AsyncHttpClient):
|
348
|
+
client: AsyncHttpClient
|
349
|
+
|
350
|
+
def __init__(self, client: AsyncHttpClient):
|
351
|
+
self.client = client
|
352
|
+
|
353
|
+
async def send(
|
354
|
+
self,
|
355
|
+
request: httpx.Request,
|
356
|
+
*,
|
357
|
+
stream: bool = False,
|
358
|
+
auth: Union[
|
359
|
+
httpx._types.AuthTypes, httpx._client.UseClientDefault, None
|
360
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
361
|
+
follow_redirects: Union[
|
362
|
+
bool, httpx._client.UseClientDefault
|
363
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
364
|
+
) -> httpx.Response:
|
365
|
+
request.headers["Client-Level-Header"] = "added by client"
|
366
|
+
|
367
|
+
return await self.client.send(
|
368
|
+
request, stream=stream, auth=auth, follow_redirects=follow_redirects
|
369
|
+
)
|
370
|
+
|
371
|
+
def build_request(
|
372
|
+
self,
|
373
|
+
method: str,
|
374
|
+
url: httpx._types.URLTypes,
|
375
|
+
*,
|
376
|
+
content: Optional[httpx._types.RequestContent] = None,
|
377
|
+
data: Optional[httpx._types.RequestData] = None,
|
378
|
+
files: Optional[httpx._types.RequestFiles] = None,
|
379
|
+
json: Optional[Any] = None,
|
380
|
+
params: Optional[httpx._types.QueryParamTypes] = None,
|
381
|
+
headers: Optional[httpx._types.HeaderTypes] = None,
|
382
|
+
cookies: Optional[httpx._types.CookieTypes] = None,
|
383
|
+
timeout: Union[
|
384
|
+
httpx._types.TimeoutTypes, httpx._client.UseClientDefault
|
385
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
386
|
+
extensions: Optional[httpx._types.RequestExtensions] = None,
|
387
|
+
) -> httpx.Request:
|
388
|
+
return self.client.build_request(
|
389
|
+
method,
|
390
|
+
url,
|
391
|
+
content=content,
|
392
|
+
data=data,
|
393
|
+
files=files,
|
394
|
+
json=json,
|
395
|
+
params=params,
|
396
|
+
headers=headers,
|
397
|
+
cookies=cookies,
|
398
|
+
timeout=timeout,
|
399
|
+
extensions=extensions,
|
400
|
+
)
|
401
|
+
|
402
|
+
s = Mixpeek(async_client=CustomClient(httpx.AsyncClient()))
|
403
|
+
```
|
404
|
+
<!-- End Custom HTTP Client [http-client] -->
|
405
|
+
|
406
|
+
<!-- Start Debugging [debug] -->
|
407
|
+
## Debugging
|
408
|
+
|
409
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
410
|
+
|
411
|
+
You can pass your own logger class directly into your SDK.
|
412
|
+
```python
|
413
|
+
from mixpeek import Mixpeek
|
414
|
+
import logging
|
415
|
+
|
416
|
+
logging.basicConfig(level=logging.DEBUG)
|
417
|
+
s = Mixpeek(debug_logger=logging.getLogger("mixpeek"))
|
418
|
+
```
|
419
|
+
|
420
|
+
You can also enable a default debug logger by setting an environment variable `MIXPEEK_DEBUG` to true.
|
421
|
+
<!-- End Debugging [debug] -->
|
422
|
+
|
423
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
424
|
+
|
425
|
+
# Development
|
426
|
+
|
427
|
+
## Maturity
|
428
|
+
|
429
|
+
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
|
430
|
+
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
|
431
|
+
looking for the latest version.
|
432
|
+
|
433
|
+
## Contributions
|
434
|
+
|
435
|
+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
436
|
+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
437
|
+
|
438
|
+
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=mixpeek&utm_campaign=python)
|
439
|
+
|