windmill-api 1.528.0__py3-none-any.whl → 1.529.0__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,126 @@
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 ...models.get_counts_of_running_jobs_per_tag_response_200 import GetCountsOfRunningJobsPerTagResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> Dict[str, Any]:
13
+ pass
14
+
15
+ return {
16
+ "method": "get",
17
+ "url": "/workers/queue_running_counts",
18
+ }
19
+
20
+
21
+ def _parse_response(
22
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
24
+ if response.status_code == HTTPStatus.OK:
25
+ response_200 = GetCountsOfRunningJobsPerTagResponse200.from_dict(response.json())
26
+
27
+ return response_200
28
+ if client.raise_on_unexpected_status:
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+ else:
31
+ return None
32
+
33
+
34
+ def _build_response(
35
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
37
+ return Response(
38
+ status_code=HTTPStatus(response.status_code),
39
+ content=response.content,
40
+ headers=response.headers,
41
+ parsed=_parse_response(client=client, response=response),
42
+ )
43
+
44
+
45
+ def sync_detailed(
46
+ *,
47
+ client: Union[AuthenticatedClient, Client],
48
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
49
+ """get counts of currently running jobs per tag
50
+
51
+ Raises:
52
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
53
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
54
+
55
+ Returns:
56
+ Response[GetCountsOfRunningJobsPerTagResponse200]
57
+ """
58
+
59
+ kwargs = _get_kwargs()
60
+
61
+ response = client.get_httpx_client().request(
62
+ **kwargs,
63
+ )
64
+
65
+ return _build_response(client=client, response=response)
66
+
67
+
68
+ def sync(
69
+ *,
70
+ client: Union[AuthenticatedClient, Client],
71
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
72
+ """get counts of currently running jobs per tag
73
+
74
+ Raises:
75
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
76
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
77
+
78
+ Returns:
79
+ GetCountsOfRunningJobsPerTagResponse200
80
+ """
81
+
82
+ return sync_detailed(
83
+ client=client,
84
+ ).parsed
85
+
86
+
87
+ async def asyncio_detailed(
88
+ *,
89
+ client: Union[AuthenticatedClient, Client],
90
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
91
+ """get counts of currently running jobs per tag
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
+ Response[GetCountsOfRunningJobsPerTagResponse200]
99
+ """
100
+
101
+ kwargs = _get_kwargs()
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
106
+
107
+
108
+ async def asyncio(
109
+ *,
110
+ client: Union[AuthenticatedClient, Client],
111
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
112
+ """get counts of currently running jobs per tag
113
+
114
+ Raises:
115
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
116
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
117
+
118
+ Returns:
119
+ GetCountsOfRunningJobsPerTagResponse200
120
+ """
121
+
122
+ return (
123
+ await asyncio_detailed(
124
+ client=client,
125
+ )
126
+ ).parsed
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="GetCountsOfRunningJobsPerTagResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class GetCountsOfRunningJobsPerTagResponse200:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, int] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+ field_dict.update({})
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
24
+ d = src_dict.copy()
25
+ get_counts_of_running_jobs_per_tag_response_200 = cls()
26
+
27
+ get_counts_of_running_jobs_per_tag_response_200.additional_properties = d
28
+ return get_counts_of_running_jobs_per_tag_response_200
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> int:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: int) -> 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: windmill-api
3
- Version: 1.528.0
3
+ Version: 1.529.0
4
4
  Summary: A client library for accessing Windmill API
5
5
  License: Apache-2.0
6
6
  Author: Ruben Fiszel
@@ -487,6 +487,7 @@ windmill_api/api/worker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
487
487
  windmill_api/api/worker/exists_workers_with_tags.py,sha256=GJUaQdeREdAuq7fhZfpnpGmmcDR6xYL1KQ-3uSP6UoA,4004
488
488
  windmill_api/api/worker/ge_default_tags.py,sha256=vzfZnDN3NWs2-FzpgMnIkuVVL5jzaS4V90g37mKR4wM,3193
489
489
  windmill_api/api/worker/get_counts_of_jobs_waiting_per_tag.py,sha256=Ny3bXeZFWzY7HE9AAyP3ehMbugPAXgEYnNOfCpSFLaU,3717
490
+ windmill_api/api/worker/get_counts_of_running_jobs_per_tag.py,sha256=L_i6n3-Ya8OBkI9z9B1uzSTPgGHUbSQwfrDQcVteMpM,3701
490
491
  windmill_api/api/worker/get_custom_tags.py,sha256=wWnvv5tzC3wiWjUokVbMgu4ChBI6bJ-JMnBrQNmcPqc,5128
491
492
  windmill_api/api/worker/get_queue_metrics.py,sha256=pTH_dMhgOsTMnPw8brDlgtoT353jtR4SWY-liHrXfvs,3739
492
493
  windmill_api/api/worker/is_default_tags_per_workspace.py,sha256=WtwYW4uGzb7UefVWb5ZmKyRVCFzZ61yoNMiYOtYQg_0,3144
@@ -1833,6 +1834,7 @@ windmill_api/models/get_copilot_info_response_200_default_model_provider.py,sha2
1833
1834
  windmill_api/models/get_copilot_info_response_200_providers.py,sha256=XTdmYujYFEgOHNvPKWusq3qH3uwpgkC8SrDceYGvwfk,2220
1834
1835
  windmill_api/models/get_copilot_info_response_200_providers_additional_property.py,sha256=ielXhX83VsECikXirQJg4H2GlW07ZdBjSo8EU1ZLpFk,1927
1835
1836
  windmill_api/models/get_counts_of_jobs_waiting_per_tag_response_200.py,sha256=_e3A1jqpV0IWOk2SR8y17jnbFBZZlRNZWp3UbgiQYtA,1371
1837
+ windmill_api/models/get_counts_of_running_jobs_per_tag_response_200.py,sha256=A4Opf5EpSqwEi6es-aWjhrLF01SFCsIB91ZGyDxQ_TM,1371
1836
1838
  windmill_api/models/get_critical_alerts_response_200.py,sha256=kg2Vs9aXLIrenI2u848ooi-nnkrGRO9UfrthkWgW3rI,3120
1837
1839
  windmill_api/models/get_critical_alerts_response_200_alerts_item.py,sha256=nQsqYz_Kua-QYkq8JFD55cBI-L8TPyNc6ZBvVUutH78,3775
1838
1840
  windmill_api/models/get_default_scripts_response_200.py,sha256=ekfscpG1XtNxHvpokDZ7pI0W6DAdITytKNg09XwSgtc,2537
@@ -4423,7 +4425,7 @@ windmill_api/models/workspace_invite.py,sha256=HnAJWGv5LwxWkz1T3fhgHKIccO7RFC1li
4423
4425
  windmill_api/models/workspace_mute_critical_alerts_ui_json_body.py,sha256=y8ZwkWEZgavVc-FgLuZZ4z8YPCLxjPcMfdGdKjGM6VQ,1883
4424
4426
  windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
4425
4427
  windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
4426
- windmill_api-1.528.0.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
4427
- windmill_api-1.528.0.dist-info/METADATA,sha256=zp4-K9zURouWmt_0PbDvTjRuemZ2yFaA_dvt9wpqM0s,5023
4428
- windmill_api-1.528.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
4429
- windmill_api-1.528.0.dist-info/RECORD,,
4428
+ windmill_api-1.529.0.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
4429
+ windmill_api-1.529.0.dist-info/METADATA,sha256=vkbNkBKGI8Knpn0kETiecmULtAOP6Zg42rTRQFU4B9Q,5023
4430
+ windmill_api-1.529.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
4431
+ windmill_api-1.529.0.dist-info/RECORD,,