windmill-api 1.412.0__py3-none-any.whl → 1.413.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 windmill-api might be problematic. Click here for more details.

@@ -0,0 +1,157 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.list_autoscaling_events_response_200_item import ListAutoscalingEventsResponse200Item
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ worker_group: str,
14
+ ) -> Dict[str, Any]:
15
+ pass
16
+
17
+ return {
18
+ "method": "get",
19
+ "url": "/configs/list_autoscaling_events/{worker_group}".format(
20
+ worker_group=worker_group,
21
+ ),
22
+ }
23
+
24
+
25
+ def _parse_response(
26
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
27
+ ) -> Optional[List["ListAutoscalingEventsResponse200Item"]]:
28
+ if response.status_code == HTTPStatus.OK:
29
+ response_200 = []
30
+ _response_200 = response.json()
31
+ for response_200_item_data in _response_200:
32
+ response_200_item = ListAutoscalingEventsResponse200Item.from_dict(response_200_item_data)
33
+
34
+ response_200.append(response_200_item)
35
+
36
+ return response_200
37
+ if client.raise_on_unexpected_status:
38
+ raise errors.UnexpectedStatus(response.status_code, response.content)
39
+ else:
40
+ return None
41
+
42
+
43
+ def _build_response(
44
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
45
+ ) -> Response[List["ListAutoscalingEventsResponse200Item"]]:
46
+ return Response(
47
+ status_code=HTTPStatus(response.status_code),
48
+ content=response.content,
49
+ headers=response.headers,
50
+ parsed=_parse_response(client=client, response=response),
51
+ )
52
+
53
+
54
+ def sync_detailed(
55
+ worker_group: str,
56
+ *,
57
+ client: Union[AuthenticatedClient, Client],
58
+ ) -> Response[List["ListAutoscalingEventsResponse200Item"]]:
59
+ """List autoscaling events
60
+
61
+ Args:
62
+ worker_group (str):
63
+
64
+ Raises:
65
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
66
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
67
+
68
+ Returns:
69
+ Response[List['ListAutoscalingEventsResponse200Item']]
70
+ """
71
+
72
+ kwargs = _get_kwargs(
73
+ worker_group=worker_group,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ def sync(
84
+ worker_group: str,
85
+ *,
86
+ client: Union[AuthenticatedClient, Client],
87
+ ) -> Optional[List["ListAutoscalingEventsResponse200Item"]]:
88
+ """List autoscaling events
89
+
90
+ Args:
91
+ worker_group (str):
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ List['ListAutoscalingEventsResponse200Item']
99
+ """
100
+
101
+ return sync_detailed(
102
+ worker_group=worker_group,
103
+ client=client,
104
+ ).parsed
105
+
106
+
107
+ async def asyncio_detailed(
108
+ worker_group: str,
109
+ *,
110
+ client: Union[AuthenticatedClient, Client],
111
+ ) -> Response[List["ListAutoscalingEventsResponse200Item"]]:
112
+ """List autoscaling events
113
+
114
+ Args:
115
+ worker_group (str):
116
+
117
+ Raises:
118
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
119
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
120
+
121
+ Returns:
122
+ Response[List['ListAutoscalingEventsResponse200Item']]
123
+ """
124
+
125
+ kwargs = _get_kwargs(
126
+ worker_group=worker_group,
127
+ )
128
+
129
+ response = await client.get_async_httpx_client().request(**kwargs)
130
+
131
+ return _build_response(client=client, response=response)
132
+
133
+
134
+ async def asyncio(
135
+ worker_group: str,
136
+ *,
137
+ client: Union[AuthenticatedClient, Client],
138
+ ) -> Optional[List["ListAutoscalingEventsResponse200Item"]]:
139
+ """List autoscaling events
140
+
141
+ Args:
142
+ worker_group (str):
143
+
144
+ Raises:
145
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
146
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
147
+
148
+ Returns:
149
+ List['ListAutoscalingEventsResponse200Item']
150
+ """
151
+
152
+ return (
153
+ await asyncio_detailed(
154
+ worker_group=worker_group,
155
+ client=client,
156
+ )
157
+ ).parsed
@@ -0,0 +1,107 @@
1
+ import datetime
2
+ from typing import Any, Dict, List, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ from dateutil.parser import isoparse
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="AutoscalingEvent")
11
+
12
+
13
+ @_attrs_define
14
+ class AutoscalingEvent:
15
+ """
16
+ Attributes:
17
+ id (Union[Unset, int]):
18
+ worker_group (Union[Unset, str]):
19
+ event_type (Union[Unset, str]):
20
+ desired_workers (Union[Unset, int]):
21
+ reason (Union[Unset, str]):
22
+ applied_at (Union[Unset, datetime.datetime]):
23
+ """
24
+
25
+ id: Union[Unset, int] = UNSET
26
+ worker_group: Union[Unset, str] = UNSET
27
+ event_type: Union[Unset, str] = UNSET
28
+ desired_workers: Union[Unset, int] = UNSET
29
+ reason: Union[Unset, str] = UNSET
30
+ applied_at: Union[Unset, datetime.datetime] = UNSET
31
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
32
+
33
+ def to_dict(self) -> Dict[str, Any]:
34
+ id = self.id
35
+ worker_group = self.worker_group
36
+ event_type = self.event_type
37
+ desired_workers = self.desired_workers
38
+ reason = self.reason
39
+ applied_at: Union[Unset, str] = UNSET
40
+ if not isinstance(self.applied_at, Unset):
41
+ applied_at = self.applied_at.isoformat()
42
+
43
+ field_dict: Dict[str, Any] = {}
44
+ field_dict.update(self.additional_properties)
45
+ field_dict.update({})
46
+ if id is not UNSET:
47
+ field_dict["id"] = id
48
+ if worker_group is not UNSET:
49
+ field_dict["worker_group"] = worker_group
50
+ if event_type is not UNSET:
51
+ field_dict["event_type"] = event_type
52
+ if desired_workers is not UNSET:
53
+ field_dict["desired_workers"] = desired_workers
54
+ if reason is not UNSET:
55
+ field_dict["reason"] = reason
56
+ if applied_at is not UNSET:
57
+ field_dict["applied_at"] = applied_at
58
+
59
+ return field_dict
60
+
61
+ @classmethod
62
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
63
+ d = src_dict.copy()
64
+ id = d.pop("id", UNSET)
65
+
66
+ worker_group = d.pop("worker_group", UNSET)
67
+
68
+ event_type = d.pop("event_type", UNSET)
69
+
70
+ desired_workers = d.pop("desired_workers", UNSET)
71
+
72
+ reason = d.pop("reason", UNSET)
73
+
74
+ _applied_at = d.pop("applied_at", UNSET)
75
+ applied_at: Union[Unset, datetime.datetime]
76
+ if isinstance(_applied_at, Unset):
77
+ applied_at = UNSET
78
+ else:
79
+ applied_at = isoparse(_applied_at)
80
+
81
+ autoscaling_event = cls(
82
+ id=id,
83
+ worker_group=worker_group,
84
+ event_type=event_type,
85
+ desired_workers=desired_workers,
86
+ reason=reason,
87
+ applied_at=applied_at,
88
+ )
89
+
90
+ autoscaling_event.additional_properties = d
91
+ return autoscaling_event
92
+
93
+ @property
94
+ def additional_keys(self) -> List[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ import datetime
2
+ from typing import Any, Dict, List, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ from dateutil.parser import isoparse
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="ListAutoscalingEventsResponse200Item")
11
+
12
+
13
+ @_attrs_define
14
+ class ListAutoscalingEventsResponse200Item:
15
+ """
16
+ Attributes:
17
+ id (Union[Unset, int]):
18
+ worker_group (Union[Unset, str]):
19
+ event_type (Union[Unset, str]):
20
+ desired_workers (Union[Unset, int]):
21
+ reason (Union[Unset, str]):
22
+ applied_at (Union[Unset, datetime.datetime]):
23
+ """
24
+
25
+ id: Union[Unset, int] = UNSET
26
+ worker_group: Union[Unset, str] = UNSET
27
+ event_type: Union[Unset, str] = UNSET
28
+ desired_workers: Union[Unset, int] = UNSET
29
+ reason: Union[Unset, str] = UNSET
30
+ applied_at: Union[Unset, datetime.datetime] = UNSET
31
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
32
+
33
+ def to_dict(self) -> Dict[str, Any]:
34
+ id = self.id
35
+ worker_group = self.worker_group
36
+ event_type = self.event_type
37
+ desired_workers = self.desired_workers
38
+ reason = self.reason
39
+ applied_at: Union[Unset, str] = UNSET
40
+ if not isinstance(self.applied_at, Unset):
41
+ applied_at = self.applied_at.isoformat()
42
+
43
+ field_dict: Dict[str, Any] = {}
44
+ field_dict.update(self.additional_properties)
45
+ field_dict.update({})
46
+ if id is not UNSET:
47
+ field_dict["id"] = id
48
+ if worker_group is not UNSET:
49
+ field_dict["worker_group"] = worker_group
50
+ if event_type is not UNSET:
51
+ field_dict["event_type"] = event_type
52
+ if desired_workers is not UNSET:
53
+ field_dict["desired_workers"] = desired_workers
54
+ if reason is not UNSET:
55
+ field_dict["reason"] = reason
56
+ if applied_at is not UNSET:
57
+ field_dict["applied_at"] = applied_at
58
+
59
+ return field_dict
60
+
61
+ @classmethod
62
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
63
+ d = src_dict.copy()
64
+ id = d.pop("id", UNSET)
65
+
66
+ worker_group = d.pop("worker_group", UNSET)
67
+
68
+ event_type = d.pop("event_type", UNSET)
69
+
70
+ desired_workers = d.pop("desired_workers", UNSET)
71
+
72
+ reason = d.pop("reason", UNSET)
73
+
74
+ _applied_at = d.pop("applied_at", UNSET)
75
+ applied_at: Union[Unset, datetime.datetime]
76
+ if isinstance(_applied_at, Unset):
77
+ applied_at = UNSET
78
+ else:
79
+ applied_at = isoparse(_applied_at)
80
+
81
+ list_autoscaling_events_response_200_item = cls(
82
+ id=id,
83
+ worker_group=worker_group,
84
+ event_type=event_type,
85
+ desired_workers=desired_workers,
86
+ reason=reason,
87
+ applied_at=applied_at,
88
+ )
89
+
90
+ list_autoscaling_events_response_200_item.additional_properties = d
91
+ return list_autoscaling_events_response_200_item
92
+
93
+ @property
94
+ def additional_keys(self) -> List[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: windmill-api
3
- Version: 1.412.0
3
+ Version: 1.413.1
4
4
  Summary: A client library for accessing Windmill API
5
5
  License: Apache-2.0
6
6
  Author: Ruben Fiszel
@@ -34,6 +34,7 @@ windmill_api/api/concurrency_groups/list_extended_jobs.py,sha256=F_GGw2KwojEyJUb
34
34
  windmill_api/api/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  windmill_api/api/config/delete_config.py,sha256=tIXSiXwRK6MUaolHhicQydeyht60L6LNlZDwd96OLF8,2223
36
36
  windmill_api/api/config/get_config.py,sha256=d9o0Oe1lMkEJn_d120lLykgwNTXCc376fmPv1nqzz-I,2277
37
+ windmill_api/api/config/list_autoscaling_events.py,sha256=MWN5UWGmRJuzgXZTrOYbwOSHLJAEZIslSBeE2RN-kaw,4349
37
38
  windmill_api/api/config/list_configs.py,sha256=7Tuv-IRzSDOe03SEw33Gogv6p2JqBf0SvSGXlfM2TqQ,3657
38
39
  windmill_api/api/config/list_worker_groups.py,sha256=En8Im6pXzBhrJfjGpBj05XCUzZOxzxBQyPVaJ3ZmYHI,3761
39
40
  windmill_api/api/config/update_config.py,sha256=2zvsOny7pXp51JphnmdpS85CACC35vDzF3JAfk52tfY,2460
@@ -435,6 +436,7 @@ windmill_api/models/audit_log.py,sha256=ITxGdJ2nBJoXj7LvgNb_5dF-Y5fW_UPZ6hucDMP1
435
436
  windmill_api/models/audit_log_action_kind.py,sha256=T0fGVIol3ppuHzImKXcLRMzjFDIcPTOcwa9geVcouBk,217
436
437
  windmill_api/models/audit_log_operation.py,sha256=aotQqRAlQJWahg-tJand30zl4UKlGFNbSKM9CYdUDXI,3728
437
438
  windmill_api/models/audit_log_parameters.py,sha256=942p2zW1l989YhRoD-tzZkzm9L9WCqPVFEytAipdc1E,1248
439
+ windmill_api/models/autoscaling_event.py,sha256=0WFnvn6WTe_bJ6YGwZrhkEHUfSGR0v-4ZN8WAVAUTqE,3367
438
440
  windmill_api/models/branch_all.py,sha256=rJO_UgIwKgLwndTozpK_l2czSMI8ynmSzHIj3stwlqk,2560
439
441
  windmill_api/models/branch_all_branches_item.py,sha256=KSHjzM6PsVfKVpXdlunkAS8MJAqH2NbMUCZ_P-uD7ec,2750
440
442
  windmill_api/models/branch_all_branches_item_modules_item.py,sha256=POtXKPyRb1Uj7xEKUSnpTbEM1At5DYZ08ZyIojB89lQ,12249
@@ -2244,6 +2246,7 @@ windmill_api/models/list_audit_logs_response_200_item.py,sha256=WB2fJgwgQaq1kzQG
2244
2246
  windmill_api/models/list_audit_logs_response_200_item_action_kind.py,sha256=GxDy-KWMQnH2soLbfBzvuXIvtlkxM2xT2Sd5d5WkKq4,237
2245
2247
  windmill_api/models/list_audit_logs_response_200_item_operation.py,sha256=BaL1TQFsSxZX4VNHL5PPCGGlZ0aL51eMjvZmpAlv6pw,3748
2246
2248
  windmill_api/models/list_audit_logs_response_200_item_parameters.py,sha256=q4xUQeAhgxiNi7k5T6HGkd3peGLpXr5E3-9d4JJr6nI,1360
2249
+ windmill_api/models/list_autoscaling_events_response_200_item.py,sha256=cpgO8peKyXAJ7TVYMTKk7pJyw3RaUQBAIhMcP95edsw,3479
2247
2250
  windmill_api/models/list_completed_jobs_response_200_item.py,sha256=mh1ybxxV414jtZfamB7ZZss-qofsK3NWzEF8ZLG3gsI,13151
2248
2251
  windmill_api/models/list_completed_jobs_response_200_item_args.py,sha256=1O3m2DE94Pq3UqYNwWhC2NADWpJ1sQ1HEqpsjQ5oWMg,1350
2249
2252
  windmill_api/models/list_completed_jobs_response_200_item_flow_status.py,sha256=ufnL4lSiFIgBsT0t2yb1vzH1Qq8eiQzinWntrkKLko0,6054
@@ -3400,7 +3403,7 @@ windmill_api/models/workspace_git_sync_settings_repositories_item_exclude_types_
3400
3403
  windmill_api/models/workspace_invite.py,sha256=HnAJWGv5LwxWkz1T3fhgHKIccO7RFC1lixwUUXG6CXs,2037
3401
3404
  windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
3402
3405
  windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
3403
- windmill_api-1.412.0.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
3404
- windmill_api-1.412.0.dist-info/METADATA,sha256=bRPV2MuLfoiXn_xlkQjnrPYTuu8mIARK5DpyoSdAZII,5023
3405
- windmill_api-1.412.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
3406
- windmill_api-1.412.0.dist-info/RECORD,,
3406
+ windmill_api-1.413.1.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
3407
+ windmill_api-1.413.1.dist-info/METADATA,sha256=YX9POGTpKhXuVOR1Hpj5vb0lAopmDEUnkgfu_1ZkDDQ,5023
3408
+ windmill_api-1.413.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
3409
+ windmill_api-1.413.1.dist-info/RECORD,,