qubitclient 0.1.4__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.
- qubitclient/__init__.py +5 -0
- qubitclient/draw/__init__.py +0 -0
- qubitclient/draw/optpipulsepltplotter.py +75 -0
- qubitclient/draw/optpipulseplyplotter.py +114 -0
- qubitclient/draw/pltmanager.py +50 -0
- qubitclient/draw/pltplotter.py +20 -0
- qubitclient/draw/plymanager.py +57 -0
- qubitclient/draw/plyplotter.py +21 -0
- qubitclient/draw/powershiftpltplotter.py +108 -0
- qubitclient/draw/powershiftplyplotter.py +194 -0
- qubitclient/draw/rabicospltplotter.py +74 -0
- qubitclient/draw/rabicosplyplotter.py +90 -0
- qubitclient/draw/rabipltplotter.py +66 -0
- qubitclient/draw/rabiplyplotter.py +86 -0
- qubitclient/draw/s21peakpltplotter.py +67 -0
- qubitclient/draw/s21peakplyplotter.py +124 -0
- qubitclient/draw/s21vfluxpltplotter.py +84 -0
- qubitclient/draw/s21vfluxplyplotter.py +163 -0
- qubitclient/draw/singleshotpltplotter.py +149 -0
- qubitclient/draw/singleshotplyplotter.py +324 -0
- qubitclient/draw/spectrum2dpltplotter.py +107 -0
- qubitclient/draw/spectrum2dplyplotter.py +244 -0
- qubitclient/draw/spectrum2dscopepltplotter.py +72 -0
- qubitclient/draw/spectrum2dscopeplyplotter.py +195 -0
- qubitclient/draw/spectrumpltplotter.py +106 -0
- qubitclient/draw/spectrumplyplotter.py +133 -0
- qubitclient/draw/t1fitpltplotter.py +76 -0
- qubitclient/draw/t1fitplyplotter.py +109 -0
- qubitclient/draw/t2fitpltplotter.py +70 -0
- qubitclient/draw/t2fitplyplotter.py +111 -0
- qubitclient/nnscope/nnscope.py +51 -0
- qubitclient/nnscope/nnscope_api/curve/__init__.py +0 -0
- qubitclient/nnscope/nnscope_api/curve/curve_type.py +15 -0
- qubitclient/nnscope/task.py +170 -0
- qubitclient/nnscope/utils/data_convert.py +114 -0
- qubitclient/nnscope/utils/data_parser.py +41 -0
- qubitclient/nnscope/utils/request_tool.py +41 -0
- qubitclient/nnscope/utils/result_parser.py +55 -0
- qubitclient/scope/scope.py +50 -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/powershift_api_v1_tasks_scope_powershift_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/spectrum2d_api_v1_tasks_scope_spectrum2d_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 +31 -0
- qubitclient/scope/scope_api/models/body_optpipulse_api_v1_tasks_scope_optpipulse_post.py +83 -0
- qubitclient/scope/scope_api/models/body_powershift_api_v1_tasks_scope_powershift_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_2d_api_v1_tasks_scope_spectrum_2d_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/types.py +54 -0
- qubitclient/scope/task.py +163 -0
- qubitclient/scope/utils/__init__.py +0 -0
- qubitclient/scope/utils/data_parser.py +20 -0
- qubitclient-0.1.4.dist-info/METADATA +173 -0
- qubitclient-0.1.4.dist-info/RECORD +81 -0
- qubitclient-0.1.4.dist-info/WHEEL +5 -0
- qubitclient-0.1.4.dist-info/licenses/LICENSE +674 -0
- qubitclient-0.1.4.dist-info/top_level.txt +1 -0
- qubitclient-0.1.4.dist-info/zip-safe +1 -0
|
@@ -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="BodySpectrum2DApiV1TasksScopeSpectrum2DPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodySpectrum2DApiV1TasksScopeSpectrum2DPost:
|
|
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_2d_api_v1_tasks_scope_spectrum_2d_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_spectrum_2d_api_v1_tasks_scope_spectrum_2d_post.additional_properties = d
|
|
67
|
+
return body_spectrum_2d_api_v1_tasks_scope_spectrum_2d_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
|
|
@@ -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="BodyT1FitApiV1TasksScopeT1FitPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyT1FitApiV1TasksScopeT1FitPost:
|
|
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_t1_fit_api_v1_tasks_scope_t1_fit_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_t1_fit_api_v1_tasks_scope_t1_fit_post.additional_properties = d
|
|
67
|
+
return body_t1_fit_api_v1_tasks_scope_t1_fit_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="BodyT1FitApiV1TasksScopeT2FitPost")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BodyT1FitApiV1TasksScopeT2FitPost:
|
|
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_t1_fit_api_v1_tasks_scope_t2_fit_post = cls(
|
|
63
|
+
files=files,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
body_t1_fit_api_v1_tasks_scope_t2_fit_post.additional_properties = d
|
|
67
|
+
return body_t1_fit_api_v1_tasks_scope_t2_fit_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,75 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.validation_error import ValidationError
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="HTTPValidationError")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class HTTPValidationError:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
detail (Union[Unset, list['ValidationError']]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
detail: Union[Unset, list["ValidationError"]] = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
detail: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
28
|
+
if not isinstance(self.detail, Unset):
|
|
29
|
+
detail = []
|
|
30
|
+
for detail_item_data in self.detail:
|
|
31
|
+
detail_item = detail_item_data.to_dict()
|
|
32
|
+
detail.append(detail_item)
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update({})
|
|
37
|
+
if detail is not UNSET:
|
|
38
|
+
field_dict["detail"] = detail
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
from ..models.validation_error import ValidationError
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
detail = []
|
|
48
|
+
_detail = d.pop("detail", UNSET)
|
|
49
|
+
for detail_item_data in _detail or []:
|
|
50
|
+
detail_item = ValidationError.from_dict(detail_item_data)
|
|
51
|
+
|
|
52
|
+
detail.append(detail_item)
|
|
53
|
+
|
|
54
|
+
http_validation_error = cls(
|
|
55
|
+
detail=detail,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
http_validation_error.additional_properties = d
|
|
59
|
+
return http_validation_error
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|