windmill-api 1.388.0__py3-none-any.whl → 1.389.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.

@@ -52,7 +52,7 @@ def sync_detailed(
52
52
  client: Union[AuthenticatedClient, Client],
53
53
  json_body: CancelQueuedJobJsonBody,
54
54
  ) -> Response[Any]:
55
- """cancel queued job
55
+ """cancel queued or running job
56
56
 
57
57
  Args:
58
58
  workspace (str):
@@ -87,7 +87,7 @@ async def asyncio_detailed(
87
87
  client: Union[AuthenticatedClient, Client],
88
88
  json_body: CancelQueuedJobJsonBody,
89
89
  ) -> Response[Any]:
90
- """cancel queued job
90
+ """cancel queued or running job
91
91
 
92
92
  Args:
93
93
  workspace (str):
File without changes
@@ -0,0 +1,93 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response
9
+
10
+
11
+ def _get_kwargs(
12
+ path: str,
13
+ ) -> Dict[str, Any]:
14
+ pass
15
+
16
+ return {
17
+ "method": "get",
18
+ "url": "/service_logs/get_log_file/{path}".format(
19
+ path=path,
20
+ ),
21
+ }
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
25
+ if client.raise_on_unexpected_status:
26
+ raise errors.UnexpectedStatus(response.status_code, response.content)
27
+ else:
28
+ return None
29
+
30
+
31
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
32
+ return Response(
33
+ status_code=HTTPStatus(response.status_code),
34
+ content=response.content,
35
+ headers=response.headers,
36
+ parsed=_parse_response(client=client, response=response),
37
+ )
38
+
39
+
40
+ def sync_detailed(
41
+ path: str,
42
+ *,
43
+ client: Union[AuthenticatedClient, Client],
44
+ ) -> Response[Any]:
45
+ """get log file by path
46
+
47
+ Args:
48
+ path (str):
49
+
50
+ Raises:
51
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
52
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
53
+
54
+ Returns:
55
+ Response[Any]
56
+ """
57
+
58
+ kwargs = _get_kwargs(
59
+ path=path,
60
+ )
61
+
62
+ response = client.get_httpx_client().request(
63
+ **kwargs,
64
+ )
65
+
66
+ return _build_response(client=client, response=response)
67
+
68
+
69
+ async def asyncio_detailed(
70
+ path: str,
71
+ *,
72
+ client: Union[AuthenticatedClient, Client],
73
+ ) -> Response[Any]:
74
+ """get log file by path
75
+
76
+ Args:
77
+ path (str):
78
+
79
+ Raises:
80
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
82
+
83
+ Returns:
84
+ Response[Any]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ path=path,
89
+ )
90
+
91
+ response = await client.get_async_httpx_client().request(**kwargs)
92
+
93
+ return _build_response(client=client, response=response)
@@ -0,0 +1,201 @@
1
+ import datetime
2
+ from http import HTTPStatus
3
+ from typing import Any, Dict, List, Optional, Union
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.list_log_files_response_200_item import ListLogFilesResponse200Item
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ before: Union[Unset, None, datetime.datetime] = UNSET,
16
+ after: Union[Unset, None, datetime.datetime] = UNSET,
17
+ with_error: Union[Unset, None, bool] = UNSET,
18
+ ) -> Dict[str, Any]:
19
+ pass
20
+
21
+ params: Dict[str, Any] = {}
22
+ json_before: Union[Unset, None, str] = UNSET
23
+ if not isinstance(before, Unset):
24
+ json_before = before.isoformat() if before else None
25
+
26
+ params["before"] = json_before
27
+
28
+ json_after: Union[Unset, None, str] = UNSET
29
+ if not isinstance(after, Unset):
30
+ json_after = after.isoformat() if after else None
31
+
32
+ params["after"] = json_after
33
+
34
+ params["with_error"] = with_error
35
+
36
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
37
+
38
+ return {
39
+ "method": "get",
40
+ "url": "/service_logs/list_files",
41
+ "params": params,
42
+ }
43
+
44
+
45
+ def _parse_response(
46
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
+ ) -> Optional[List["ListLogFilesResponse200Item"]]:
48
+ if response.status_code == HTTPStatus.OK:
49
+ response_200 = []
50
+ _response_200 = response.json()
51
+ for response_200_item_data in _response_200:
52
+ response_200_item = ListLogFilesResponse200Item.from_dict(response_200_item_data)
53
+
54
+ response_200.append(response_200_item)
55
+
56
+ return response_200
57
+ if client.raise_on_unexpected_status:
58
+ raise errors.UnexpectedStatus(response.status_code, response.content)
59
+ else:
60
+ return None
61
+
62
+
63
+ def _build_response(
64
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
65
+ ) -> Response[List["ListLogFilesResponse200Item"]]:
66
+ return Response(
67
+ status_code=HTTPStatus(response.status_code),
68
+ content=response.content,
69
+ headers=response.headers,
70
+ parsed=_parse_response(client=client, response=response),
71
+ )
72
+
73
+
74
+ def sync_detailed(
75
+ *,
76
+ client: Union[AuthenticatedClient, Client],
77
+ before: Union[Unset, None, datetime.datetime] = UNSET,
78
+ after: Union[Unset, None, datetime.datetime] = UNSET,
79
+ with_error: Union[Unset, None, bool] = UNSET,
80
+ ) -> Response[List["ListLogFilesResponse200Item"]]:
81
+ """list log files ordered by timestamp
82
+
83
+ Args:
84
+ before (Union[Unset, None, datetime.datetime]):
85
+ after (Union[Unset, None, datetime.datetime]):
86
+ with_error (Union[Unset, None, bool]):
87
+
88
+ Raises:
89
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
90
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
91
+
92
+ Returns:
93
+ Response[List['ListLogFilesResponse200Item']]
94
+ """
95
+
96
+ kwargs = _get_kwargs(
97
+ before=before,
98
+ after=after,
99
+ with_error=with_error,
100
+ )
101
+
102
+ response = client.get_httpx_client().request(
103
+ **kwargs,
104
+ )
105
+
106
+ return _build_response(client=client, response=response)
107
+
108
+
109
+ def sync(
110
+ *,
111
+ client: Union[AuthenticatedClient, Client],
112
+ before: Union[Unset, None, datetime.datetime] = UNSET,
113
+ after: Union[Unset, None, datetime.datetime] = UNSET,
114
+ with_error: Union[Unset, None, bool] = UNSET,
115
+ ) -> Optional[List["ListLogFilesResponse200Item"]]:
116
+ """list log files ordered by timestamp
117
+
118
+ Args:
119
+ before (Union[Unset, None, datetime.datetime]):
120
+ after (Union[Unset, None, datetime.datetime]):
121
+ with_error (Union[Unset, None, bool]):
122
+
123
+ Raises:
124
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
125
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
126
+
127
+ Returns:
128
+ List['ListLogFilesResponse200Item']
129
+ """
130
+
131
+ return sync_detailed(
132
+ client=client,
133
+ before=before,
134
+ after=after,
135
+ with_error=with_error,
136
+ ).parsed
137
+
138
+
139
+ async def asyncio_detailed(
140
+ *,
141
+ client: Union[AuthenticatedClient, Client],
142
+ before: Union[Unset, None, datetime.datetime] = UNSET,
143
+ after: Union[Unset, None, datetime.datetime] = UNSET,
144
+ with_error: Union[Unset, None, bool] = UNSET,
145
+ ) -> Response[List["ListLogFilesResponse200Item"]]:
146
+ """list log files ordered by timestamp
147
+
148
+ Args:
149
+ before (Union[Unset, None, datetime.datetime]):
150
+ after (Union[Unset, None, datetime.datetime]):
151
+ with_error (Union[Unset, None, bool]):
152
+
153
+ Raises:
154
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
155
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
156
+
157
+ Returns:
158
+ Response[List['ListLogFilesResponse200Item']]
159
+ """
160
+
161
+ kwargs = _get_kwargs(
162
+ before=before,
163
+ after=after,
164
+ with_error=with_error,
165
+ )
166
+
167
+ response = await client.get_async_httpx_client().request(**kwargs)
168
+
169
+ return _build_response(client=client, response=response)
170
+
171
+
172
+ async def asyncio(
173
+ *,
174
+ client: Union[AuthenticatedClient, Client],
175
+ before: Union[Unset, None, datetime.datetime] = UNSET,
176
+ after: Union[Unset, None, datetime.datetime] = UNSET,
177
+ with_error: Union[Unset, None, bool] = UNSET,
178
+ ) -> Optional[List["ListLogFilesResponse200Item"]]:
179
+ """list log files ordered by timestamp
180
+
181
+ Args:
182
+ before (Union[Unset, None, datetime.datetime]):
183
+ after (Union[Unset, None, datetime.datetime]):
184
+ with_error (Union[Unset, None, bool]):
185
+
186
+ Raises:
187
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
188
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
189
+
190
+ Returns:
191
+ List['ListLogFilesResponse200Item']
192
+ """
193
+
194
+ return (
195
+ await asyncio_detailed(
196
+ client=client,
197
+ before=before,
198
+ after=after,
199
+ with_error=with_error,
200
+ )
201
+ ).parsed
@@ -0,0 +1,115 @@
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="ListLogFilesResponse200Item")
11
+
12
+
13
+ @_attrs_define
14
+ class ListLogFilesResponse200Item:
15
+ """
16
+ Attributes:
17
+ hostname (str):
18
+ mode (str):
19
+ log_ts (datetime.datetime):
20
+ file_path (str):
21
+ json_fmt (bool):
22
+ worker_group (Union[Unset, str]):
23
+ ok_lines (Union[Unset, int]):
24
+ err_lines (Union[Unset, int]):
25
+ """
26
+
27
+ hostname: str
28
+ mode: str
29
+ log_ts: datetime.datetime
30
+ file_path: str
31
+ json_fmt: bool
32
+ worker_group: Union[Unset, str] = UNSET
33
+ ok_lines: Union[Unset, int] = UNSET
34
+ err_lines: Union[Unset, int] = UNSET
35
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
36
+
37
+ def to_dict(self) -> Dict[str, Any]:
38
+ hostname = self.hostname
39
+ mode = self.mode
40
+ log_ts = self.log_ts.isoformat()
41
+
42
+ file_path = self.file_path
43
+ json_fmt = self.json_fmt
44
+ worker_group = self.worker_group
45
+ ok_lines = self.ok_lines
46
+ err_lines = self.err_lines
47
+
48
+ field_dict: Dict[str, Any] = {}
49
+ field_dict.update(self.additional_properties)
50
+ field_dict.update(
51
+ {
52
+ "hostname": hostname,
53
+ "mode": mode,
54
+ "log_ts": log_ts,
55
+ "file_path": file_path,
56
+ "json_fmt": json_fmt,
57
+ }
58
+ )
59
+ if worker_group is not UNSET:
60
+ field_dict["worker_group"] = worker_group
61
+ if ok_lines is not UNSET:
62
+ field_dict["ok_lines"] = ok_lines
63
+ if err_lines is not UNSET:
64
+ field_dict["err_lines"] = err_lines
65
+
66
+ return field_dict
67
+
68
+ @classmethod
69
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
70
+ d = src_dict.copy()
71
+ hostname = d.pop("hostname")
72
+
73
+ mode = d.pop("mode")
74
+
75
+ log_ts = isoparse(d.pop("log_ts"))
76
+
77
+ file_path = d.pop("file_path")
78
+
79
+ json_fmt = d.pop("json_fmt")
80
+
81
+ worker_group = d.pop("worker_group", UNSET)
82
+
83
+ ok_lines = d.pop("ok_lines", UNSET)
84
+
85
+ err_lines = d.pop("err_lines", UNSET)
86
+
87
+ list_log_files_response_200_item = cls(
88
+ hostname=hostname,
89
+ mode=mode,
90
+ log_ts=log_ts,
91
+ file_path=file_path,
92
+ json_fmt=json_fmt,
93
+ worker_group=worker_group,
94
+ ok_lines=ok_lines,
95
+ err_lines=err_lines,
96
+ )
97
+
98
+ list_log_files_response_200_item.additional_properties = d
99
+ return list_log_files_response_200_item
100
+
101
+ @property
102
+ def additional_keys(self) -> List[str]:
103
+ return list(self.additional_properties.keys())
104
+
105
+ def __getitem__(self, key: str) -> Any:
106
+ return self.additional_properties[key]
107
+
108
+ def __setitem__(self, key: str, value: Any) -> None:
109
+ self.additional_properties[key] = value
110
+
111
+ def __delitem__(self, key: str) -> None:
112
+ del self.additional_properties[key]
113
+
114
+ def __contains__(self, key: str) -> bool:
115
+ return key in self.additional_properties
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: windmill-api
3
- Version: 1.388.0
3
+ Version: 1.389.1
4
4
  Summary: A client library for accessing Windmill API
5
5
  License: Apache-2.0
6
6
  Author: Ruben Fiszel
@@ -122,7 +122,7 @@ windmill_api/api/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
122
122
  windmill_api/api/integration/list_hub_integrations.py,sha256=kszU1_fK3Gl3b1C_yYZkAxJqGgw7NK-W4kCWEHlfCg0,4507
123
123
  windmill_api/api/job/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
124
  windmill_api/api/job/cancel_persistent_queued_jobs.py,sha256=dELr4jz458NgfsSBM25QjUpYlTQMIBaJznUEOWQLh6g,3015
125
- windmill_api/api/job/cancel_queued_job.py,sha256=YBpc_XkHQJ1PIGCmELwBokpay7hDW4--7VTC-4qsMQQ,2848
125
+ windmill_api/api/job/cancel_queued_job.py,sha256=Kp_NOqCQhkxgw96ObmkCQq5dNsJL58WoW1-eM8mmLQ4,2870
126
126
  windmill_api/api/job/cancel_selection.py,sha256=4PDSj4_UAjhdIWKQELAllLZnuiUWqCxHe3-btNzuAuI,4110
127
127
  windmill_api/api/job/cancel_suspended_job_get.py,sha256=JGZmXW4tcQsTUsYO6nwF0Prw54KzgwyJ0ZdnNLTxdeQ,3357
128
128
  windmill_api/api/job/cancel_suspended_job_post.py,sha256=ztNkGEIPP6Hpo5s6qdS77z2r3d7LpFEA0uzH-44-tmU,3824
@@ -243,6 +243,9 @@ windmill_api/api/script/raw_script_by_path.py,sha256=wh6-S18YugTXW4J7Qo0yeuJN7B6
243
243
  windmill_api/api/script/raw_script_by_path_tokened.py,sha256=SGbwTzl-03V1aceSts_ZH86EAyZ_IUtEvWnDcEaDJE4,2777
244
244
  windmill_api/api/script/toggle_workspace_error_handler_for_script.py,sha256=DTPlpQK4Qn4dT_hZZcCFs5dfJGFQ3K-jqG62hSi1Lr8,3137
245
245
  windmill_api/api/script/update_script_history.py,sha256=mRE0R8_9RCIo5cmz6OtZEL6ytNrN11X22tZTaFjI9QQ,3088
246
+ windmill_api/api/service_logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
247
+ windmill_api/api/service_logs/get_log_file.py,sha256=EFwKZgOSH9r0jv-3f3QPAJCZCxQHq6nFgP5X8yQm3mw,2245
248
+ windmill_api/api/service_logs/list_log_files.py,sha256=ueR8yr9-yjBbzqG5e9OREkcVIzIJ9fdO-WJrAS_xqsU,6189
246
249
  windmill_api/api/setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
247
250
  windmill_api/api/setting/create_customer_portal_session.py,sha256=rUOT27UsoKKImfwdgIXF57u2fMWe-DtEaeFflD314mY,2608
248
251
  windmill_api/api/setting/get_global.py,sha256=fROXxArQM5x7HHue_VWX9Y2i-Dm_byRs9Y1yIsYDogI,2287
@@ -2062,6 +2065,7 @@ windmill_api/models/list_jobs_response_200_item_type_1_raw_flow_modules_item_sus
2062
2065
  windmill_api/models/list_jobs_response_200_item_type_1_raw_flow_modules_item_suspend_user_groups_required_type_1.py,sha256=8HZvSNUUqzwbcu56m8_2ltpWDynvFglzbPrD0bzzFD8,2405
2063
2066
  windmill_api/models/list_jobs_response_200_item_type_1_raw_flow_modules_item_suspend_user_groups_required_type_1_type.py,sha256=doE93cONpyFeL89LRmGWs12jrvtTeuEBxSgX1QeC7Pg,215
2064
2067
  windmill_api/models/list_jobs_response_200_item_type_1_type.py,sha256=sdZ7TEP0CM3iG4gDcSoJObCg5TL2iRjNGFOW8WBxyqk,165
2068
+ windmill_api/models/list_log_files_response_200_item.py,sha256=G-Ckj2XTNGDsmTTId4k0xAJwctDZKo-hO4RCI5Cd-zk,3230
2065
2069
  windmill_api/models/list_o_auth_logins_response_200.py,sha256=BCVtmrNs--AMAYxwL7A_3RUm2bDGWs8Wsr71CW-yDUA,1814
2066
2070
  windmill_api/models/list_pending_invites_response_200_item.py,sha256=0fE8Lg-UhErEDIxVtxfi87bgUCsuWCKnH1XdlOZ7Js0,2139
2067
2071
  windmill_api/models/list_queue_response_200_item.py,sha256=jFIrL7P3cIEUran60S1RjXF6cmpa93erOAsfL2EI7AM,13589
@@ -2615,7 +2619,7 @@ windmill_api/models/workspace_git_sync_settings_repositories_item_exclude_types_
2615
2619
  windmill_api/models/workspace_invite.py,sha256=HnAJWGv5LwxWkz1T3fhgHKIccO7RFC1lixwUUXG6CXs,2037
2616
2620
  windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
2617
2621
  windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
2618
- windmill_api-1.388.0.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
2619
- windmill_api-1.388.0.dist-info/METADATA,sha256=53HhhBrHL0xn2xbMoYZb7KQrUnzm-Xk_rjk_F4dyy6E,5023
2620
- windmill_api-1.388.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
2621
- windmill_api-1.388.0.dist-info/RECORD,,
2622
+ windmill_api-1.389.1.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
2623
+ windmill_api-1.389.1.dist-info/METADATA,sha256=XDuGthrlFJOKveWYrgk73OEDSAC0hQwaPT6FQt9rnLU,5023
2624
+ windmill_api-1.389.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
2625
+ windmill_api-1.389.1.dist-info/RECORD,,