mixpeek 0.1.2__py3-none-any.whl → 0.5__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 (180) hide show
  1. mixpeek/__init__.py +83 -6
  2. mixpeek-0.5.dist-info/LICENSE.rst +20 -0
  3. mixpeek-0.5.dist-info/METADATA +12 -0
  4. mixpeek-0.5.dist-info/RECORD +6 -0
  5. {mixpeek-0.1.2.dist-info → mixpeek-0.5.dist-info}/WHEEL +2 -1
  6. mixpeek-0.5.dist-info/top_level.txt +1 -0
  7. mixpeek/_hooks/__init__.py +0 -5
  8. mixpeek/_hooks/registration.py +0 -13
  9. mixpeek/_hooks/sdkhooks.py +0 -76
  10. mixpeek/_hooks/types.py +0 -94
  11. mixpeek/_version.py +0 -12
  12. mixpeek/assets.py +0 -1561
  13. mixpeek/basesdk.py +0 -350
  14. mixpeek/collections.py +0 -1029
  15. mixpeek/featureextractors.py +0 -205
  16. mixpeek/features.py +0 -1181
  17. mixpeek/health.py +0 -167
  18. mixpeek/httpclient.py +0 -84
  19. mixpeek/ingest.py +0 -831
  20. mixpeek/interactions.py +0 -221
  21. mixpeek/models/__init__.py +0 -751
  22. mixpeek/models/actionusage.py +0 -16
  23. mixpeek/models/apierror.py +0 -22
  24. mixpeek/models/apikey.py +0 -25
  25. mixpeek/models/apikeyupdate.py +0 -49
  26. mixpeek/models/assetfeatures.py +0 -55
  27. mixpeek/models/assetresponse.py +0 -166
  28. mixpeek/models/assets_model_searchquery.py +0 -21
  29. mixpeek/models/assetupdate.py +0 -28
  30. mixpeek/models/availableindexesresponse.py +0 -23
  31. mixpeek/models/availablemodels.py +0 -12
  32. mixpeek/models/boolindexparams.py +0 -18
  33. mixpeek/models/collectionmodel.py +0 -70
  34. mixpeek/models/collectionresult.py +0 -73
  35. mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +0 -23
  36. mixpeek/models/create_collection_collections_postop.py +0 -62
  37. mixpeek/models/create_interaction_features_search_interactions_postop.py +0 -59
  38. mixpeek/models/createcollectionrequest.py +0 -59
  39. mixpeek/models/createnamespacerequest.py +0 -62
  40. mixpeek/models/datetimeindexparams.py +0 -18
  41. mixpeek/models/dateusage.py +0 -22
  42. mixpeek/models/db_model_paginationresponse.py +0 -59
  43. mixpeek/models/db_model_taskresponse.py +0 -20
  44. mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +0 -23
  45. mixpeek/models/delete_asset_assets_asset_id_deleteop.py +0 -57
  46. mixpeek/models/delete_collection_collections_collection_deleteop.py +0 -59
  47. mixpeek/models/delete_feature_features_feature_id_deleteop.py +0 -57
  48. mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +0 -59
  49. mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +0 -18
  50. mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +0 -16
  51. mixpeek/models/denseembedding.py +0 -16
  52. mixpeek/models/embeddingrequest.py +0 -59
  53. mixpeek/models/embeddingresponse.py +0 -64
  54. mixpeek/models/errormessage.py +0 -13
  55. mixpeek/models/errorresponse.py +0 -21
  56. mixpeek/models/facedetectsettings.py +0 -52
  57. mixpeek/models/featureextractionembeddingrequest.py +0 -54
  58. mixpeek/models/featureresponse.py +0 -74
  59. mixpeek/models/features_model_paginationresponse.py +0 -59
  60. mixpeek/models/featureupdaterequest.py +0 -21
  61. mixpeek/models/filtercondition.py +0 -74
  62. mixpeek/models/floatindexparams.py +0 -18
  63. mixpeek/models/full_asset_update_assets_asset_id_putop.py +0 -69
  64. mixpeek/models/full_feature_update_features_feature_id_putop.py +0 -69
  65. mixpeek/models/geoindexparams.py +0 -18
  66. mixpeek/models/get_asset_assets_asset_id_getop.py +0 -73
  67. mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +0 -73
  68. mixpeek/models/get_collection_collections_collection_getop.py +0 -59
  69. mixpeek/models/get_feature_features_feature_id_getop.py +0 -70
  70. mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +0 -59
  71. mixpeek/models/get_namespace_namespaces_namespace_getop.py +0 -18
  72. mixpeek/models/get_task_tasks_task_id_getop.py +0 -57
  73. mixpeek/models/get_user_organizations_users_user_email_getop.py +0 -16
  74. mixpeek/models/groupbyoptions.py +0 -71
  75. mixpeek/models/groupbyoptionsasset.py +0 -71
  76. mixpeek/models/groupedassetdata.py +0 -18
  77. mixpeek/models/healthcheckresponse.py +0 -13
  78. mixpeek/models/httpvalidationerror.py +0 -21
  79. mixpeek/models/imagedescribesettings.py +0 -82
  80. mixpeek/models/imagedetectsettings.py +0 -53
  81. mixpeek/models/imagereadsettings.py +0 -71
  82. mixpeek/models/imagesettings.py +0 -79
  83. mixpeek/models/ingest_image_url_ingest_images_url_postop.py +0 -59
  84. mixpeek/models/ingest_text_ingest_text_postop.py +0 -59
  85. mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +0 -59
  86. mixpeek/models/inputtype.py +0 -11
  87. mixpeek/models/integerindexparams.py +0 -24
  88. mixpeek/models/interactionresponse.py +0 -87
  89. mixpeek/models/interactiontype.py +0 -11
  90. mixpeek/models/jsonimageoutputsettings.py +0 -55
  91. mixpeek/models/jsontextoutputsettings.py +0 -55
  92. mixpeek/models/jsonvideooutputsettings.py +0 -55
  93. mixpeek/models/keywordindexparams.py +0 -21
  94. mixpeek/models/kill_task_tasks_task_id_deleteop.py +0 -57
  95. mixpeek/models/list_assets_assets_postop.py +0 -77
  96. mixpeek/models/list_collections_collections_getop.py +0 -65
  97. mixpeek/models/list_features_features_postop.py +0 -79
  98. mixpeek/models/list_interactions_features_search_interactions_getop.py +0 -96
  99. mixpeek/models/listassetsrequest.py +0 -75
  100. mixpeek/models/listassetsresponse.py +0 -22
  101. mixpeek/models/listcollectionsresponse.py +0 -22
  102. mixpeek/models/listfeaturesrequest.py +0 -77
  103. mixpeek/models/listfeaturesresponse.py +0 -22
  104. mixpeek/models/logicaloperator_input.py +0 -88
  105. mixpeek/models/logicaloperator_output.py +0 -103
  106. mixpeek/models/logodetectsettings.py +0 -52
  107. mixpeek/models/modality.py +0 -13
  108. mixpeek/models/modeldetails.py +0 -57
  109. mixpeek/models/namespaceresponse.py +0 -54
  110. mixpeek/models/organizationmodel.py +0 -45
  111. mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +0 -69
  112. mixpeek/models/payloadindexconfig.py +0 -94
  113. mixpeek/models/payloadindextype.py +0 -17
  114. mixpeek/models/payloadschematype.py +0 -15
  115. mixpeek/models/percolaterequest.py +0 -57
  116. mixpeek/models/permission.py +0 -10
  117. mixpeek/models/processimageurlinput.py +0 -99
  118. mixpeek/models/processtextinput.py +0 -94
  119. mixpeek/models/processvideourlinput.py +0 -99
  120. mixpeek/models/querysettings.py +0 -56
  121. mixpeek/models/rerankingoptions.py +0 -47
  122. mixpeek/models/search_assets_assets_search_postop.py +0 -59
  123. mixpeek/models/search_features_features_search_postop.py +0 -96
  124. mixpeek/models/search_model_searchquery_input.py +0 -76
  125. mixpeek/models/searchassetsrequest.py +0 -78
  126. mixpeek/models/searchinteraction.py +0 -82
  127. mixpeek/models/searchquery_output.py +0 -79
  128. mixpeek/models/searchrequestfeatures_input.py +0 -151
  129. mixpeek/models/searchrequestfeatures_output.py +0 -151
  130. mixpeek/models/sortoption.py +0 -28
  131. mixpeek/models/sparseembedding.py +0 -21
  132. mixpeek/models/tasks_model_taskresponse.py +0 -24
  133. mixpeek/models/taskstatus.py +0 -16
  134. mixpeek/models/textindexparams.py +0 -31
  135. mixpeek/models/textsettings.py +0 -61
  136. mixpeek/models/tokenizertype.py +0 -11
  137. mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +0 -30
  138. mixpeek/models/update_collection_collections_collection_putop.py +0 -74
  139. mixpeek/models/update_namespace_namespaces_namespace_putop.py +0 -28
  140. mixpeek/models/updateassetrequest.py +0 -60
  141. mixpeek/models/updatenamespacerequest.py +0 -26
  142. mixpeek/models/usage.py +0 -18
  143. mixpeek/models/usermodel_input.py +0 -36
  144. mixpeek/models/usermodel_output.py +0 -36
  145. mixpeek/models/uuidindexparams.py +0 -21
  146. mixpeek/models/validationerror.py +0 -26
  147. mixpeek/models/vectormodel.py +0 -11
  148. mixpeek/models/vectortype.py +0 -9
  149. mixpeek/models/videodescribesettings.py +0 -82
  150. mixpeek/models/videodetectsettings.py +0 -53
  151. mixpeek/models/videoreadsettings.py +0 -71
  152. mixpeek/models/videosettings.py +0 -101
  153. mixpeek/models/videotranscriptionsettings.py +0 -69
  154. mixpeek/namespaces.py +0 -1143
  155. mixpeek/organizations.py +0 -1508
  156. mixpeek/py.typed +0 -1
  157. mixpeek/sdk.py +0 -135
  158. mixpeek/sdkconfiguration.py +0 -45
  159. mixpeek/searchinteractions.py +0 -647
  160. mixpeek/tasks.py +0 -387
  161. mixpeek/types/__init__.py +0 -21
  162. mixpeek/types/basemodel.py +0 -39
  163. mixpeek/utils/__init__.py +0 -97
  164. mixpeek/utils/annotations.py +0 -55
  165. mixpeek/utils/enums.py +0 -34
  166. mixpeek/utils/eventstreaming.py +0 -238
  167. mixpeek/utils/forms.py +0 -202
  168. mixpeek/utils/headers.py +0 -136
  169. mixpeek/utils/logger.py +0 -27
  170. mixpeek/utils/metadata.py +0 -118
  171. mixpeek/utils/queryparams.py +0 -205
  172. mixpeek/utils/requestbodies.py +0 -66
  173. mixpeek/utils/retries.py +0 -217
  174. mixpeek/utils/security.py +0 -174
  175. mixpeek/utils/serializers.py +0 -215
  176. mixpeek/utils/url.py +0 -155
  177. mixpeek/utils/values.py +0 -134
  178. mixpeek-0.1.2.dist-info/METADATA +0 -439
  179. mixpeek-0.1.2.dist-info/RECORD +0 -176
  180. py.typed +0 -1
