mixpeek 0.6.8__py3-none-any.whl → 0.6.10__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 (85) hide show
  1. mixpeek/__init__.py +1 -106
  2. mixpeek/client.py +21 -65
  3. mixpeek/endpoints/connections.py +16 -0
  4. mixpeek/endpoints/embed.py +50 -0
  5. mixpeek/endpoints/extract.py +16 -0
  6. mixpeek/endpoints/generate.py +17 -0
  7. mixpeek/endpoints/tools.py +23 -0
  8. mixpeek/exceptions.py +13 -0
  9. mixpeek-0.6.10.dist-info/METADATA +68 -0
  10. mixpeek-0.6.10.dist-info/RECORD +13 -0
  11. {mixpeek-0.6.8.dist-info → mixpeek-0.6.10.dist-info}/WHEEL +2 -1
  12. mixpeek-0.6.10.dist-info/top_level.txt +1 -0
  13. mixpeek/base_client.py +0 -1015
  14. mixpeek/core/__init__.py +0 -27
  15. mixpeek/core/api_error.py +0 -15
  16. mixpeek/core/client_wrapper.py +0 -83
  17. mixpeek/core/datetime_utils.py +0 -28
  18. mixpeek/core/file.py +0 -38
  19. mixpeek/core/http_client.py +0 -130
  20. mixpeek/core/jsonable_encoder.py +0 -99
  21. mixpeek/core/pydantic_utilities.py +0 -12
  22. mixpeek/core/remove_none_from_dict.py +0 -11
  23. mixpeek/core/request_options.py +0 -32
  24. mixpeek/environment.py +0 -7
  25. mixpeek/errors/__init__.py +0 -17
  26. mixpeek/errors/bad_request_error.py +0 -9
  27. mixpeek/errors/forbidden_error.py +0 -9
  28. mixpeek/errors/internal_server_error.py +0 -9
  29. mixpeek/errors/not_found_error.py +0 -9
  30. mixpeek/errors/unauthorized_error.py +0 -9
  31. mixpeek/errors/unprocessable_entity_error.py +0 -9
  32. mixpeek/pipeline/__init__.py +0 -2
  33. mixpeek/pipeline/client.py +0 -482
  34. mixpeek/storage/__init__.py +0 -5
  35. mixpeek/storage/client.py +0 -145
  36. mixpeek/storage/sample/__init__.py +0 -2
  37. mixpeek/storage/sample/client.py +0 -286
  38. mixpeek/types/__init__.py +0 -81
  39. mixpeek/types/api_key.py +0 -27
  40. mixpeek/types/audio_params.py +0 -25
  41. mixpeek/types/configs_response.py +0 -38
  42. mixpeek/types/connection.py +0 -32
  43. mixpeek/types/connection_engine.py +0 -5
  44. mixpeek/types/csv_params.py +0 -25
  45. mixpeek/types/destination.py +0 -38
  46. mixpeek/types/embedding_response.py +0 -30
  47. mixpeek/types/error_message.py +0 -25
  48. mixpeek/types/error_response.py +0 -26
  49. mixpeek/types/extract_response.py +0 -31
  50. mixpeek/types/field_type.py +0 -5
  51. mixpeek/types/generation_response.py +0 -32
  52. mixpeek/types/html_params.py +0 -25
  53. mixpeek/types/http_validation_error.py +0 -26
  54. mixpeek/types/image_params.py +0 -28
  55. mixpeek/types/message.py +0 -33
  56. mixpeek/types/metadata.py +0 -28
  57. mixpeek/types/modality.py +0 -5
  58. mixpeek/types/model.py +0 -34
  59. mixpeek/types/models.py +0 -5
  60. mixpeek/types/pdf_params.py +0 -37
  61. mixpeek/types/pipeline_response.py +0 -45
  62. mixpeek/types/pipeline_task_response.py +0 -28
  63. mixpeek/types/ppt_params.py +0 -23
  64. mixpeek/types/pptx_params.py +0 -23
  65. mixpeek/types/settings.py +0 -31
  66. mixpeek/types/source.py +0 -39
  67. mixpeek/types/source_destination_mapping.py +0 -40
  68. mixpeek/types/txt_params.py +0 -23
  69. mixpeek/types/user.py +0 -32
  70. mixpeek/types/validation_error.py +0 -28
  71. mixpeek/types/validation_error_loc_item.py +0 -5
  72. mixpeek/types/video_params.py +0 -23
  73. mixpeek/types/workflow_code_response.py +0 -25
  74. mixpeek/types/workflow_response.py +0 -28
  75. mixpeek/types/workflow_settings.py +0 -26
  76. mixpeek/types/xlsx_params.py +0 -25
  77. mixpeek/user/__init__.py +0 -2
  78. mixpeek/user/client.py +0 -312
  79. mixpeek/version.py +0 -4
  80. mixpeek/workflow/__init__.py +0 -2
  81. mixpeek/workflow/client.py +0 -543
  82. mixpeek-0.6.8.dist-info/LICENSE +0 -21
  83. mixpeek-0.6.8.dist-info/METADATA +0 -145
  84. mixpeek-0.6.8.dist-info/RECORD +0 -76
  85. /mixpeek/{py.typed → endpoints/__init__.py} +0 -0
