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="PostAiSpeechResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostAiSpeechResponse200:
|
|
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_ai_speech_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_ai_speech_response_200.additional_properties = d
|
|
56
|
+
return post_ai_speech_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="PostAiSpeechResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostAiSpeechResponse400:
|
|
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_ai_speech_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_ai_speech_response_400.additional_properties = d
|
|
53
|
+
return post_ai_speech_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="PostAiTranscribeBody")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PostAiTranscribeBody:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
audio (File | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
audio: 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
|
+
audio: FileTypes | Unset = UNSET
|
|
28
|
+
if not isinstance(self.audio, Unset):
|
|
29
|
+
audio = self.audio.to_tuple()
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update({})
|
|
34
|
+
if audio is not UNSET:
|
|
35
|
+
field_dict["audio"] = audio
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
40
|
+
files: types.RequestFiles = []
|
|
41
|
+
|
|
42
|
+
if not isinstance(self.audio, Unset):
|
|
43
|
+
files.append(("audio", self.audio.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
|
+
_audio = d.pop("audio", UNSET)
|
|
54
|
+
audio: File | Unset
|
|
55
|
+
if isinstance(_audio, Unset):
|
|
56
|
+
audio = UNSET
|
|
57
|
+
else:
|
|
58
|
+
audio = File(payload=BytesIO(_audio))
|
|
59
|
+
|
|
60
|
+
post_ai_transcribe_body = cls(
|
|
61
|
+
audio=audio,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
post_ai_transcribe_body.additional_properties = d
|
|
65
|
+
return post_ai_transcribe_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,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="PostAiTranscribeResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostAiTranscribeResponse200:
|
|
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_ai_transcribe_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_ai_transcribe_response_200.additional_properties = d
|
|
56
|
+
return post_ai_transcribe_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="PostAiTranscribeResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostAiTranscribeResponse400:
|
|
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_ai_transcribe_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_ai_transcribe_response_400.additional_properties = d
|
|
53
|
+
return post_ai_transcribe_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,93 @@
|
|
|
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="PostImagesBgRemoveFilesBody")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PostImagesBgRemoveFilesBody:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
image (File | Unset):
|
|
21
|
+
url (str | Unset): URL of the image
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
image: File | Unset = UNSET
|
|
25
|
+
url: str | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
image: FileTypes | Unset = UNSET
|
|
30
|
+
if not isinstance(self.image, Unset):
|
|
31
|
+
image = self.image.to_tuple()
|
|
32
|
+
|
|
33
|
+
url = self.url
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update({})
|
|
38
|
+
if image is not UNSET:
|
|
39
|
+
field_dict["image"] = image
|
|
40
|
+
if url is not UNSET:
|
|
41
|
+
field_dict["url"] = url
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
46
|
+
files: types.RequestFiles = []
|
|
47
|
+
|
|
48
|
+
if not isinstance(self.image, Unset):
|
|
49
|
+
files.append(("image", self.image.to_tuple()))
|
|
50
|
+
|
|
51
|
+
if not isinstance(self.url, Unset):
|
|
52
|
+
files.append(("url", (None, str(self.url).encode(), "text/plain")))
|
|
53
|
+
|
|
54
|
+
for prop_name, prop in self.additional_properties.items():
|
|
55
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
56
|
+
|
|
57
|
+
return files
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
_image = d.pop("image", UNSET)
|
|
63
|
+
image: File | Unset
|
|
64
|
+
if isinstance(_image, Unset):
|
|
65
|
+
image = UNSET
|
|
66
|
+
else:
|
|
67
|
+
image = File(payload=BytesIO(_image))
|
|
68
|
+
|
|
69
|
+
url = d.pop("url", UNSET)
|
|
70
|
+
|
|
71
|
+
post_images_bg_remove_files_body = cls(
|
|
72
|
+
image=image,
|
|
73
|
+
url=url,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
post_images_bg_remove_files_body.additional_properties = d
|
|
77
|
+
return post_images_bg_remove_files_body
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def additional_keys(self) -> list[str]:
|
|
81
|
+
return list(self.additional_properties.keys())
|
|
82
|
+
|
|
83
|
+
def __getitem__(self, key: str) -> Any:
|
|
84
|
+
return self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
87
|
+
self.additional_properties[key] = value
|
|
88
|
+
|
|
89
|
+
def __delitem__(self, key: str) -> None:
|
|
90
|
+
del self.additional_properties[key]
|
|
91
|
+
|
|
92
|
+
def __contains__(self, key: str) -> bool:
|
|
93
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,70 @@
|
|
|
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="PostImagesBgRemoveJsonBody")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostImagesBgRemoveJsonBody:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
image (str | Unset): Base64-encoded image (with or without data URI prefix) Example: <base64>.
|
|
19
|
+
url (str | Unset): URL of the image Example: https://example.com/photo.jpg.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
image: str | Unset = UNSET
|
|
23
|
+
url: str | 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 = self.image
|
|
28
|
+
|
|
29
|
+
url = self.url
|
|
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
|
+
if url is not UNSET:
|
|
37
|
+
field_dict["url"] = url
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
43
|
+
d = dict(src_dict)
|
|
44
|
+
image = d.pop("image", UNSET)
|
|
45
|
+
|
|
46
|
+
url = d.pop("url", UNSET)
|
|
47
|
+
|
|
48
|
+
post_images_bg_remove_json_body = cls(
|
|
49
|
+
image=image,
|
|
50
|
+
url=url,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
post_images_bg_remove_json_body.additional_properties = d
|
|
54
|
+
return post_images_bg_remove_json_body
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> list[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
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="PostImagesBgRemoveResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostImagesBgRemoveResponse200:
|
|
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_images_bg_remove_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_images_bg_remove_response_200.additional_properties = d
|
|
56
|
+
return post_images_bg_remove_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="PostImagesBgRemoveResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostImagesBgRemoveResponse400:
|
|
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_images_bg_remove_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_images_bg_remove_response_400.additional_properties = d
|
|
53
|
+
return post_images_bg_remove_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
|