qubitclient 0.0.0.1__py3-none-any.whl → 0.0.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.
Potentially problematic release.
This version of qubitclient might be problematic. Click here for more details.
- qubitclient/QubitSeg.py +3 -3
- qubitclient/__init__.py +2 -0
- qubitclient/curve/curve_type.py +15 -0
- qubitclient/scope/scope.py +51 -0
- qubitclient/scope/scope_api/__init__.py +8 -0
- qubitclient/scope/scope_api/api/__init__.py +1 -0
- qubitclient/scope/scope_api/api/defined_tasks/__init__.py +1 -0
- qubitclient/scope/scope_api/api/defined_tasks/get_task_result_api_v1_tasks_demo_pk_get.py +155 -0
- qubitclient/scope/scope_api/api/defined_tasks/get_task_result_api_v1_tasks_scope_pk_get.py +155 -0
- qubitclient/scope/scope_api/api/defined_tasks/optpipulse_api_v1_tasks_scope_optpipulse_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/rabi_api_v1_tasks_scope_rabi_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/rabicos_api_v1_tasks_scope_rabicospeak_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/s21peak_api_v1_tasks_scope_s21peak_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/s21vflux_api_v1_tasks_scope_s21vflux_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/singleshot_api_v1_tasks_scope_singleshot_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/spectrum_api_v1_tasks_scope_spectrum_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/t1fit_api_v1_tasks_scope_t1fit_post.py +218 -0
- qubitclient/scope/scope_api/api/defined_tasks/t1fit_api_v1_tasks_scope_t2fit_post.py +218 -0
- qubitclient/scope/scope_api/client.py +268 -0
- qubitclient/scope/scope_api/errors.py +16 -0
- qubitclient/scope/scope_api/models/__init__.py +27 -0
- qubitclient/scope/scope_api/models/body_optpipulse_api_v1_tasks_scope_optpipulse_post.py +83 -0
- qubitclient/scope/scope_api/models/body_rabi_api_v1_tasks_scope_rabi_post.py +83 -0
- qubitclient/scope/scope_api/models/body_rabicos_api_v1_tasks_scope_rabicospeak_post.py +83 -0
- qubitclient/scope/scope_api/models/body_s21_peak_api_v1_tasks_scope_s21_peak_post.py +83 -0
- qubitclient/scope/scope_api/models/body_s21_vflux_api_v1_tasks_scope_s21_vflux_post.py +83 -0
- qubitclient/scope/scope_api/models/body_singleshot_api_v1_tasks_scope_singleshot_post.py +83 -0
- qubitclient/scope/scope_api/models/body_spectrum_api_v1_tasks_scope_spectrum_post.py +83 -0
- qubitclient/scope/scope_api/models/body_t1_fit_api_v1_tasks_scope_t1_fit_post.py +83 -0
- qubitclient/scope/scope_api/models/body_t1_fit_api_v1_tasks_scope_t2_fit_post.py +83 -0
- qubitclient/scope/scope_api/models/http_validation_error.py +75 -0
- qubitclient/scope/scope_api/models/validation_error.py +88 -0
- qubitclient/scope/scope_api/py.typed +1 -0
- qubitclient/scope/scope_api/types.py +54 -0
- qubitclient/scope/task.py +140 -0
- qubitclient/scope/utils/__init__.py +0 -0
- qubitclient/scope/utils/data_parser.py +20 -0
- qubitclient/utils/data_convert.py +112 -0
- qubitclient/utils/data_parser.py +41 -0
- qubitclient/utils/request_tool.py +41 -0
- qubitclient/utils/result_parser.py +55 -0
- qubitclient-0.0.1.dist-info/METADATA +106 -0
- qubitclient-0.0.1.dist-info/RECORD +47 -0
- qubitclient-0.0.0.1.dist-info/METADATA +0 -35
- qubitclient-0.0.0.1.dist-info/RECORD +0 -8
- {qubitclient-0.0.0.1.dist-info → qubitclient-0.0.1.dist-info}/WHEEL +0 -0
- {qubitclient-0.0.0.1.dist-info → qubitclient-0.0.1.dist-info}/licenses/LICENSE +0 -0
- {qubitclient-0.0.0.1.dist-info → qubitclient-0.0.1.dist-info}/top_level.txt +0 -0
- {qubitclient-0.0.0.1.dist-info → qubitclient-0.0.1.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Contains shared errors types that can be raised from API functions"""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class UnexpectedStatus(Exception):
|
|
5
|
+
"""Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
|
|
6
|
+
|
|
7
|
+
def __init__(self, status_code: int, content: bytes):
|
|
8
|
+
self.status_code = status_code
|
|
9
|
+
self.content = content
|
|
10
|
+
|
|
11
|
+
super().__init__(
|
|
12
|
+
f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__all__ = ["UnexpectedStatus"]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Contains all the data models used in inputs/outputs"""
|
|
2
|
+
|
|
3
|
+
from .body_optpipulse_api_v1_tasks_scope_optpipulse_post import BodyOptpipulseApiV1TasksScopeOptpipulsePost
|
|
4
|
+
from .body_rabi_api_v1_tasks_scope_rabi_post import BodyRabiApiV1TasksScopeRabiPost
|
|
5
|
+
from .body_rabicos_api_v1_tasks_scope_rabicospeak_post import BodyRabicosApiV1TasksScopeRabicospeakPost
|
|
6
|
+
from .body_s21_peak_api_v1_tasks_scope_s21_peak_post import BodyS21PeakApiV1TasksScopeS21PeakPost
|
|
7
|
+
from .body_s21_vflux_api_v1_tasks_scope_s21_vflux_post import BodyS21VfluxApiV1TasksScopeS21VfluxPost
|
|
8
|
+
from .body_singleshot_api_v1_tasks_scope_singleshot_post import BodySingleshotApiV1TasksScopeSingleshotPost
|
|
9
|
+
from .body_spectrum_api_v1_tasks_scope_spectrum_post import BodySpectrumApiV1TasksScopeSpectrumPost
|
|
10
|
+
from .body_t1_fit_api_v1_tasks_scope_t1_fit_post import BodyT1FitApiV1TasksScopeT1FitPost
|
|
11
|
+
from .body_t1_fit_api_v1_tasks_scope_t2_fit_post import BodyT1FitApiV1TasksScopeT2FitPost
|
|
12
|
+
from .http_validation_error import HTTPValidationError
|
|
13
|
+
from .validation_error import ValidationError
|
|
14
|
+
|
|
15
|
+
__all__ = (
|
|
16
|
+
"BodyOptpipulseApiV1TasksScopeOptpipulsePost",
|
|
17
|
+
"BodyRabiApiV1TasksScopeRabiPost",
|
|
18
|
+
"BodyRabicosApiV1TasksScopeRabicospeakPost",
|
|
19
|
+
"BodyS21PeakApiV1TasksScopeS21PeakPost",
|
|
20
|
+
"BodyS21VfluxApiV1TasksScopeS21VfluxPost",
|
|
21
|
+
"BodySingleshotApiV1TasksScopeSingleshotPost",
|
|
22
|
+
"BodySpectrumApiV1TasksScopeSpectrumPost",
|
|
23
|
+
"BodyT1FitApiV1TasksScopeT1FitPost",
|
|
24
|
+
"BodyT1FitApiV1TasksScopeT2FitPost",
|
|
25
|
+
"HTTPValidationError",
|
|
26
|
+
"ValidationError",
|
|
27
|
+
)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodyOptpipulseApiV1TasksScopeOptpipulsePost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyOptpipulseApiV1TasksScopeOptpipulsePost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_optpipulse_api_v1_tasks_scope_optpipulse_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_optpipulse_api_v1_tasks_scope_optpipulse_post.additional_properties = d
|
|
67
|
+
return body_optpipulse_api_v1_tasks_scope_optpipulse_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodyRabiApiV1TasksScopeRabiPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyRabiApiV1TasksScopeRabiPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_rabi_api_v1_tasks_scope_rabi_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_rabi_api_v1_tasks_scope_rabi_post.additional_properties = d
|
|
67
|
+
return body_rabi_api_v1_tasks_scope_rabi_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodyRabicosApiV1TasksScopeRabicospeakPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyRabicosApiV1TasksScopeRabicospeakPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_rabicos_api_v1_tasks_scope_rabicospeak_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_rabicos_api_v1_tasks_scope_rabicospeak_post.additional_properties = d
|
|
67
|
+
return body_rabicos_api_v1_tasks_scope_rabicospeak_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodyS21PeakApiV1TasksScopeS21PeakPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyS21PeakApiV1TasksScopeS21PeakPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_s21_peak_api_v1_tasks_scope_s21_peak_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_s21_peak_api_v1_tasks_scope_s21_peak_post.additional_properties = d
|
|
67
|
+
return body_s21_peak_api_v1_tasks_scope_s21_peak_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodyS21VfluxApiV1TasksScopeS21VfluxPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyS21VfluxApiV1TasksScopeS21VfluxPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_s21_vflux_api_v1_tasks_scope_s21_vflux_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_s21_vflux_api_v1_tasks_scope_s21_vflux_post.additional_properties = d
|
|
67
|
+
return body_s21_vflux_api_v1_tasks_scope_s21_vflux_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodySingleshotApiV1TasksScopeSingleshotPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodySingleshotApiV1TasksScopeSingleshotPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_singleshot_api_v1_tasks_scope_singleshot_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_singleshot_api_v1_tasks_scope_singleshot_post.additional_properties = d
|
|
67
|
+
return body_singleshot_api_v1_tasks_scope_singleshot_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import File
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BodySpectrumApiV1TasksScopeSpectrumPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodySpectrumApiV1TasksScopeSpectrumPost:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
files (list[File]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: list[File]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
files = []
|
|
26
|
+
for files_item_data in self.files:
|
|
27
|
+
files_item = files_item_data.to_tuple()
|
|
28
|
+
|
|
29
|
+
files.append(files_item)
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"files": files,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
for files_item_element in self.files:
|
|
45
|
+
files.append(("files", files_item_element.to_tuple()))
|
|
46
|
+
|
|
47
|
+
for prop_name, prop in self.additional_properties.items():
|
|
48
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
49
|
+
|
|
50
|
+
return files
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
files = []
|
|
56
|
+
_files = d.pop("files")
|
|
57
|
+
for files_item_data in _files:
|
|
58
|
+
files_item = File(payload=BytesIO(files_item_data))
|
|
59
|
+
|
|
60
|
+
files.append(files_item)
|
|
61
|
+
|
|
62
|
+
body_spectrum_api_v1_tasks_scope_spectrum_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_spectrum_api_v1_tasks_scope_spectrum_post.additional_properties = d
|
|
67
|
+
return body_spectrum_api_v1_tasks_scope_spectrum_post
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|