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

Files changed (42) hide show
  1. windmill_api/api/job/get_job_updates.py +30 -0
  2. windmill_api/api/job/get_job_updates_sse.py +9 -0
  3. windmill_api/api/setting/create_ducklake_database.py +95 -0
  4. windmill_api/api/setting/databases_exist.py +149 -0
  5. windmill_api/api/workspace/edit_ducklake_config.py +107 -0
  6. windmill_api/api/workspace/list_ducklakes.py +147 -0
  7. windmill_api/models/asset_kind.py +1 -0
  8. windmill_api/models/create_script_json_body_assets_item_kind.py +1 -0
  9. windmill_api/models/ducklake_settings.py +64 -0
  10. windmill_api/models/ducklake_settings_ducklakes.py +62 -0
  11. windmill_api/models/ducklake_settings_ducklakes_additional_property.py +82 -0
  12. windmill_api/models/ducklake_settings_ducklakes_additional_property_catalog.py +72 -0
  13. windmill_api/models/ducklake_settings_ducklakes_additional_property_catalog_resource_type.py +10 -0
  14. windmill_api/models/ducklake_settings_ducklakes_additional_property_storage.py +68 -0
  15. windmill_api/models/edit_ducklake_config_json_body.py +64 -0
  16. windmill_api/models/edit_ducklake_config_json_body_settings.py +66 -0
  17. windmill_api/models/edit_ducklake_config_json_body_settings_ducklakes.py +66 -0
  18. windmill_api/models/edit_ducklake_config_json_body_settings_ducklakes_additional_property.py +82 -0
  19. windmill_api/models/edit_ducklake_config_json_body_settings_ducklakes_additional_property_catalog.py +74 -0
  20. windmill_api/models/edit_ducklake_config_json_body_settings_ducklakes_additional_property_catalog_resource_type.py +10 -0
  21. windmill_api/models/edit_ducklake_config_json_body_settings_ducklakes_additional_property_storage.py +68 -0
  22. windmill_api/models/flow_module_value_2_type_0_assets_item_kind.py +1 -0
  23. windmill_api/models/get_job_updates_response_200.py +16 -0
  24. windmill_api/models/get_script_by_path_with_draft_response_200_assets_item_kind.py +1 -0
  25. windmill_api/models/get_script_by_path_with_draft_response_200_draft_assets_item_kind.py +1 -0
  26. windmill_api/models/get_settings_response_200.py +18 -0
  27. windmill_api/models/get_settings_response_200_ducklake.py +64 -0
  28. windmill_api/models/get_settings_response_200_ducklake_ducklakes.py +66 -0
  29. windmill_api/models/get_settings_response_200_ducklake_ducklakes_additional_property.py +82 -0
  30. windmill_api/models/get_settings_response_200_ducklake_ducklakes_additional_property_catalog.py +74 -0
  31. windmill_api/models/get_settings_response_200_ducklake_ducklakes_additional_property_catalog_resource_type.py +10 -0
  32. windmill_api/models/get_settings_response_200_ducklake_ducklakes_additional_property_storage.py +68 -0
  33. windmill_api/models/list_assets_by_usage_response_200_item_item_kind.py +1 -0
  34. windmill_api/models/list_assets_response_200_item_kind.py +1 -0
  35. windmill_api/models/new_script_assets_item_kind.py +1 -0
  36. windmill_api/models/new_script_with_draft_assets_item_kind.py +1 -0
  37. windmill_api/models/new_script_with_draft_draft_assets_item_kind.py +1 -0
  38. windmill_api/models/raw_script_assets_item_kind.py +1 -0
  39. {windmill_api-1.518.2.dist-info → windmill_api-1.519.0.dist-info}/METADATA +1 -1
  40. {windmill_api-1.518.2.dist-info → windmill_api-1.519.0.dist-info}/RECORD +42 -19
  41. {windmill_api-1.518.2.dist-info → windmill_api-1.519.0.dist-info}/LICENSE +0 -0
  42. {windmill_api-1.518.2.dist-info → windmill_api-1.519.0.dist-info}/WHEEL +0 -0