mixpeek/core/__init__.py DELETED
@@ -1,27 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from .api_error import ApiError
4
- from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
5
- from .datetime_utils import serialize_datetime
6
- from .file import File, convert_file_dict_to_httpx_tuples
7
- from .http_client import AsyncHttpClient, HttpClient
8
- from .jsonable_encoder import jsonable_encoder
9
- from .pydantic_utilities import pydantic_v1
10
- from .remove_none_from_dict import remove_none_from_dict
11
- from .request_options import RequestOptions
12
-
13
- __all__ = [
14
- "ApiError",
15
- "AsyncClientWrapper",
16
- "AsyncHttpClient",
17
- "BaseClientWrapper",
18
- "File",
19
- "HttpClient",
20
- "RequestOptions",
21
- "SyncClientWrapper",
22
- "convert_file_dict_to_httpx_tuples",
23
- "jsonable_encoder",
24
- "pydantic_v1",
25
- "remove_none_from_dict",
26
- "serialize_datetime",
27
- ]
mixpeek/core/api_error.py DELETED
@@ -1,15 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
-
6
- class ApiError(Exception):
7
- status_code: typing.Optional[int]
8
- body: typing.Any
9
-
10
- def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None):
11
- self.status_code = status_code
12
- self.body = body
13
-
14
- def __str__(self) -> str:
15
- return f"status_code: {self.status_code}, body: {self.body}"
@@ -1,83 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- import httpx
6
-
7
- from .http_client import AsyncHttpClient, HttpClient
8
-
9
-
10
- class BaseClientWrapper:
11
- def __init__(
12
- self,
13
- *,
14
- authorization: typing.Optional[str] = None,
15
- index_id: typing.Optional[str] = None,
16
- api_key: typing.Union[str, typing.Callable[[], str]],
17
- base_url: str,
18
- timeout: typing.Optional[float] = None,
19
- ):
20
- self._authorization = authorization
21
- self._index_id = index_id
22
- self._api_key = api_key
23
- self._base_url = base_url
24
- self._timeout = timeout
25
-
26
- def get_headers(self) -> typing.Dict[str, str]:
27
- headers: typing.Dict[str, str] = {
28
- "X-Fern-Language": "Python",
29
- "X-Fern-SDK-Name": "mixpeek",
30
- "X-Fern-SDK-Version": "0.6.8",
31
- }
32
- if self._authorization is not None:
33
- headers["Authorization"] = self._authorization
34
- if self._index_id is not None:
35
- headers["index-id"] = self._index_id
36
- headers["Authorization"] = f"Bearer {self._get_api_key()}"
37
- return headers
38
-
39
- def _get_api_key(self) -> str:
40
- if isinstance(self._api_key, str):
41
- return self._api_key
42
- else:
43
- return self._api_key()
44
-
45
- def get_base_url(self) -> str:
46
- return self._base_url
47
-
48
- def get_timeout(self) -> typing.Optional[float]:
49
- return self._timeout
50
-
51
-
52
- class SyncClientWrapper(BaseClientWrapper):
53
- def __init__(
54
- self,
55
- *,
56
- authorization: typing.Optional[str] = None,
57
- index_id: typing.Optional[str] = None,
58
- api_key: typing.Union[str, typing.Callable[[], str]],
59
- base_url: str,
60
- timeout: typing.Optional[float] = None,
61
- httpx_client: httpx.Client,
62
- ):
63
- super().__init__(
64
- authorization=authorization, index_id=index_id, api_key=api_key, base_url=base_url, timeout=timeout
65
- )
66
- self.httpx_client = HttpClient(httpx_client=httpx_client)
67
-
68
-
69
- class AsyncClientWrapper(BaseClientWrapper):
70
- def __init__(
71
- self,
72
- *,
73
- authorization: typing.Optional[str] = None,
74
- index_id: typing.Optional[str] = None,
75
- api_key: typing.Union[str, typing.Callable[[], str]],
76
- base_url: str,
77
- timeout: typing.Optional[float] = None,
78
- httpx_client: httpx.AsyncClient,
79
- ):
80
- super().__init__(
81
- authorization=authorization, index_id=index_id, api_key=api_key, base_url=base_url, timeout=timeout
82
- )
83
- self.httpx_client = AsyncHttpClient(httpx_client=httpx_client)
@@ -1,28 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
-
5
-
6
- def serialize_datetime(v: dt.datetime) -> str:
7
- """
8
- Serialize a datetime including timezone info.
9
-
10
- Uses the timezone info provided if present, otherwise uses the current runtime's timezone info.
11
-
12
- UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00.
13
- """
14
-
15
- def _serialize_zoned_datetime(v: dt.datetime) -> str:
16
- if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None):
17
- # UTC is a special case where we use "Z" at the end instead of "+00:00"
18
- return v.isoformat().replace("+00:00", "Z")
19
- else:
20
- # Delegate to the typical +/- offset format
21
- return v.isoformat()
22
-
23
- if v.tzinfo is not None:
24
- return _serialize_zoned_datetime(v)
25
- else:
26
- local_tz = dt.datetime.now().astimezone().tzinfo
27
- localized_dt = v.replace(tzinfo=local_tz)
28
- return _serialize_zoned_datetime(localized_dt)
mixpeek/core/file.py DELETED
@@ -1,38 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- # File typing inspired by the flexibility of types within the httpx library
6
- # https://github.com/encode/httpx/blob/master/httpx/_types.py
7
- FileContent = typing.Union[typing.IO[bytes], bytes, str]
8
- File = typing.Union[
9
- # file (or bytes)
10
- FileContent,
11
- # (filename, file (or bytes))
12
- typing.Tuple[typing.Optional[str], FileContent],
13
- # (filename, file (or bytes), content_type)
14
- typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str]],
15
- # (filename, file (or bytes), content_type, headers)
16
- typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str], typing.Mapping[str, str]],
17
- ]
18
-
19
-
20
- def convert_file_dict_to_httpx_tuples(
21
- d: typing.Dict[str, typing.Union[File, typing.List[File]]]
22
- ) -> typing.List[typing.Tuple[str, File]]:
23
- """
24
- The format we use is a list of tuples, where the first element is the
25
- name of the file and the second is the file object. Typically HTTPX wants
26
- a dict, but to be able to send lists of files, you have to use the list
27
- approach (which also works for non-lists)
28
- https://github.com/encode/httpx/pull/1032
29
- """
30
-
31
- httpx_tuples = []
32
- for key, file_like in d.items():
33
- if isinstance(file_like, list):
34
- for file_like_item in file_like:
35
- httpx_tuples.append((key, file_like_item))
36
- else:
37
- httpx_tuples.append((key, file_like))
38
- return httpx_tuples
@@ -1,130 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import asyncio
4
- import email.utils
5
- import re
6
- import time
7
- import typing
8
- from contextlib import asynccontextmanager, contextmanager
9
- from functools import wraps
10
- from random import random
11
-
12
- import httpx
13
-
14
- INITIAL_RETRY_DELAY_SECONDS = 0.5
15
- MAX_RETRY_DELAY_SECONDS = 10
16
- MAX_RETRY_DELAY_SECONDS_FROM_HEADER = 30
17
-
18
-
19
- def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]:
20
- """
21
- This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait.
22
-
23
- Inspired by the urllib3 retry implementation.
24
- """
25
- retry_after_ms = response_headers.get("retry-after-ms")
26
- if retry_after_ms is not None:
27
- try:
28
- return int(retry_after_ms) / 1000 if retry_after_ms > 0 else 0
29
- except Exception:
30
- pass
31
-
32
- retry_after = response_headers.get("retry-after")
33
- if retry_after is None:
34
- return None
35
-
36
- # Attempt to parse the header as an int.
37
- if re.match(r"^\s*[0-9]+\s*$", retry_after):
38
- seconds = float(retry_after)
39
- # Fallback to parsing it as a date.
40
- else:
41
- retry_date_tuple = email.utils.parsedate_tz(retry_after)
42
- if retry_date_tuple is None:
43
- return None
44
- if retry_date_tuple[9] is None: # Python 2
45
- # Assume UTC if no timezone was specified
46
- # On Python2.7, parsedate_tz returns None for a timezone offset
47
- # instead of 0 if no timezone is given, where mktime_tz treats
48
- # a None timezone offset as local time.
49
- retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:]
50
-
51
- retry_date = email.utils.mktime_tz(retry_date_tuple)
52
- seconds = retry_date - time.time()
53
-
54
- if seconds < 0:
55
- seconds = 0
56
-
57
- return seconds
58
-
59
-
60
- def _retry_timeout(response: httpx.Response, retries: int) -> float:
61
- """
62
- Determine the amount of time to wait before retrying a request.
63
- This function begins by trying to parse a retry-after header from the response, and then proceeds to use exponential backoff
64
- with a jitter to determine the number of seconds to wait.
65
- """
66
-
67
- # If the API asks us to wait a certain amount of time (and it's a reasonable amount), just do what it says.
68
- retry_after = _parse_retry_after(response.headers)
69
- if retry_after is not None and retry_after <= MAX_RETRY_DELAY_SECONDS_FROM_HEADER:
70
- return retry_after
71
-
72
- # Apply exponential backoff, capped at MAX_RETRY_DELAY_SECONDS.
73
- retry_delay = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS)
74
-
75
- # Add a randomness / jitter to the retry delay to avoid overwhelming the server with retries.
76
- timeout = retry_delay * (1 - 0.25 * random())
77
- return timeout if timeout >= 0 else 0
78
-
79
-
80
- def _should_retry(response: httpx.Response) -> bool:
81
- retriable_400s = [429, 408, 409]
82
- return response.status_code >= 500 or response.status_code in retriable_400s
83
-
84
-
85
- class HttpClient:
86
- def __init__(self, *, httpx_client: httpx.Client):
87
- self.httpx_client = httpx_client
88
-
89
- # Ensure that the signature of the `request` method is the same as the `httpx.Client.request` method
90
- @wraps(httpx.Client.request)
91
- def request(
92
- self, *args: typing.Any, max_retries: int = 0, retries: int = 0, **kwargs: typing.Any
93
- ) -> httpx.Response:
94
- response = self.httpx_client.request(*args, **kwargs)
95
- if _should_retry(response=response):
96
- if max_retries > retries:
97
- time.sleep(_retry_timeout(response=response, retries=retries))
98
- return self.request(max_retries=max_retries, retries=retries + 1, *args, **kwargs)
99
- return response
100
-
101
- @wraps(httpx.Client.stream)
102
- @contextmanager
103
- def stream(self, *args: typing.Any, max_retries: int = 0, retries: int = 0, **kwargs: typing.Any) -> typing.Any:
104
- with self.httpx_client.stream(*args, **kwargs) as stream:
105
- yield stream
106
-
107
-
108
- class AsyncHttpClient:
109
- def __init__(self, *, httpx_client: httpx.AsyncClient):
110
- self.httpx_client = httpx_client
111
-
112
- # Ensure that the signature of the `request` method is the same as the `httpx.Client.request` method
113
- @wraps(httpx.AsyncClient.request)
114
- async def request(
115
- self, *args: typing.Any, max_retries: int = 0, retries: int = 0, **kwargs: typing.Any
116
- ) -> httpx.Response:
117
- response = await self.httpx_client.request(*args, **kwargs)
118
- if _should_retry(response=response):
119
- if max_retries > retries:
120
- await asyncio.sleep(_retry_timeout(response=response, retries=retries))
121
- return await self.request(max_retries=max_retries, retries=retries + 1, *args, **kwargs)
122
- return response
123
-
124
- @wraps(httpx.AsyncClient.stream)
125
- @asynccontextmanager
126
- async def stream(
127
- self, *args: typing.Any, max_retries: int = 0, retries: int = 0, **kwargs: typing.Any
128
- ) -> typing.Any:
129
- async with self.httpx_client.stream(*args, **kwargs) as stream:
130
- yield stream
@@ -1,99 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- """
4
- jsonable_encoder converts a Python object to a JSON-friendly dict
5
- (e.g. datetimes to strings, Pydantic models to dicts).
6
-
7
- Taken from FastAPI, and made a bit simpler
8
- https://github.com/tiangolo/fastapi/blob/master/fastapi/encoders.py
9
- """
10
-
11
- import dataclasses
12
- import datetime as dt
13
- from collections import defaultdict
14
- from enum import Enum
15
- from pathlib import PurePath
16
- from types import GeneratorType
17
- from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
18
-
19
- from .datetime_utils import serialize_datetime
20
- from .pydantic_utilities import pydantic_v1
21
-
22
- SetIntStr = Set[Union[int, str]]
23
- DictIntStrAny = Dict[Union[int, str], Any]
24
-
25
-
26
- def generate_encoders_by_class_tuples(
27
- type_encoder_map: Dict[Any, Callable[[Any], Any]]
28
- ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
29
- encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple)
30
- for type_, encoder in type_encoder_map.items():
31
- encoders_by_class_tuples[encoder] += (type_,)
32
- return encoders_by_class_tuples
33
-
34
-
35
- encoders_by_class_tuples = generate_encoders_by_class_tuples(pydantic_v1.json.ENCODERS_BY_TYPE)
36
-
37
-
38
- def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any:
39
- custom_encoder = custom_encoder or {}
40
- if custom_encoder:
41
- if type(obj) in custom_encoder:
42
- return custom_encoder[type(obj)](obj)
43
- else:
44
- for encoder_type, encoder_instance in custom_encoder.items():
45
- if isinstance(obj, encoder_type):
46
- return encoder_instance(obj)
47
- if isinstance(obj, pydantic_v1.BaseModel):
48
- encoder = getattr(obj.__config__, "json_encoders", {})
49
- if custom_encoder:
50
- encoder.update(custom_encoder)
51
- obj_dict = obj.dict(by_alias=True)
52
- if "__root__" in obj_dict:
53
- obj_dict = obj_dict["__root__"]
54
- return jsonable_encoder(obj_dict, custom_encoder=encoder)
55
- if dataclasses.is_dataclass(obj):
56
- obj_dict = dataclasses.asdict(obj)
57
- return jsonable_encoder(obj_dict, custom_encoder=custom_encoder)
58
- if isinstance(obj, Enum):
59
- return obj.value
60
- if isinstance(obj, PurePath):
61
- return str(obj)
62
- if isinstance(obj, (str, int, float, type(None))):
63
- return obj
64
- if isinstance(obj, dt.datetime):
65
- return serialize_datetime(obj)
66
- if isinstance(obj, dt.date):
67
- return str(obj)
68
- if isinstance(obj, dict):
69
- encoded_dict = {}
70
- allowed_keys = set(obj.keys())
71
- for key, value in obj.items():
72
- if key in allowed_keys:
73
- encoded_key = jsonable_encoder(key, custom_encoder=custom_encoder)
74
- encoded_value = jsonable_encoder(value, custom_encoder=custom_encoder)
75
- encoded_dict[encoded_key] = encoded_value
76
- return encoded_dict
77
- if isinstance(obj, (list, set, frozenset, GeneratorType, tuple)):
78
- encoded_list = []
79
- for item in obj:
80
- encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder))
81
- return encoded_list
82
-
83
- if type(obj) in pydantic_v1.json.ENCODERS_BY_TYPE:
84
- return pydantic_v1.json.ENCODERS_BY_TYPE[type(obj)](obj)
85
- for encoder, classes_tuple in encoders_by_class_tuples.items():
86
- if isinstance(obj, classes_tuple):
87
- return encoder(obj)
88
-
89
- try:
90
- data = dict(obj)
91
- except Exception as e:
92
- errors: List[Exception] = []
93
- errors.append(e)
94
- try:
95
- data = vars(obj)
96
- except Exception as e:
97
- errors.append(e)
98
- raise ValueError(errors) from e
99
- return jsonable_encoder(data, custom_encoder=custom_encoder)
@@ -1,12 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import pydantic
4
-
5
- IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
6
-
7
- if IS_PYDANTIC_V2:
8
- import pydantic.v1 as pydantic_v1 # type: ignore # nopycln: import
9
- else:
10
- import pydantic as pydantic_v1 # type: ignore # nopycln: import
11
-
12
- __all__ = ["pydantic_v1"]
@@ -1,11 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from typing import Any, Dict, Optional
4
-
5
-
6
- def remove_none_from_dict(original: Dict[str, Optional[Any]]) -> Dict[str, Any]:
7
- new: Dict[str, Any] = {}
8
- for key, value in original.items():
9
- if value is not None:
10
- new[key] = value
11
- return new
@@ -1,32 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- try:
6
- from typing import NotRequired # type: ignore
7
- except ImportError:
8
- from typing_extensions import NotRequired # type: ignore
9
-
10
-
11
- class RequestOptions(typing.TypedDict):
12
- """
13
- Additional options for request-specific configuration when calling APIs via the SDK.
14
- This is used primarily as an optional final parameter for service functions.
15
-
16
- Attributes:
17
- - timeout_in_seconds: int. The number of seconds to await an API call before timing out.
18
-
19
- - max_retries: int. The max number of retries to attempt if the API call fails.
20
-
21
- - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict
22
-
23
- - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
24
-
25
- - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
26
- """
27
-
28
- timeout_in_seconds: NotRequired[int]
29
- max_retries: NotRequired[int]
30
- additional_headers: NotRequired[typing.Dict[str, typing.Any]]
31
- additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
32
- additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
mixpeek/environment.py DELETED
@@ -1,7 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import enum
4
-
5
-
6
- class MixpeekEnvironment(enum.Enum):
7
- DEFAULT = "https://api.mixpeek.com"
@@ -1,17 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from .bad_request_error import BadRequestError
4
- from .forbidden_error import ForbiddenError
5
- from .internal_server_error import InternalServerError
6
- from .not_found_error import NotFoundError
7
- from .unauthorized_error import UnauthorizedError
8
- from .unprocessable_entity_error import UnprocessableEntityError
9
-
10
- __all__ = [
11
- "BadRequestError",
12
- "ForbiddenError",
13
- "InternalServerError",
14
- "NotFoundError",
15
- "UnauthorizedError",
16
- "UnprocessableEntityError",
17
- ]
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.error_response import ErrorResponse
5
-
6
-
7
- class BadRequestError(ApiError):
8
- def __init__(self, body: ErrorResponse):
9
- super().__init__(status_code=400, body=body)
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.error_response import ErrorResponse
5
-
6
-
7
- class ForbiddenError(ApiError):
8
- def __init__(self, body: ErrorResponse):
9
- super().__init__(status_code=403, body=body)
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.error_response import ErrorResponse
5
-
6
-
7
- class InternalServerError(ApiError):
8
- def __init__(self, body: ErrorResponse):
9
- super().__init__(status_code=500, body=body)
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.error_response import ErrorResponse
5
-
6
-
7
- class NotFoundError(ApiError):
8
- def __init__(self, body: ErrorResponse):
9
- super().__init__(status_code=404, body=body)
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.error_response import ErrorResponse
5
-
6
-
7
- class UnauthorizedError(ApiError):
8
- def __init__(self, body: ErrorResponse):
9
- super().__init__(status_code=401, body=body)
@@ -1,9 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.api_error import ApiError
4
- from ..types.http_validation_error import HttpValidationError
5
-
6
-
7
- class UnprocessableEntityError(ApiError):
8
- def __init__(self, body: HttpValidationError):
9
- super().__init__(status_code=422, body=body)
@@ -1,2 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-