mapleflow 0.8.1__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.
- mapleflow/__init__.py +8 -0
- mapleflow/api/__init__.py +1 -0
- mapleflow/api/ai/__init__.py +1 -0
- mapleflow/api/ai/post_ai_chat.py +195 -0
- mapleflow/api/ai/post_ai_embeddings.py +191 -0
- mapleflow/api/ai/post_ai_images.py +195 -0
- mapleflow/api/ai/post_ai_speech.py +191 -0
- mapleflow/api/ai/post_ai_transcribe.py +189 -0
- mapleflow/api/images/__init__.py +1 -0
- mapleflow/api/images/post_images_bg_remove.py +235 -0
- mapleflow/api/utility/__init__.py +1 -0
- mapleflow/api/utility/get_currency.py +253 -0
- mapleflow/api/utility/get_weather.py +277 -0
- mapleflow/api/utility/post_translate.py +206 -0
- mapleflow/api/verify/__init__.py +1 -0
- mapleflow/api/verify/post_verify_face.py +190 -0
- mapleflow/api/verify/post_verify_labels.py +190 -0
- mapleflow/client.py +282 -0
- mapleflow/errors.py +16 -0
- mapleflow/models/__init__.py +99 -0
- mapleflow/models/get_currency_response_200.py +81 -0
- mapleflow/models/get_currency_response_400.py +81 -0
- mapleflow/models/get_currency_response_404.py +81 -0
- mapleflow/models/get_currency_response_502.py +81 -0
- mapleflow/models/get_weather_response_200.py +81 -0
- mapleflow/models/get_weather_response_400.py +81 -0
- mapleflow/models/get_weather_response_404.py +81 -0
- mapleflow/models/get_weather_response_502.py +81 -0
- mapleflow/models/get_weather_units.py +9 -0
- mapleflow/models/post_ai_chat_body.py +104 -0
- mapleflow/models/post_ai_chat_body_messages_item.py +69 -0
- mapleflow/models/post_ai_chat_body_model.py +9 -0
- mapleflow/models/post_ai_chat_response_200.py +72 -0
- mapleflow/models/post_ai_chat_response_400.py +69 -0
- mapleflow/models/post_ai_embeddings_body.py +98 -0
- mapleflow/models/post_ai_embeddings_body_model.py +8 -0
- mapleflow/models/post_ai_embeddings_response_200.py +72 -0
- mapleflow/models/post_ai_embeddings_response_400.py +69 -0
- mapleflow/models/post_ai_images_body.py +90 -0
- mapleflow/models/post_ai_images_body_model.py +9 -0
- mapleflow/models/post_ai_images_response_200.py +72 -0
- mapleflow/models/post_ai_images_response_400.py +69 -0
- mapleflow/models/post_ai_speech_body.py +80 -0
- mapleflow/models/post_ai_speech_body_model.py +8 -0
- mapleflow/models/post_ai_speech_response_200.py +72 -0
- mapleflow/models/post_ai_speech_response_400.py +69 -0
- mapleflow/models/post_ai_transcribe_body.py +81 -0
- mapleflow/models/post_ai_transcribe_response_200.py +72 -0
- mapleflow/models/post_ai_transcribe_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_files_body.py +93 -0
- mapleflow/models/post_images_bg_remove_json_body.py +70 -0
- mapleflow/models/post_images_bg_remove_response_200.py +72 -0
- mapleflow/models/post_images_bg_remove_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_response_502.py +69 -0
- mapleflow/models/post_images_bg_remove_response_504.py +69 -0
- mapleflow/models/post_translate_body.py +89 -0
- mapleflow/models/post_translate_response_200.py +81 -0
- mapleflow/models/post_translate_response_400.py +81 -0
- mapleflow/models/post_translate_response_402.py +81 -0
- mapleflow/models/post_verify_face_files_body.py +100 -0
- mapleflow/models/post_verify_face_json_body.py +69 -0
- mapleflow/models/post_verify_face_response_200.py +72 -0
- mapleflow/models/post_verify_face_response_400.py +69 -0
- mapleflow/models/post_verify_labels_files_body.py +81 -0
- mapleflow/models/post_verify_labels_json_body.py +61 -0
- mapleflow/models/post_verify_labels_response_200.py +72 -0
- mapleflow/models/post_verify_labels_response_400.py +69 -0
- mapleflow/types.py +54 -0
- mapleflow-0.8.1.dist-info/METADATA +54 -0
- mapleflow-0.8.1.dist-info/RECORD +71 -0
- mapleflow-0.8.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostVerifyFaceResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostVerifyFaceResponse200:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
success: bool
|
|
23
|
+
data: Any | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
success = self.success
|
|
28
|
+
|
|
29
|
+
data = self.data
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"success": success,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
if data is not UNSET:
|
|
39
|
+
field_dict["data"] = data
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
success = d.pop("success")
|
|
47
|
+
|
|
48
|
+
data = d.pop("data", UNSET)
|
|
49
|
+
|
|
50
|
+
post_verify_face_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_verify_face_response_200.additional_properties = d
|
|
56
|
+
return post_verify_face_response_200
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> list[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostVerifyFaceResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostVerifyFaceResponse400:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_verify_face_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_verify_face_response_400.additional_properties = d
|
|
53
|
+
return post_verify_face_response_400
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from io import BytesIO
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from .. import types
|
|
11
|
+
from ..types import UNSET, File, FileTypes, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PostVerifyLabelsFilesBody")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PostVerifyLabelsFilesBody:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
image (File | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
image: File | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
image: FileTypes | Unset = UNSET
|
|
28
|
+
if not isinstance(self.image, Unset):
|
|
29
|
+
image = self.image.to_tuple()
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update({})
|
|
34
|
+
if image is not UNSET:
|
|
35
|
+
field_dict["image"] = image
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
40
|
+
files: types.RequestFiles = []
|
|
41
|
+
|
|
42
|
+
if not isinstance(self.image, Unset):
|
|
43
|
+
files.append(("image", self.image.to_tuple()))
|
|
44
|
+
|
|
45
|
+
for prop_name, prop in self.additional_properties.items():
|
|
46
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
47
|
+
|
|
48
|
+
return files
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
_image = d.pop("image", UNSET)
|
|
54
|
+
image: File | Unset
|
|
55
|
+
if isinstance(_image, Unset):
|
|
56
|
+
image = UNSET
|
|
57
|
+
else:
|
|
58
|
+
image = File(payload=BytesIO(_image))
|
|
59
|
+
|
|
60
|
+
post_verify_labels_files_body = cls(
|
|
61
|
+
image=image,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
post_verify_labels_files_body.additional_properties = d
|
|
65
|
+
return post_verify_labels_files_body
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostVerifyLabelsJsonBody")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostVerifyLabelsJsonBody:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
image (str): Base64-encoded image Example: <base64>.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
image: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
image = self.image
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"image": image,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
image = d.pop("image")
|
|
39
|
+
|
|
40
|
+
post_verify_labels_json_body = cls(
|
|
41
|
+
image=image,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
post_verify_labels_json_body.additional_properties = d
|
|
45
|
+
return post_verify_labels_json_body
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostVerifyLabelsResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostVerifyLabelsResponse200:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
success: bool
|
|
23
|
+
data: Any | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
success = self.success
|
|
28
|
+
|
|
29
|
+
data = self.data
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"success": success,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
if data is not UNSET:
|
|
39
|
+
field_dict["data"] = data
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
success = d.pop("success")
|
|
47
|
+
|
|
48
|
+
data = d.pop("data", UNSET)
|
|
49
|
+
|
|
50
|
+
post_verify_labels_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_verify_labels_response_200.additional_properties = d
|
|
56
|
+
return post_verify_labels_response_200
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> list[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostVerifyLabelsResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostVerifyLabelsResponse400:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_verify_labels_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_verify_labels_response_400.additional_properties = d
|
|
53
|
+
return post_verify_labels_response_400
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
mapleflow/types.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Contains some shared types for properties"""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping, MutableMapping
|
|
4
|
+
from http import HTTPStatus
|
|
5
|
+
from typing import IO, BinaryIO, Generic, Literal, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Unset:
|
|
11
|
+
def __bool__(self) -> Literal[False]:
|
|
12
|
+
return False
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
UNSET: Unset = Unset()
|
|
16
|
+
|
|
17
|
+
# The types that `httpx.Client(files=)` can accept, copied from that library.
|
|
18
|
+
FileContent = IO[bytes] | bytes | str
|
|
19
|
+
FileTypes = (
|
|
20
|
+
# (filename, file (or bytes), content_type)
|
|
21
|
+
tuple[str | None, FileContent, str | None]
|
|
22
|
+
# (filename, file (or bytes), content_type, headers)
|
|
23
|
+
| tuple[str | None, FileContent, str | None, Mapping[str, str]]
|
|
24
|
+
)
|
|
25
|
+
RequestFiles = list[tuple[str, FileTypes]]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@define
|
|
29
|
+
class File:
|
|
30
|
+
"""Contains information for file uploads"""
|
|
31
|
+
|
|
32
|
+
payload: BinaryIO
|
|
33
|
+
file_name: str | None = None
|
|
34
|
+
mime_type: str | None = None
|
|
35
|
+
|
|
36
|
+
def to_tuple(self) -> FileTypes:
|
|
37
|
+
"""Return a tuple representation that httpx will accept for multipart/form-data"""
|
|
38
|
+
return self.file_name, self.payload, self.mime_type
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
T = TypeVar("T")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@define
|
|
45
|
+
class Response(Generic[T]):
|
|
46
|
+
"""A response from an endpoint"""
|
|
47
|
+
|
|
48
|
+
status_code: HTTPStatus
|
|
49
|
+
content: bytes
|
|
50
|
+
headers: MutableMapping[str, str]
|
|
51
|
+
parsed: T | None
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mapleflow
|
|
3
|
+
Version: 0.8.1
|
|
4
|
+
Summary: Official Python SDK for the MapleFlow API platform — auto-generated from OpenAPI spec
|
|
5
|
+
Project-URL: Homepage, https://mapleflow.io
|
|
6
|
+
Project-URL: Repository, https://github.com/mapleflow/sdk-python
|
|
7
|
+
Project-URL: Documentation, https://mapleflow.io/docs
|
|
8
|
+
Author-email: MapleFlow <hello@mapleflow.io>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: ai,api,mapleflow,sdk,translate,weather
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Requires-Dist: httpx>=0.24.0
|
|
18
|
+
Requires-Dist: microsoft-kiota-abstractions>=1.0.0
|
|
19
|
+
Requires-Dist: microsoft-kiota-authentication-azure>=1.0.0
|
|
20
|
+
Requires-Dist: microsoft-kiota-http>=1.0.0
|
|
21
|
+
Requires-Dist: microsoft-kiota-serialization-json>=1.0.0
|
|
22
|
+
Requires-Dist: microsoft-kiota-serialization-text>=1.0.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# mapleflow
|
|
26
|
+
|
|
27
|
+
Official Python SDK for the [MapleFlow](https://mapleflow.io) API platform. Auto-generated from OpenAPI spec using [openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install mapleflow
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from mapleflow import Client
|
|
39
|
+
|
|
40
|
+
client = Client(
|
|
41
|
+
base_url="https://mapleflow.io",
|
|
42
|
+
headers={"X-API-Key": "sk_live_..."},
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Regenerate SDK
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
openapi-python-client generate --path ../../src/openapi.json --config config.yml --meta none --overwrite
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
mapleflow/__init__.py,sha256=_dy7jrqf4EO3sN5CqgnmoEBoZBcLX6TcfJW5o0FeoOI,152
|
|
2
|
+
mapleflow/client.py,sha256=n8048d9JpuAPhb6Lr_dIWGhqHXEf5GXFYSjH0W__fHM,12518
|
|
3
|
+
mapleflow/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
|
|
4
|
+
mapleflow/types.py,sha256=0We4NPvhIYASRpQ3le41nmJeEAVm42-2VKdzlJ4Ogok,1343
|
|
5
|
+
mapleflow/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
|
|
6
|
+
mapleflow/api/ai/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
7
|
+
mapleflow/api/ai/post_ai_chat.py,sha256=LxfAnko30AbXiWfqouCnOTijHfROopsFrnSd1pNQV8o,5015
|
|
8
|
+
mapleflow/api/ai/post_ai_embeddings.py,sha256=I3F9FVsYqf6cIDLWmFbVzkpGsUbSfpt1gYu9lKc44JQ,5163
|
|
9
|
+
mapleflow/api/ai/post_ai_images.py,sha256=XtQYOtxGwsB_YQKqiRnzkFPk4IBgNEm53ppH3_DHpRE,5099
|
|
10
|
+
mapleflow/api/ai/post_ai_speech.py,sha256=Qb5r0FB8aUfTW5TJ52v7tVBbr0FC7bpTr4JKWMjVloQ,4947
|
|
11
|
+
mapleflow/api/ai/post_ai_transcribe.py,sha256=cXAaohv3VKYyvhFf07QggSmZsSx1kL8O86LfGbz1B_4,5051
|
|
12
|
+
mapleflow/api/images/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
13
|
+
mapleflow/api/images/post_images_bg_remove.py,sha256=pjoIsYlzcSkC-wUyqwmKs1o4yrz1ACokg-csjyMDqD8,7304
|
|
14
|
+
mapleflow/api/utility/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
15
|
+
mapleflow/api/utility/get_currency.py,sha256=FmgHKWEsf989d9hN2cocVlpVe63Vb7lVsBIFzzVXCNo,6931
|
|
16
|
+
mapleflow/api/utility/get_weather.py,sha256=8wTpdkWDwcSv4C0HpByX5-GbjkDDLpwLGoG7tGP9JK8,7982
|
|
17
|
+
mapleflow/api/utility/post_translate.py,sha256=ED8r9D5vsB6pcz-vaKmidIDwN8gfKf1ORyD0z7j9Gw0,5797
|
|
18
|
+
mapleflow/api/verify/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
19
|
+
mapleflow/api/verify/post_verify_face.py,sha256=Us-nVqwiHhYynwvgdhXzyBR0m-Ta4t52X8VoLQq48RY,5935
|
|
20
|
+
mapleflow/api/verify/post_verify_labels.py,sha256=dhpl_7MWjoyki4caIS9F9MKMd6MWRmzaE8h__9_-cSo,5969
|
|
21
|
+
mapleflow/models/__init__.py,sha256=nFcfj6fGKweL2OpwLx57dLi6pMijbMLCKTu17jxPnio,4579
|
|
22
|
+
mapleflow/models/get_currency_response_200.py,sha256=LnDWV2y1ymQzviI0DfxNiwJQ2ImegOsiDtbdir1Bk0k,2035
|
|
23
|
+
mapleflow/models/get_currency_response_400.py,sha256=hXkqbenZZvUvw5gjHHyF8eu1EylKUMywdjGp3iwkB-8,2035
|
|
24
|
+
mapleflow/models/get_currency_response_404.py,sha256=JgXJclBHMkiFDcnW2RDY5aZr_-nErBKiaw9X7bYmpqg,2035
|
|
25
|
+
mapleflow/models/get_currency_response_502.py,sha256=OFujCQTz7rjGh3aN8PO2QOidVQGy_gq6OhUH34C8gcM,2035
|
|
26
|
+
mapleflow/models/get_weather_response_200.py,sha256=6uYP_fktl4eHTLlUQagRidBawMQgnpdzyyrx7qpGT1o,2030
|
|
27
|
+
mapleflow/models/get_weather_response_400.py,sha256=Cj7fXpAWa72VWTHKj05LU63Qz-zMV6dDkQoZVpbbH84,2030
|
|
28
|
+
mapleflow/models/get_weather_response_404.py,sha256=Qw44CE5RaslvftCBDoCFT54Qs7PzQC-YK_xx0owqulc,2030
|
|
29
|
+
mapleflow/models/get_weather_response_502.py,sha256=tjNVAAmDgGxYdrztwphSV1qJP815BSJy3wv0xFsR-y4,2030
|
|
30
|
+
mapleflow/models/get_weather_units.py,sha256=mOcvRFHS84GIlx11PIewtwZnb4jiByRy4L1y5pF5kp8,168
|
|
31
|
+
mapleflow/models/post_ai_chat_body.py,sha256=qaEtzF2CNhPwus16zIGleMZE9I3nRUYz74INyJ-sShE,3216
|
|
32
|
+
mapleflow/models/post_ai_chat_body_messages_item.py,sha256=o3zkPSN88RXGz_Vty-fmpTjshjbm1eYZptTVG8cXed0,1767
|
|
33
|
+
mapleflow/models/post_ai_chat_body_model.py,sha256=CsNBHXcvY9BxxrRSQyOzsnbHv1EYnEe1FBZcDkxxY50,198
|
|
34
|
+
mapleflow/models/post_ai_chat_response_200.py,sha256=qfHvQSjEPc00L_SSCzS2aP155nFKUKdNM2McE8qsD8w,1810
|
|
35
|
+
mapleflow/models/post_ai_chat_response_400.py,sha256=e9GsI3UDDrRPfMKD1eQlxW0DAiSKoKYr4eZw4kLMJBI,1717
|
|
36
|
+
mapleflow/models/post_ai_embeddings_body.py,sha256=iJdyttLxD61p1mg9C0IfdC9TfhQcR0W_T9UKc4fdSiU,2903
|
|
37
|
+
mapleflow/models/post_ai_embeddings_body_model.py,sha256=FZmvitFo_ow-SZghE92I1Iroq5ZfD9B572TSHGX0DV0,162
|
|
38
|
+
mapleflow/models/post_ai_embeddings_response_200.py,sha256=D6nZCWbLoMLBCENeWC-opimRC4KQwZqAo1MPqp4etYc,1840
|
|
39
|
+
mapleflow/models/post_ai_embeddings_response_400.py,sha256=yYKU1T2j0MQKQJPLODg1LPeYkAlT1Uykre4_hqFPmgQ,1747
|
|
40
|
+
mapleflow/models/post_ai_images_body.py,sha256=c0QMt4MYtRdgASAhVos5GFxNUV3jA4jyhkEOAyXj4Tc,2628
|
|
41
|
+
mapleflow/models/post_ai_images_body_model.py,sha256=E5a1ihFebO8_saV9iEzLLVUotYD7QEbMVdcRuPS341g,186
|
|
42
|
+
mapleflow/models/post_ai_images_response_200.py,sha256=XSMJDIvteGzHhYrT0AqgcTEfdo480VOfVdCiiI2LPGA,1820
|
|
43
|
+
mapleflow/models/post_ai_images_response_400.py,sha256=G62DQiWrJJMHFxeZj8nM-jLzzMqJ7ejY0Y6TvHYgrtg,1727
|
|
44
|
+
mapleflow/models/post_ai_speech_body.py,sha256=y25n4oXLhUPbHd7LOPtPvSYYMqTp81LdGnOx4H6ap7w,2263
|
|
45
|
+
mapleflow/models/post_ai_speech_body_model.py,sha256=ud9QU4qA6qDGBwVQrswCPHxaSD_BPYbIkOJJ8gQUzpM,144
|
|
46
|
+
mapleflow/models/post_ai_speech_response_200.py,sha256=SnylbhjWhD0z1lD0l26UjxxBzrQkooj0dz0fuJ3oBI4,1820
|
|
47
|
+
mapleflow/models/post_ai_speech_response_400.py,sha256=vn67TKQ9-ofaAH2CSy6-nfksVh4nTB1aGRloMtxvD2g,1727
|
|
48
|
+
mapleflow/models/post_ai_transcribe_body.py,sha256=pRWi-eO4uwXCJMJNOBaSBz1C7iaoKQyVVz044HTFE5Y,2291
|
|
49
|
+
mapleflow/models/post_ai_transcribe_response_200.py,sha256=1JoIAQjQVIuCUN-huznc64fqS3YuGXgVPXsiWo01Qyk,1840
|
|
50
|
+
mapleflow/models/post_ai_transcribe_response_400.py,sha256=3DZy5LWlZk_jr6zGNFYzWf7ZuBceZ8X05Mt_s1jFVjQ,1747
|
|
51
|
+
mapleflow/models/post_images_bg_remove_files_body.py,sha256=3E_65ndtbRJLu1JJaRVHzMgafybChfhAN-KZqfcuJnQ,2675
|
|
52
|
+
mapleflow/models/post_images_bg_remove_json_body.py,sha256=MsDH6IpP_oR-JB1a5-2WrRtkHbLXpt_DgGeMmBoAbvY,1971
|
|
53
|
+
mapleflow/models/post_images_bg_remove_response_200.py,sha256=REZDyjCJAzj-yYgm_OD7wJOrU1QA3ry47j4mSeM3lNc,1853
|
|
54
|
+
mapleflow/models/post_images_bg_remove_response_400.py,sha256=lvGmgBJ-w979cjOSRrDfawxMuaD7T9u0ECutAlDNOiM,1760
|
|
55
|
+
mapleflow/models/post_images_bg_remove_response_502.py,sha256=I_kVmuzAHOMWryEqR0eirn_DSrDtYNnnTvQhxzCMxNE,1760
|
|
56
|
+
mapleflow/models/post_images_bg_remove_response_504.py,sha256=5fiKh7D4LSs718jS7acB-OxQn1Dvd2uAlMaUCv-i34M,1760
|
|
57
|
+
mapleflow/models/post_translate_body.py,sha256=Uwb6tZNIePTvUS3LOR7BQNQXsq2HHihTUXnMc2QPiUE,2316
|
|
58
|
+
mapleflow/models/post_translate_response_200.py,sha256=P3Dw2W_ZadTwgrqr_3s_bYG9I3b5WwdWShpTKv0t7BY,2045
|
|
59
|
+
mapleflow/models/post_translate_response_400.py,sha256=rU0YAj6zocHU7JiSuw7fZgzDFrWCZ-8K4CaqQtO0yDk,2045
|
|
60
|
+
mapleflow/models/post_translate_response_402.py,sha256=PXD6ShXLcMN0oDDfXtG6JX5157zeimp6Ts1OUWNCtLs,2045
|
|
61
|
+
mapleflow/models/post_verify_face_files_body.py,sha256=5VpcPIzEoaWQ8BogVWUka7-lX-vr4-NrCYSQH5DE2zg,2941
|
|
62
|
+
mapleflow/models/post_verify_face_json_body.py,sha256=COnuS182xnsPZo-MXrhZjoX5d2lYjfG9Z90NWN_Lghs,1800
|
|
63
|
+
mapleflow/models/post_verify_face_response_200.py,sha256=iSDYfPQr7ZYb1N1MMqiybJceQ4mk-g-Xwhpn0dHe154,1830
|
|
64
|
+
mapleflow/models/post_verify_face_response_400.py,sha256=qh9G-f12WrQhuZD4MswVuvfcvpjJotD3xbDYgDlBXl4,1737
|
|
65
|
+
mapleflow/models/post_verify_labels_files_body.py,sha256=hu3OOSK7HceJJR5vC80xMDqL896Z5CASLpBJTyVUOr4,2319
|
|
66
|
+
mapleflow/models/post_verify_labels_json_body.py,sha256=TPmsQ6faQSrzLGID50Ts1cwYmWS9K6AMIfapFWqmDfg,1597
|
|
67
|
+
mapleflow/models/post_verify_labels_response_200.py,sha256=USICIFTB2tInwuFa6jVIRZel9imGyrHhx7kKnP9hHqo,1840
|
|
68
|
+
mapleflow/models/post_verify_labels_response_400.py,sha256=BS3xF2M3tDq1GetypnbkCyVA0A7jQ0-n0ubwBRteTfs,1747
|
|
69
|
+
mapleflow-0.8.1.dist-info/METADATA,sha256=L_BZvECkMUXXTUtefPhd8L5cxik0q4UZMPPUF1dy4Dk,1579
|
|
70
|
+
mapleflow-0.8.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
71
|
+
mapleflow-0.8.1.dist-info/RECORD,,
|