@@ -15,7 +15,9 @@ def _get_kwargs(
15
15
  *,
16
16
  running: Union[Unset, None, bool] = UNSET,
17
17
  log_offset: Union[Unset, None, int] = UNSET,
18
+ stream_offset: Union[Unset, None, int] = UNSET,
18
19
  get_progress: Union[Unset, None, bool] = UNSET,
20
+ no_logs: Union[Unset, None, bool] = UNSET,
19
21
  ) -> Dict[str, Any]:
20
22
  pass
21
23
 
@@ -24,8 +26,12 @@ def _get_kwargs(
24
26
 
25
27
  params["log_offset"] = log_offset
26
28
 
29
+ params["stream_offset"] = stream_offset
30
+
27
31
  params["get_progress"] = get_progress
28
32
 
33
+ params["no_logs"] = no_logs
34
+
29
35
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
30
36
 
31
37
  return {
@@ -69,7 +75,9 @@ def sync_detailed(
69
75
  client: Union[AuthenticatedClient, Client],
70
76
  running: Union[Unset, None, bool] = UNSET,
71
77
  log_offset: Union[Unset, None, int] = UNSET,
78
+ stream_offset: Union[Unset, None, int] = UNSET,
72
79
  get_progress: Union[Unset, None, bool] = UNSET,
80
+ no_logs: Union[Unset, None, bool] = UNSET,
73
81
  ) -> Response[GetJobUpdatesResponse200]:
74
82
  """get job updates
75
83
 
@@ -78,7 +86,9 @@ def sync_detailed(
78
86
  id (str):
79
87
  running (Union[Unset, None, bool]):
80
88
  log_offset (Union[Unset, None, int]):
89
+ stream_offset (Union[Unset, None, int]):
81
90
  get_progress (Union[Unset, None, bool]):
91
+ no_logs (Union[Unset, None, bool]):
82
92
 
83
93
  Raises:
84
94
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -93,7 +103,9 @@ def sync_detailed(
93
103
  id=id,
94
104
  running=running,
95
105
  log_offset=log_offset,
106
+ stream_offset=stream_offset,
96
107
  get_progress=get_progress,
108
+ no_logs=no_logs,
97
109
  )
98
110
 
99
111
  response = client.get_httpx_client().request(
@@ -110,7 +122,9 @@ def sync(
110
122
  client: Union[AuthenticatedClient, Client],
111
123
  running: Union[Unset, None, bool] = UNSET,
112
124
  log_offset: Union[Unset, None, int] = UNSET,
125
+ stream_offset: Union[Unset, None, int] = UNSET,
113
126
  get_progress: Union[Unset, None, bool] = UNSET,
127
+ no_logs: Union[Unset, None, bool] = UNSET,
114
128
  ) -> Optional[GetJobUpdatesResponse200]:
115
129
  """get job updates
116
130
 
@@ -119,7 +133,9 @@ def sync(
119
133
  id (str):
120
134
  running (Union[Unset, None, bool]):
121
135
  log_offset (Union[Unset, None, int]):
136
+ stream_offset (Union[Unset, None, int]):
122
137
  get_progress (Union[Unset, None, bool]):
138
+ no_logs (Union[Unset, None, bool]):
123
139
 
124
140
  Raises:
125
141
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -135,7 +151,9 @@ def sync(
135
151
  client=client,
136
152
  running=running,
137
153
  log_offset=log_offset,
154
+ stream_offset=stream_offset,
138
155
  get_progress=get_progress,
156
+ no_logs=no_logs,
139
157
  ).parsed
140
158
 
141
159
 
@@ -146,7 +164,9 @@ async def asyncio_detailed(
146
164
  client: Union[AuthenticatedClient, Client],
147
165
  running: Union[Unset, None, bool] = UNSET,
148
166
  log_offset: Union[Unset, None, int] = UNSET,
167
+ stream_offset: Union[Unset, None, int] = UNSET,
149
168
  get_progress: Union[Unset, None, bool] = UNSET,
169
+ no_logs: Union[Unset, None, bool] = UNSET,
150
170
  ) -> Response[GetJobUpdatesResponse200]:
151
171
  """get job updates
152
172
 
@@ -155,7 +175,9 @@ async def asyncio_detailed(
155
175
  id (str):
156
176
  running (Union[Unset, None, bool]):
157
177
  log_offset (Union[Unset, None, int]):
178
+ stream_offset (Union[Unset, None, int]):
158
179
  get_progress (Union[Unset, None, bool]):
180
+ no_logs (Union[Unset, None, bool]):
159
181
 
160
182
  Raises:
161
183
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -170,7 +192,9 @@ async def asyncio_detailed(
170
192
  id=id,
171
193
  running=running,
172
194
  log_offset=log_offset,
195
+ stream_offset=stream_offset,
173
196
  get_progress=get_progress,
197
+ no_logs=no_logs,
174
198
  )
175
199
 
176
200
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -185,7 +209,9 @@ async def asyncio(
185
209
  client: Union[AuthenticatedClient, Client],
186
210
  running: Union[Unset, None, bool] = UNSET,
187
211
  log_offset: Union[Unset, None, int] = UNSET,
212
+ stream_offset: Union[Unset, None, int] = UNSET,
188
213
  get_progress: Union[Unset, None, bool] = UNSET,
214
+ no_logs: Union[Unset, None, bool] = UNSET,
189
215
  ) -> Optional[GetJobUpdatesResponse200]:
190
216
  """get job updates
191
217
 
@@ -194,7 +220,9 @@ async def asyncio(
194
220
  id (str):
195
221
  running (Union[Unset, None, bool]):
196
222
  log_offset (Union[Unset, None, int]):
223
+ stream_offset (Union[Unset, None, int]):
197
224
  get_progress (Union[Unset, None, bool]):
225
+ no_logs (Union[Unset, None, bool]):
198
226
 
199
227
  Raises:
200
228
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -211,6 +239,8 @@ async def asyncio(
211
239
  client=client,
212
240
  running=running,
213
241
  log_offset=log_offset,
242
+ stream_offset=stream_offset,
214
243
  get_progress=get_progress,
244
+ no_logs=no_logs,
215
245
  )
216
246
  ).parsed
@@ -16,6 +16,7 @@ def _get_kwargs(
16
16
  log_offset: Union[Unset, None, int] = UNSET,
17
17
  get_progress: Union[Unset, None, bool] = UNSET,
18
18
  only_result: Union[Unset, None, bool] = UNSET,
19
+ no_logs: Union[Unset, None, bool] = UNSET,
19
20
  ) -> Dict[str, Any]:
20
21
  pass
21
22
 
@@ -28,6 +29,8 @@ def _get_kwargs(
28
29
 
29
30
  params["only_result"] = only_result
30
31
 
32
+ params["no_logs"] = no_logs
33
+
31
34
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
32
35
 
33
36
  return {
@@ -65,6 +68,7 @@ def sync_detailed(
65
68
  log_offset: Union[Unset, None, int] = UNSET,
66
69
  get_progress: Union[Unset, None, bool] = UNSET,
67
70
  only_result: Union[Unset, None, bool] = UNSET,
71
+ no_logs: Union[Unset, None, bool] = UNSET,
68
72
  ) -> Response[Any]:
69
73
  """get job updates via server-sent events
70
74
 
@@ -75,6 +79,7 @@ def sync_detailed(
75
79
  log_offset (Union[Unset, None, int]):
76
80
  get_progress (Union[Unset, None, bool]):
77
81
  only_result (Union[Unset, None, bool]):
82
+ no_logs (Union[Unset, None, bool]):
78
83
 
79
84
  Raises:
80
85
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -91,6 +96,7 @@ def sync_detailed(
91
96
  log_offset=log_offset,
92
97
  get_progress=get_progress,
93
98
  only_result=only_result,
99
+ no_logs=no_logs,
94
100
  )
95
101
 
96
102
  response = client.get_httpx_client().request(
@@ -109,6 +115,7 @@ async def asyncio_detailed(
109
115
  log_offset: Union[Unset, None, int] = UNSET,
110
116
  get_progress: Union[Unset, None, bool] = UNSET,
111
117
  only_result: Union[Unset, None, bool] = UNSET,
118
+ no_logs: Union[Unset, None, bool] = UNSET,
112
119
  ) -> Response[Any]:
113
120
  """get job updates via server-sent events
114
121
 
@@ -119,6 +126,7 @@ async def asyncio_detailed(
119
126
  log_offset (Union[Unset, None, int]):
120
127
  get_progress (Union[Unset, None, bool]):
121
128
  only_result (Union[Unset, None, bool]):
129
+ no_logs (Union[Unset, None, bool]):
122
130
 
123
131
  Raises:
124
132
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -135,6 +143,7 @@ async def asyncio_detailed(
135
143
  log_offset=log_offset,
136
144
  get_progress=get_progress,
137
145
  only_result=only_result,
146
+ no_logs=no_logs,
138
147
  )
139
148
 
140
149
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -0,0 +1,95 @@
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
+ name: str,
13
+ ) -> Dict[str, Any]:
14
+ pass
15
+
16
+ return {
17
+ "method": "post",
18
+ "url": "/settings/create_ducklake_database/{name}".format(
19
+ name=name,
20
+ ),
21
+ }
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
25
+ if response.status_code == HTTPStatus.OK:
26
+ return None
27
+ if client.raise_on_unexpected_status:
28
+ raise errors.UnexpectedStatus(response.status_code, response.content)
29
+ else:
30
+ return None
31
+
32
+
33
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
34
+ return Response(
35
+ status_code=HTTPStatus(response.status_code),
36
+ content=response.content,
37
+ headers=response.headers,
38
+ parsed=_parse_response(client=client, response=response),
39
+ )
40
+
41
+
42
+ def sync_detailed(
43
+ name: str,
44
+ *,
45
+ client: Union[AuthenticatedClient, Client],
46
+ ) -> Response[Any]:
47
+ """Runs CREATE DATABASE on the Windmill Postgres and grants access to the ducklake_user
48
+
49
+ Args:
50
+ name (str):
51
+
52
+ Raises:
53
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
54
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
55
+
56
+ Returns:
57
+ Response[Any]
58
+ """
59
+
60
+ kwargs = _get_kwargs(
61
+ name=name,
62
+ )
63
+
64
+ response = client.get_httpx_client().request(
65
+ **kwargs,
66
+ )
67
+
68
+ return _build_response(client=client, response=response)
69
+
70
+
71
+ async def asyncio_detailed(
72
+ name: str,
73
+ *,
74
+ client: Union[AuthenticatedClient, Client],
75
+ ) -> Response[Any]:
76
+ """Runs CREATE DATABASE on the Windmill Postgres and grants access to the ducklake_user
77
+
78
+ Args:
79
+ name (str):
80
+
81
+ Raises:
82
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
83
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
84
+
85
+ Returns:
86
+ Response[Any]
87
+ """
88
+
89
+ kwargs = _get_kwargs(
90
+ name=name,
91
+ )
92
+
93
+ response = await client.get_async_httpx_client().request(**kwargs)
94
+
95
+ return _build_response(client=client, response=response)
@@ -0,0 +1,149 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union, cast
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
+ *,
13
+ json_body: List[str],
14
+ ) -> Dict[str, Any]:
15
+ pass
16
+
17
+ json_json_body = json_body
18
+
19
+ return {
20
+ "method": "post",
21
+ "url": "/settings/databases_exist",
22
+ "json": json_json_body,
23
+ }
24
+
25
+
26
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[str]]:
27
+ if response.status_code == HTTPStatus.OK:
28
+ response_200 = cast(List[str], response.json())
29
+
30
+ return response_200
31
+ if client.raise_on_unexpected_status:
32
+ raise errors.UnexpectedStatus(response.status_code, response.content)
33
+ else:
34
+ return None
35
+
36
+
37
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[str]]:
38
+ return Response(
39
+ status_code=HTTPStatus(response.status_code),
40
+ content=response.content,
41
+ headers=response.headers,
42
+ parsed=_parse_response(client=client, response=response),
43
+ )
44
+
45
+
46
+ def sync_detailed(
47
+ *,
48
+ client: Union[AuthenticatedClient, Client],
49
+ json_body: List[str],
50
+ ) -> Response[List[str]]:
51
+ """checks that all given databases exist or else return the ones that don't
52
+
53
+ Args:
54
+ json_body (List[str]):
55
+
56
+ Raises:
57
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
58
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
59
+
60
+ Returns:
61
+ Response[List[str]]
62
+ """
63
+
64
+ kwargs = _get_kwargs(
65
+ json_body=json_body,
66
+ )
67
+
68
+ response = client.get_httpx_client().request(
69
+ **kwargs,
70
+ )
71
+
72
+ return _build_response(client=client, response=response)
73
+
74
+
75
+ def sync(
76
+ *,
77
+ client: Union[AuthenticatedClient, Client],
78
+ json_body: List[str],
79
+ ) -> Optional[List[str]]:
80
+ """checks that all given databases exist or else return the ones that don't
81
+
82
+ Args:
83
+ json_body (List[str]):
84
+
85
+ Raises:
86
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
87
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
88
+
89
+ Returns:
90
+ List[str]
91
+ """
92
+
93
+ return sync_detailed(
94
+ client=client,
95
+ json_body=json_body,
96
+ ).parsed
97
+
98
+
99
+ async def asyncio_detailed(
100
+ *,
101
+ client: Union[AuthenticatedClient, Client],
102
+ json_body: List[str],
103
+ ) -> Response[List[str]]:
104
+ """checks that all given databases exist or else return the ones that don't
105
+
106
+ Args:
107
+ json_body (List[str]):
108
+
109
+ Raises:
110
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
112
+
113
+ Returns:
114
+ Response[List[str]]
115
+ """
116
+
117
+ kwargs = _get_kwargs(
118
+ json_body=json_body,
119
+ )
120
+
121
+ response = await client.get_async_httpx_client().request(**kwargs)
122
+
123
+ return _build_response(client=client, response=response)
124
+
125
+
126
+ async def asyncio(
127
+ *,
128
+ client: Union[AuthenticatedClient, Client],
129
+ json_body: List[str],
130
+ ) -> Optional[List[str]]:
131
+ """checks that all given databases exist or else return the ones that don't
132
+
133
+ Args:
134
+ json_body (List[str]):
135
+
136
+ Raises:
137
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
139
+
140
+ Returns:
141
+ List[str]
142
+ """
143
+
144
+ return (
145
+ await asyncio_detailed(
146
+ client=client,
147
+ json_body=json_body,
148
+ )
149
+ ).parsed
@@ -0,0 +1,107 @@
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.edit_ducklake_config_json_body import EditDucklakeConfigJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ json_body: EditDucklakeConfigJsonBody,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ json_json_body = json_body.to_dict()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/workspaces/edit_ducklake_config".format(
24
+ workspace=workspace,
25
+ ),
26
+ "json": json_json_body,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
31
+ if response.status_code == HTTPStatus.OK:
32
+ return None
33
+ if client.raise_on_unexpected_status:
34
+ raise errors.UnexpectedStatus(response.status_code, response.content)
35
+ else:
36
+ return None
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ workspace: str,
50
+ *,
51
+ client: Union[AuthenticatedClient, Client],
52
+ json_body: EditDucklakeConfigJsonBody,
53
+ ) -> Response[Any]:
54
+ """edit ducklake settings
55
+
56
+ Args:
57
+ workspace (str):
58
+ json_body (EditDucklakeConfigJsonBody):
59
+
60
+ Raises:
61
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
62
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
63
+
64
+ Returns:
65
+ Response[Any]
66
+ """
67
+
68
+ kwargs = _get_kwargs(
69
+ workspace=workspace,
70
+ json_body=json_body,
71
+ )
72
+
73
+ response = client.get_httpx_client().request(
74
+ **kwargs,
75
+ )
76
+
77
+ return _build_response(client=client, response=response)
78
+
79
+
80
+ async def asyncio_detailed(
81
+ workspace: str,
82
+ *,
83
+ client: Union[AuthenticatedClient, Client],
84
+ json_body: EditDucklakeConfigJsonBody,
85
+ ) -> Response[Any]:
86
+ """edit ducklake settings
87
+
88
+ Args:
89
+ workspace (str):
90
+ json_body (EditDucklakeConfigJsonBody):
91
+
92
+ Raises:
93
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
94
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
95
+
96
+ Returns:
97
+ Response[Any]
98
+ """
99
+
100
+ kwargs = _get_kwargs(
101
+ workspace=workspace,
102
+ json_body=json_body,
103
+ )
104
+
105
+ response = await client.get_async_httpx_client().request(**kwargs)
106
+
107
+ return _build_response(client=client, response=response)
@@ -0,0 +1,147 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union, cast
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
+ workspace: str,
13
+ ) -> Dict[str, Any]:
14
+ pass
15
+
16
+ return {
17
+ "method": "get",
18
+ "url": "/w/{workspace}/workspaces/list_ducklakes".format(
19
+ workspace=workspace,
20
+ ),
21
+ }
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[str]]:
25
+ if response.status_code == HTTPStatus.OK:
26
+ response_200 = cast(List[str], response.json())
27
+
28
+ return response_200
29
+ if client.raise_on_unexpected_status:
30
+ raise errors.UnexpectedStatus(response.status_code, response.content)
31
+ else:
32
+ return None
33
+
34
+
35
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[str]]:
36
+ return Response(
37
+ status_code=HTTPStatus(response.status_code),
38
+ content=response.content,
39
+ headers=response.headers,
40
+ parsed=_parse_response(client=client, response=response),
41
+ )
42
+
43
+
44
+ def sync_detailed(
45
+ workspace: str,
46
+ *,
47
+ client: Union[AuthenticatedClient, Client],
48
+ ) -> Response[List[str]]:
49
+ """list ducklakes
50
+
51
+ Args:
52
+ workspace (str):
53
+
54
+ Raises:
55
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
56
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
57
+
58
+ Returns:
59
+ Response[List[str]]
60
+ """
61
+
62
+ kwargs = _get_kwargs(
63
+ workspace=workspace,
64
+ )
65
+
66
+ response = client.get_httpx_client().request(
67
+ **kwargs,
68
+ )
69
+
70
+ return _build_response(client=client, response=response)
71
+
72
+
73
+ def sync(
74
+ workspace: str,
75
+ *,
76
+ client: Union[AuthenticatedClient, Client],
77
+ ) -> Optional[List[str]]:
78
+ """list ducklakes
79
+
80
+ Args:
81
+ workspace (str):
82
+
83
+ Raises:
84
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
85
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
86
+
87
+ Returns:
88
+ List[str]
89
+ """
90
+
91
+ return sync_detailed(
92
+ workspace=workspace,
93
+ client=client,
94
+ ).parsed
95
+
96
+
97
+ async def asyncio_detailed(
98
+ workspace: str,
99
+ *,
100
+ client: Union[AuthenticatedClient, Client],
101
+ ) -> Response[List[str]]:
102
+ """list ducklakes
103
+
104
+ Args:
105
+ workspace (str):
106
+
107
+ Raises:
108
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
109
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
110
+
111
+ Returns:
112
+ Response[List[str]]
113
+ """
114
+
115
+ kwargs = _get_kwargs(
116
+ workspace=workspace,
117
+ )
118
+
119
+ response = await client.get_async_httpx_client().request(**kwargs)
120
+
121
+ return _build_response(client=client, response=response)
122
+
123
+
124
+ async def asyncio(
125
+ workspace: str,
126
+ *,
127
+ client: Union[AuthenticatedClient, Client],
128
+ ) -> Optional[List[str]]:
129
+ """list ducklakes
130
+
131
+ Args:
132
+ workspace (str):
133
+
134
+ Raises:
135
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
136
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
137
+
138
+ Returns:
139
+ List[str]
140
+ """
141
+
142
+ return (
143
+ await asyncio_detailed(
144
+ workspace=workspace,
145
+ client=client,
146
+ )
147
+ ).parsed
@@ -2,6 +2,7 @@ from enum import Enum
2
2
 
3
3
 
4
4
  class AssetKind(str, Enum):
5
+ DUCKLAKE = "ducklake"
5
6
  RESOURCE = "resource"
6
7
  S3OBJECT = "s3object"
7
8