minikai 0.1.1__py3-none-any.whl → 0.1.2__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.
- minikai/models/__init__.py +2 -2
- minikai/models/record.py +14 -11
- minikai/models/record_tag.py +132 -0
- {minikai-0.1.1.dist-info → minikai-0.1.2.dist-info}/METADATA +1 -1
- {minikai-0.1.1.dist-info → minikai-0.1.2.dist-info}/RECORD +6 -6
- minikai/models/record_tags.py +0 -44
- {minikai-0.1.1.dist-info → minikai-0.1.2.dist-info}/WHEEL +0 -0
minikai/models/__init__.py
CHANGED
|
@@ -31,7 +31,7 @@ from .record_dto import RecordDto
|
|
|
31
31
|
from .record_dto_tags import RecordDtoTags
|
|
32
32
|
from .record_relation import RecordRelation
|
|
33
33
|
from .record_relation_dto import RecordRelationDto
|
|
34
|
-
from .
|
|
34
|
+
from .record_tag import RecordTag
|
|
35
35
|
from .slim_mini_dto import SlimMiniDto
|
|
36
36
|
from .tool_dto import ToolDto
|
|
37
37
|
from .update_attachments_body import UpdateAttachmentsBody
|
|
@@ -76,7 +76,7 @@ __all__ = (
|
|
|
76
76
|
"RecordDtoTags",
|
|
77
77
|
"RecordRelation",
|
|
78
78
|
"RecordRelationDto",
|
|
79
|
-
"
|
|
79
|
+
"RecordTag",
|
|
80
80
|
"SlimMiniDto",
|
|
81
81
|
"ToolDto",
|
|
82
82
|
"UpdateAttachmentsBody",
|
minikai/models/record.py
CHANGED
|
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
|
|
|
12
12
|
from ..models.record_attachment import RecordAttachment
|
|
13
13
|
from ..models.record_authorization import RecordAuthorization
|
|
14
14
|
from ..models.record_relation import RecordRelation
|
|
15
|
-
from ..models.
|
|
15
|
+
from ..models.record_tag import RecordTag
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
T = TypeVar("T", bound="Record")
|
|
@@ -40,7 +40,7 @@ class Record:
|
|
|
40
40
|
relations (Union[Unset, list['RecordRelation']]):
|
|
41
41
|
external_uri (Union[None, Unset, str]):
|
|
42
42
|
labels (Union[Unset, list[str]]):
|
|
43
|
-
tags (Union[Unset,
|
|
43
|
+
tags (Union[Unset, list['RecordTag']]):
|
|
44
44
|
field_ts (Union[Unset, int]):
|
|
45
45
|
"""
|
|
46
46
|
|
|
@@ -62,7 +62,7 @@ class Record:
|
|
|
62
62
|
relations: Union[Unset, list["RecordRelation"]] = UNSET
|
|
63
63
|
external_uri: Union[None, Unset, str] = UNSET
|
|
64
64
|
labels: Union[Unset, list[str]] = UNSET
|
|
65
|
-
tags: Union[Unset, "
|
|
65
|
+
tags: Union[Unset, list["RecordTag"]] = UNSET
|
|
66
66
|
field_ts: Union[Unset, int] = UNSET
|
|
67
67
|
|
|
68
68
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -154,9 +154,12 @@ class Record:
|
|
|
154
154
|
if not isinstance(self.labels, Unset):
|
|
155
155
|
labels = self.labels
|
|
156
156
|
|
|
157
|
-
tags: Union[Unset, dict[str, Any]] = UNSET
|
|
157
|
+
tags: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
158
158
|
if not isinstance(self.tags, Unset):
|
|
159
|
-
tags =
|
|
159
|
+
tags = []
|
|
160
|
+
for tags_item_data in self.tags:
|
|
161
|
+
tags_item = tags_item_data.to_dict()
|
|
162
|
+
tags.append(tags_item)
|
|
160
163
|
|
|
161
164
|
field_ts = self.field_ts
|
|
162
165
|
|
|
@@ -212,7 +215,7 @@ class Record:
|
|
|
212
215
|
from ..models.record_attachment import RecordAttachment
|
|
213
216
|
from ..models.record_authorization import RecordAuthorization
|
|
214
217
|
from ..models.record_relation import RecordRelation
|
|
215
|
-
from ..models.
|
|
218
|
+
from ..models.record_tag import RecordTag
|
|
216
219
|
|
|
217
220
|
d = dict(src_dict)
|
|
218
221
|
id = d.pop("id", UNSET)
|
|
@@ -344,12 +347,12 @@ class Record:
|
|
|
344
347
|
|
|
345
348
|
labels = cast(list[str], d.pop("labels", UNSET))
|
|
346
349
|
|
|
350
|
+
tags = []
|
|
347
351
|
_tags = d.pop("tags", UNSET)
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
tags = RecordTags.from_dict(_tags)
|
|
352
|
+
for tags_item_data in _tags or []:
|
|
353
|
+
tags_item = RecordTag.from_dict(tags_item_data)
|
|
354
|
+
|
|
355
|
+
tags.append(tags_item)
|
|
353
356
|
|
|
354
357
|
field_ts = d.pop("_ts", UNSET)
|
|
355
358
|
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from dateutil.parser import isoparse
|
|
7
|
+
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="RecordTag")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class RecordTag:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
key (Union[Unset, str]):
|
|
18
|
+
value_string (Union[None, Unset, str]):
|
|
19
|
+
value_number (Union[None, Unset, float]):
|
|
20
|
+
value_boolean (Union[None, Unset, bool]):
|
|
21
|
+
value_date (Union[None, Unset, datetime.datetime]):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
key: Union[Unset, str] = UNSET
|
|
25
|
+
value_string: Union[None, Unset, str] = UNSET
|
|
26
|
+
value_number: Union[None, Unset, float] = UNSET
|
|
27
|
+
value_boolean: Union[None, Unset, bool] = UNSET
|
|
28
|
+
value_date: Union[None, Unset, datetime.datetime] = UNSET
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
key = self.key
|
|
32
|
+
|
|
33
|
+
value_string: Union[None, Unset, str]
|
|
34
|
+
if isinstance(self.value_string, Unset):
|
|
35
|
+
value_string = UNSET
|
|
36
|
+
else:
|
|
37
|
+
value_string = self.value_string
|
|
38
|
+
|
|
39
|
+
value_number: Union[None, Unset, float]
|
|
40
|
+
if isinstance(self.value_number, Unset):
|
|
41
|
+
value_number = UNSET
|
|
42
|
+
else:
|
|
43
|
+
value_number = self.value_number
|
|
44
|
+
|
|
45
|
+
value_boolean: Union[None, Unset, bool]
|
|
46
|
+
if isinstance(self.value_boolean, Unset):
|
|
47
|
+
value_boolean = UNSET
|
|
48
|
+
else:
|
|
49
|
+
value_boolean = self.value_boolean
|
|
50
|
+
|
|
51
|
+
value_date: Union[None, Unset, str]
|
|
52
|
+
if isinstance(self.value_date, Unset):
|
|
53
|
+
value_date = UNSET
|
|
54
|
+
elif isinstance(self.value_date, datetime.datetime):
|
|
55
|
+
value_date = self.value_date.isoformat()
|
|
56
|
+
else:
|
|
57
|
+
value_date = self.value_date
|
|
58
|
+
|
|
59
|
+
field_dict: dict[str, Any] = {}
|
|
60
|
+
|
|
61
|
+
field_dict.update({})
|
|
62
|
+
if key is not UNSET:
|
|
63
|
+
field_dict["key"] = key
|
|
64
|
+
if value_string is not UNSET:
|
|
65
|
+
field_dict["valueString"] = value_string
|
|
66
|
+
if value_number is not UNSET:
|
|
67
|
+
field_dict["valueNumber"] = value_number
|
|
68
|
+
if value_boolean is not UNSET:
|
|
69
|
+
field_dict["valueBoolean"] = value_boolean
|
|
70
|
+
if value_date is not UNSET:
|
|
71
|
+
field_dict["valueDate"] = value_date
|
|
72
|
+
|
|
73
|
+
return field_dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
key = d.pop("key", UNSET)
|
|
79
|
+
|
|
80
|
+
def _parse_value_string(data: object) -> Union[None, Unset, str]:
|
|
81
|
+
if data is None:
|
|
82
|
+
return data
|
|
83
|
+
if isinstance(data, Unset):
|
|
84
|
+
return data
|
|
85
|
+
return cast(Union[None, Unset, str], data)
|
|
86
|
+
|
|
87
|
+
value_string = _parse_value_string(d.pop("valueString", UNSET))
|
|
88
|
+
|
|
89
|
+
def _parse_value_number(data: object) -> Union[None, Unset, float]:
|
|
90
|
+
if data is None:
|
|
91
|
+
return data
|
|
92
|
+
if isinstance(data, Unset):
|
|
93
|
+
return data
|
|
94
|
+
return cast(Union[None, Unset, float], data)
|
|
95
|
+
|
|
96
|
+
value_number = _parse_value_number(d.pop("valueNumber", UNSET))
|
|
97
|
+
|
|
98
|
+
def _parse_value_boolean(data: object) -> Union[None, Unset, bool]:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
if isinstance(data, Unset):
|
|
102
|
+
return data
|
|
103
|
+
return cast(Union[None, Unset, bool], data)
|
|
104
|
+
|
|
105
|
+
value_boolean = _parse_value_boolean(d.pop("valueBoolean", UNSET))
|
|
106
|
+
|
|
107
|
+
def _parse_value_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
108
|
+
if data is None:
|
|
109
|
+
return data
|
|
110
|
+
if isinstance(data, Unset):
|
|
111
|
+
return data
|
|
112
|
+
try:
|
|
113
|
+
if not isinstance(data, str):
|
|
114
|
+
raise TypeError()
|
|
115
|
+
value_date_type_0 = isoparse(data)
|
|
116
|
+
|
|
117
|
+
return value_date_type_0
|
|
118
|
+
except: # noqa: E722
|
|
119
|
+
pass
|
|
120
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
121
|
+
|
|
122
|
+
value_date = _parse_value_date(d.pop("valueDate", UNSET))
|
|
123
|
+
|
|
124
|
+
record_tag = cls(
|
|
125
|
+
key=key,
|
|
126
|
+
value_string=value_string,
|
|
127
|
+
value_number=value_number,
|
|
128
|
+
value_boolean=value_boolean,
|
|
129
|
+
value_date=value_date,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
return record_tag
|
|
@@ -37,7 +37,7 @@ minikai/api/users/get_users.py,sha256=ExChMQsAkGZtNwqcbXB_qfED2Jsd5jvjzK3I_ePvP5
|
|
|
37
37
|
minikai/api/users/post_api_users_minis.py,sha256=4eVgu3YUkQgccnLZF6gbF2Ww84mw69Fl360SJWVRdz4,4357
|
|
38
38
|
minikai/client.py,sha256=o_mdLqyBCQstu5tS1WZFwqIEbGwkvWQ7eQjuCJw_5VY,12419
|
|
39
39
|
minikai/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
|
|
40
|
-
minikai/models/__init__.py,sha256=
|
|
40
|
+
minikai/models/__init__.py,sha256=o2EdMjFnrY88fRY-kO70e4cxieCMayc98-RnSjvnQDU,3322
|
|
41
41
|
minikai/models/add_attachments_body.py,sha256=hA63P0s93SXxF4KHScefznrk6wI3sYXuU1x8MpiV4H8,3393
|
|
42
42
|
minikai/models/create_group_command.py,sha256=WfXciuwR85Y0kqh5F0iROYlcwPOgBHnz4sq0UHtZLho,2933
|
|
43
43
|
minikai/models/create_mini_command.py,sha256=fKmwk0Wp3YdP1BTLi1si4AnIdF-S7_NA9oEir3tylMA,3813
|
|
@@ -58,7 +58,7 @@ minikai/models/mini_template_dto.py,sha256=QCXA-rluSN48Z9MzMTtBhi-VjWCZ89aK9SMdE
|
|
|
58
58
|
minikai/models/paginated_list_of_record_dto.py,sha256=4N6Jm-ew-xtV-2keycAH9kiNbewvJcm-CHemlNCkeOs,3023
|
|
59
59
|
minikai/models/patch_mini_command.py,sha256=vXLwox3R-dH7XhUV4CTDEtcpjub0RH95OaaDydOROmI,2157
|
|
60
60
|
minikai/models/problem_details.py,sha256=xHnEtHdx3CYpY4XlcX0MmhcYuMln4d7UhLxyEW7QgDA,4570
|
|
61
|
-
minikai/models/record.py,sha256=
|
|
61
|
+
minikai/models/record.py,sha256=fskUBkg_S6OxSMYYrAct4UlOiL17-xU1I3bKfDaskTk,13133
|
|
62
62
|
minikai/models/record_attachment.py,sha256=wjEXL0C4cRbz_taFpaQG3kk7sd9A4fmySD7A1GhVD-A,7764
|
|
63
63
|
minikai/models/record_attachment_dto.py,sha256=JrYpftW8wSUUQTK4PtVtRal-UsuiBsAHYf6zk-k6vvc,7817
|
|
64
64
|
minikai/models/record_attachment_dto_metadata_type_0.py,sha256=kYRTlJ3C5KUymVETCGwfiPKXKsXMRRlFc7B-M1AuwGA,1317
|
|
@@ -69,7 +69,7 @@ minikai/models/record_dto.py,sha256=8k0Gt0rPpkmcvV7aX-2tROTgHauqZG_izdh5CzTNt68,
|
|
|
69
69
|
minikai/models/record_dto_tags.py,sha256=4GYfuFYsX0oElH6z5S75ckbzC2kncRhbfvSve-vzgfc,1213
|
|
70
70
|
minikai/models/record_relation.py,sha256=ALuCYYhwxeRfUDWXiC9yz9YLFbJoHoUjrMemlQpofpg,2192
|
|
71
71
|
minikai/models/record_relation_dto.py,sha256=7YPZY01nB62zhfBnrBqi5U-exFm2-65zkpwxAF2YuEU,2206
|
|
72
|
-
minikai/models/
|
|
72
|
+
minikai/models/record_tag.py,sha256=hZxM43X09SFut4Uvp087otGPEuBIO2K7BI7QXXtbJ98,4237
|
|
73
73
|
minikai/models/slim_mini_dto.py,sha256=8gZLJj57sYeAhTVwyaKbc5nExpKDPIIsRNWlgD2LLpI,5468
|
|
74
74
|
minikai/models/tool_dto.py,sha256=uZhnmNApq0cnLqaiRI3OXAos0APyvT2s3CqlFtmLEUg,1804
|
|
75
75
|
minikai/models/update_attachments_body.py,sha256=I7-X-lGxIPXpaLCKgTNnObyFOWWJ-eI69UEQ_PPtCwI,3408
|
|
@@ -83,6 +83,6 @@ minikai/models/user_to_mini_dto.py,sha256=bgoXYiideROMOl9xMXW6iLmCQcRqKYnsdpkypk
|
|
|
83
83
|
minikai/models/workspace_dto.py,sha256=GR-B1mSyBg-C2OflGN3iZEJ8Fy-DZGfSbO4m8JzdTy8,2117
|
|
84
84
|
minikai/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
|
|
85
85
|
minikai/types.py,sha256=AX4orxQZQJat3vZrgjJ-TYb2sNBL8kNo9yqYDT-n8y8,1391
|
|
86
|
-
minikai-0.1.
|
|
87
|
-
minikai-0.1.
|
|
88
|
-
minikai-0.1.
|
|
86
|
+
minikai-0.1.2.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
87
|
+
minikai-0.1.2.dist-info/METADATA,sha256=wCx5sLbQYOTjcuJNpxOygVUSFoWpts1FGfsG7Th7o5M,5092
|
|
88
|
+
minikai-0.1.2.dist-info/RECORD,,
|
minikai/models/record_tags.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
T = TypeVar("T", bound="RecordTags")
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@_attrs_define
|
|
11
|
-
class RecordTags:
|
|
12
|
-
""" """
|
|
13
|
-
|
|
14
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
-
|
|
16
|
-
def to_dict(self) -> dict[str, Any]:
|
|
17
|
-
field_dict: dict[str, Any] = {}
|
|
18
|
-
field_dict.update(self.additional_properties)
|
|
19
|
-
|
|
20
|
-
return field_dict
|
|
21
|
-
|
|
22
|
-
@classmethod
|
|
23
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
-
d = dict(src_dict)
|
|
25
|
-
record_tags = cls()
|
|
26
|
-
|
|
27
|
-
record_tags.additional_properties = d
|
|
28
|
-
return record_tags
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def additional_keys(self) -> list[str]:
|
|
32
|
-
return list(self.additional_properties.keys())
|
|
33
|
-
|
|
34
|
-
def __getitem__(self, key: str) -> Any:
|
|
35
|
-
return self.additional_properties[key]
|
|
36
|
-
|
|
37
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
-
self.additional_properties[key] = value
|
|
39
|
-
|
|
40
|
-
def __delitem__(self, key: str) -> None:
|
|
41
|
-
del self.additional_properties[key]
|
|
42
|
-
|
|
43
|
-
def __contains__(self, key: str) -> bool:
|
|
44
|
-
return key in self.additional_properties
|
|
File without changes
|