mixpeek/__init__.py CHANGED
@@ -1,9 +1,86 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1
+ # mixpeek.py
2
+ import requests
3
+ import json
2
4
 
3
- from ._version import __title__, __version__
4
- from .sdk import *
5
- from .sdkconfiguration import *
6
- from .models import *
7
5
 
6
+ class Mixpeek:
7
+ def __init__(self, api_key):
8
+ self.base_url = "http://localhost:8000"
9
+ self.headers = {
10
+ "Authorization": f"Bearer {api_key}",
11
+ "Content-Type": "application/json",
12
+ }
8
13
 
9
- VERSION: str = __version__
14
+ self.generate = self.Generate(self)
15
+ self.parse = self.Parse(self)
16
+ self.embed = self.Embed(self)
17
+
18
+ def _send_post(self, url, payload):
19
+ return requests.post(url, headers=self.headers, data=json.dumps(payload)).json()
20
+
21
+ def _send_get(self, url, payload=None):
22
+ return requests.get(url, headers=self.headers, data=json.dumps(payload)).json()
23
+
24
+ class Embed:
25
+ def __init__(self, mixpeek):
26
+ self.mixpeek = mixpeek
27
+ self.embed_url = f"{self.mixpeek.base_url}/embed"
28
+
29
+ def text(self, text, additional_data=None):
30
+ payload = {"input": text}
31
+ if additional_data is not None:
32
+ payload.update(additional_data)
33
+ return self.mixpeek._send_get(self.embed_url, payload)
34
+
35
+ class Generate:
36
+ def __init__(self, mixpeek):
37
+ self.mixpeek = mixpeek
38
+ self.openai = self.OpenAI(self.mixpeek)
39
+
40
+ class OpenAI:
41
+ def __init__(self, mixpeek):
42
+ self.mixpeek = mixpeek
43
+ self.generate_openai_url = f"{self.mixpeek.base_url}/generate"
44
+
45
+ def _construct_request_format(
46
+ self, model, context, response_format, settings=None
47
+ ):
48
+ payload = {
49
+ "model": {"provider": "gpt", "model": model},
50
+ "context": context,
51
+ "messages": [{"role": "user", "content": ""}],
52
+ **settings,
53
+ }
54
+
55
+ if response_format is not None:
56
+ json_schema = response_format.model_json_schema()
57
+ payload["response_format"] = json_schema
58
+
59
+ return payload
60
+
61
+ def chat(self, model, response_format, context, settings=None):
62
+ payload = self._construct_request_format(
63
+ model, context, response_format, settings
64
+ )
65
+ return self.mixpeek._send_post(self.generate_openai_url, payload)
66
+
67
+ class Parse:
68
+ def __init__(self, mixpeek):
69
+ self.mixpeek = mixpeek
70
+ self.text = self.Text(self.mixpeek)
71
+
72
+ class Text:
73
+ def __init__(self, mixpeek):
74
+ self.mixpeek = mixpeek
75
+ self.parse_url = f"{self.mixpeek.base_url}/parsers"
76
+
77
+ def extract(self, file_url, should_chunk=True):
78
+ url = self.parse_url + "?should_chunk=" + str(should_chunk)
79
+ return self.mixpeek._send_post(url, {"file_url": file_url})
80
+
81
+ def chunk(self, corpus):
82
+ pass
83
+
84
+ class Index:
85
+ def __init__(self):
86
+ pass
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2021 mixpeek
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
20
+ OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.1
2
+ Name: mixpeek
3
+ Version: 0.5
4
+ Summary: full-text file search API
5
+ Home-page: https://github.com/mixpeek/mixpeek-python
6
+ Author: Ethan Steininger
7
+ Author-email: info@mixpeek.com
8
+ License: MIT
9
+ Keywords: file search
10
+ License-File: LICENSE.rst
11
+ Requires-Dist: requests
12
+
@@ -0,0 +1,6 @@
1
+ mixpeek/__init__.py,sha256=SNRaL77AXYHrVoK5AaxvaFkehqAHjnj7LU9sNTWSiWM,2927
2
+ mixpeek-0.5.dist-info/LICENSE.rst,sha256=HHFCinDHL38osjHNrBgNZqExYuEWJ3hNZxzcr1mWWeo,1072
3
+ mixpeek-0.5.dist-info/METADATA,sha256=eepojmh-AImTMqu4cPebkRgoXnbqal21tP9AC4-bZlM,279
4
+ mixpeek-0.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
+ mixpeek-0.5.dist-info/top_level.txt,sha256=EJ8Jc4IhqyUwnUlBwKbs498Ju4O9a-IDh2kXc_lo6Vg,8
6
+ mixpeek-0.5.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ mixpeek
@@ -1,5 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from .sdkhooks import *
4
- from .types import *
5
- from .registration import *
@@ -1,13 +0,0 @@
1
- from .types import Hooks
2
-
3
-
4
- # This file is only ever generated once on the first generation and then is free to be modified.
5
- # Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them
6
- # in this file or in separate files in the hooks folder.
7
-
8
-
9
- def init_hooks(hooks: Hooks):
10
- # pylint: disable=unused-argument
11
- """Add hooks by calling hooks.register{sdk_init/before_request/after_success/after_error}Hook
12
- with an instance of a hook that implements that specific Hook interface
13
- Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance"""
@@ -1,76 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- import httpx
4
- from .types import (
5
- SDKInitHook,
6
- BeforeRequestContext,
7
- BeforeRequestHook,
8
- AfterSuccessContext,
9
- AfterSuccessHook,
10
- AfterErrorContext,
11
- AfterErrorHook,
12
- Hooks,
13
- )
14
- from .registration import init_hooks
15
- from typing import List, Optional, Tuple
16
- from mixpeek.httpclient import HttpClient
17
-
18
-
19
- class SDKHooks(Hooks):
20
- def __init__(self) -> None:
21
- self.sdk_init_hooks: List[SDKInitHook] = []
22
- self.before_request_hooks: List[BeforeRequestHook] = []
23
- self.after_success_hooks: List[AfterSuccessHook] = []
24
- self.after_error_hooks: List[AfterErrorHook] = []
25
- init_hooks(self)
26
-
27
- def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
28
- self.sdk_init_hooks.append(hook)
29
-
30
- def register_before_request_hook(self, hook: BeforeRequestHook) -> None:
31
- self.before_request_hooks.append(hook)
32
-
33
- def register_after_success_hook(self, hook: AfterSuccessHook) -> None:
34
- self.after_success_hooks.append(hook)
35
-
36
- def register_after_error_hook(self, hook: AfterErrorHook) -> None:
37
- self.after_error_hooks.append(hook)
38
-
39
- def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]:
40
- for hook in self.sdk_init_hooks:
41
- base_url, client = hook.sdk_init(base_url, client)
42
- return base_url, client
43
-
44
- def before_request(
45
- self, hook_ctx: BeforeRequestContext, request: httpx.Request
46
- ) -> httpx.Request:
47
- for hook in self.before_request_hooks:
48
- out = hook.before_request(hook_ctx, request)
49
- if isinstance(out, Exception):
50
- raise out
51
- request = out
52
-
53
- return request
54
-
55
- def after_success(
56
- self, hook_ctx: AfterSuccessContext, response: httpx.Response
57
- ) -> httpx.Response:
58
- for hook in self.after_success_hooks:
59
- out = hook.after_success(hook_ctx, response)
60
- if isinstance(out, Exception):
61
- raise out
62
- response = out
63
- return response
64
-
65
- def after_error(
66
- self,
67
- hook_ctx: AfterErrorContext,
68
- response: Optional[httpx.Response],
69
- error: Optional[Exception],
70
- ) -> Tuple[Optional[httpx.Response], Optional[Exception]]:
71
- for hook in self.after_error_hooks:
72
- result = hook.after_error(hook_ctx, response, error)
73
- if isinstance(result, Exception):
74
- raise result
75
- response, error = result
76
- return response, error
mixpeek/_hooks/types.py DELETED
@@ -1,94 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from abc import ABC, abstractmethod
4
- import httpx
5
- from mixpeek.httpclient import HttpClient
6
- from typing import Any, Callable, List, Optional, Tuple, Union
7
-
8
-
9
- class HookContext:
10
- operation_id: str
11
- oauth2_scopes: Optional[List[str]] = None
12
- security_source: Optional[Union[Any, Callable[[], Any]]] = None
13
-
14
- def __init__(
15
- self,
16
- operation_id: str,
17
- oauth2_scopes: Optional[List[str]],
18
- security_source: Optional[Union[Any, Callable[[], Any]]],
19
- ):
20
- self.operation_id = operation_id
21
- self.oauth2_scopes = oauth2_scopes
22
- self.security_source = security_source
23
-
24
-
25
- class BeforeRequestContext(HookContext):
26
- def __init__(self, hook_ctx: HookContext):
27
- super().__init__(
28
- hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
29
- )
30
-
31
-
32
- class AfterSuccessContext(HookContext):
33
- def __init__(self, hook_ctx: HookContext):
34
- super().__init__(
35
- hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
36
- )
37
-
38
-
39
- class AfterErrorContext(HookContext):
40
- def __init__(self, hook_ctx: HookContext):
41
- super().__init__(
42
- hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
43
- )
44
-
45
-
46
- class SDKInitHook(ABC):
47
- @abstractmethod
48
- def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]:
49
- pass
50
-
51
-
52
- class BeforeRequestHook(ABC):
53
- @abstractmethod
54
- def before_request(
55
- self, hook_ctx: BeforeRequestContext, request: httpx.Request
56
- ) -> Union[httpx.Request, Exception]:
57
- pass
58
-
59
-
60
- class AfterSuccessHook(ABC):
61
- @abstractmethod
62
- def after_success(
63
- self, hook_ctx: AfterSuccessContext, response: httpx.Response
64
- ) -> Union[httpx.Response, Exception]:
65
- pass
66
-
67
-
68
- class AfterErrorHook(ABC):
69
- @abstractmethod
70
- def after_error(
71
- self,
72
- hook_ctx: AfterErrorContext,
73
- response: Optional[httpx.Response],
74
- error: Optional[Exception],
75
- ) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]:
76
- pass
77
-
78
-
79
- class Hooks(ABC):
80
- @abstractmethod
81
- def register_sdk_init_hook(self, hook: SDKInitHook):
82
- pass
83
-
84
- @abstractmethod
85
- def register_before_request_hook(self, hook: BeforeRequestHook):
86
- pass
87
-
88
- @abstractmethod
89
- def register_after_success_hook(self, hook: AfterSuccessHook):
90
- pass
91
-
92
- @abstractmethod
93
- def register_after_error_hook(self, hook: AfterErrorHook):
94
- pass
mixpeek/_version.py DELETED
@@ -1,12 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- import importlib.metadata
4
-
5
- __title__: str = "mixpeek"
6
- __version__: str = "0.1.2"
7
-
8
- try:
9
- if __package__ is not None:
10
- __version__ = importlib.metadata.version(__package__)
11
- except importlib.metadata.PackageNotFoundError:
12
- pass