blaxel 0.1.9rc37__py3-none-any.whl → 0.1.10__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.
Files changed (80) hide show
  1. blaxel/authentication/__init__.py +11 -2
  2. blaxel/client/api/compute/create_sandbox_preview.py +179 -0
  3. blaxel/client/api/compute/create_sandbox_preview_token.py +192 -0
  4. blaxel/client/api/compute/delete_sandbox_preview.py +167 -0
  5. blaxel/client/api/compute/delete_sandbox_preview_token.py +180 -0
  6. blaxel/client/api/compute/get_sandbox_preview.py +167 -0
  7. blaxel/client/api/compute/list_sandbox_preview_tokens.py +172 -0
  8. blaxel/client/api/compute/list_sandbox_previews.py +159 -0
  9. blaxel/client/api/compute/update_sandbox_preview.py +192 -0
  10. blaxel/client/api/integrations/get_integration.py +64 -7
  11. blaxel/client/api/workspaces/check_workspace_availability.py +165 -0
  12. blaxel/client/models/__init__.py +32 -2
  13. blaxel/client/models/check_workspace_availability_body.py +60 -0
  14. blaxel/client/models/delete_sandbox_preview_token_response_200.py +60 -0
  15. blaxel/client/models/integration.py +197 -0
  16. blaxel/client/models/integration_additional_infos.py +45 -0
  17. blaxel/client/models/integration_endpoint.py +143 -0
  18. blaxel/client/models/integration_endpoint_token.py +79 -0
  19. blaxel/client/models/integration_endpoints.py +61 -0
  20. blaxel/client/models/integration_headers.py +45 -0
  21. blaxel/client/models/integration_organization.py +88 -0
  22. blaxel/client/models/integration_query_params.py +45 -0
  23. blaxel/client/models/metrics.py +9 -0
  24. blaxel/client/models/preview.py +96 -0
  25. blaxel/client/models/preview_metadata.py +133 -0
  26. blaxel/client/models/preview_spec.py +79 -0
  27. blaxel/client/models/preview_token.py +96 -0
  28. blaxel/client/models/preview_token_metadata.py +97 -0
  29. blaxel/client/models/preview_token_spec.py +88 -0
  30. blaxel/common/autoload.py +1 -0
  31. blaxel/common/internal.py +5 -5
  32. blaxel/sandbox/base.py +68 -0
  33. blaxel/sandbox/client/__init__.py +8 -0
  34. blaxel/sandbox/client/api/__init__.py +1 -0
  35. blaxel/sandbox/client/api/filesystem/__init__.py +0 -0
  36. blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py +184 -0
  37. blaxel/sandbox/client/api/filesystem/get_filesystem_path.py +184 -0
  38. blaxel/sandbox/client/api/filesystem/put_filesystem_path.py +189 -0
  39. blaxel/sandbox/client/api/network/__init__.py +0 -0
  40. blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py +169 -0
  41. blaxel/sandbox/client/api/network/get_network_process_pid_ports.py +169 -0
  42. blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py +195 -0
  43. blaxel/sandbox/client/api/process/__init__.py +0 -0
  44. blaxel/sandbox/client/api/process/delete_process_identifier.py +163 -0
  45. blaxel/sandbox/client/api/process/delete_process_identifier_kill.py +189 -0
  46. blaxel/sandbox/client/api/process/get_process.py +135 -0
  47. blaxel/sandbox/client/api/process/get_process_identifier.py +159 -0
  48. blaxel/sandbox/client/api/process/get_process_identifier_logs.py +188 -0
  49. blaxel/sandbox/client/api/process/get_process_identifier_logs_stream.py +190 -0
  50. blaxel/sandbox/client/api/process/post_process.py +176 -0
  51. blaxel/sandbox/client/client.py +162 -0
  52. blaxel/sandbox/client/errors.py +16 -0
  53. blaxel/sandbox/client/models/__init__.py +41 -0
  54. blaxel/sandbox/client/models/delete_network_process_pid_monitor_response_200.py +45 -0
  55. blaxel/sandbox/client/models/directory.py +112 -0
  56. blaxel/sandbox/client/models/error_response.py +60 -0
  57. blaxel/sandbox/client/models/file.py +105 -0
  58. blaxel/sandbox/client/models/file_request.py +78 -0
  59. blaxel/sandbox/client/models/file_with_content.py +114 -0
  60. blaxel/sandbox/client/models/get_network_process_pid_ports_response_200.py +45 -0
  61. blaxel/sandbox/client/models/get_process_identifier_logs_response_200.py +45 -0
  62. blaxel/sandbox/client/models/get_process_identifier_logs_stream_response_200.py +45 -0
  63. blaxel/sandbox/client/models/port_monitor_request.py +60 -0
  64. blaxel/sandbox/client/models/post_network_process_pid_monitor_response_200.py +45 -0
  65. blaxel/sandbox/client/models/process_kill_request.py +60 -0
  66. blaxel/sandbox/client/models/process_request.py +118 -0
  67. blaxel/sandbox/client/models/process_response.py +123 -0
  68. blaxel/sandbox/client/models/subdirectory.py +60 -0
  69. blaxel/sandbox/client/models/success_response.py +69 -0
  70. blaxel/sandbox/client/py.typed +1 -0
  71. blaxel/sandbox/client/types.py +46 -0
  72. blaxel/sandbox/filesystem.py +104 -0
  73. blaxel/sandbox/process.py +57 -0
  74. blaxel/sandbox/sandbox.py +92 -0
  75. blaxel/tools/__init__.py +1 -1
  76. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10.dist-info}/METADATA +1 -1
  77. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10.dist-info}/RECORD +79 -12
  78. blaxel/client/models/sandboxes.py +0 -129
  79. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10.dist-info}/WHEEL +0 -0
  80. {blaxel-0.1.9rc37.dist-info → blaxel-0.1.10.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,189 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.process_kill_request import ProcessKillRequest
10
+ from ...models.success_response import SuccessResponse
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ identifier: str,
16
+ *,
17
+ body: ProcessKillRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "delete",
23
+ "url": f"/process/{identifier}/kill",
24
+ }
25
+
26
+ if type(body) == dict:
27
+ _body = body
28
+ else:
29
+ _body = body.to_dict()
30
+
31
+ _kwargs["json"] = _body
32
+ headers["Content-Type"] = "application/json"
33
+
34
+ _kwargs["headers"] = headers
35
+ return _kwargs
36
+
37
+
38
+ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[ErrorResponse, SuccessResponse]]:
39
+ if response.status_code == 200:
40
+ response_200 = SuccessResponse.from_dict(response.json())
41
+
42
+ return response_200
43
+ if response.status_code == 404:
44
+ response_404 = ErrorResponse.from_dict(response.json())
45
+
46
+ return response_404
47
+ if response.status_code == 500:
48
+ response_500 = ErrorResponse.from_dict(response.json())
49
+
50
+ return response_500
51
+ if client.raise_on_unexpected_status:
52
+ raise errors.UnexpectedStatus(response.status_code, response.content)
53
+ else:
54
+ return None
55
+
56
+
57
+ def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[ErrorResponse, SuccessResponse]]:
58
+ return Response(
59
+ status_code=HTTPStatus(response.status_code),
60
+ content=response.content,
61
+ headers=response.headers,
62
+ parsed=_parse_response(client=client, response=response),
63
+ )
64
+
65
+
66
+ def sync_detailed(
67
+ identifier: str,
68
+ *,
69
+ client: Union[Client],
70
+ body: ProcessKillRequest,
71
+ ) -> Response[Union[ErrorResponse, SuccessResponse]]:
72
+ """Kill a process
73
+
74
+ Forcefully kill a running process
75
+
76
+ Args:
77
+ identifier (str):
78
+ body (ProcessKillRequest):
79
+
80
+ Raises:
81
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
82
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
83
+
84
+ Returns:
85
+ Response[Union[ErrorResponse, SuccessResponse]]
86
+ """
87
+
88
+ kwargs = _get_kwargs(
89
+ identifier=identifier,
90
+ body=body,
91
+ )
92
+
93
+ response = client.get_httpx_client().request(
94
+ **kwargs,
95
+ )
96
+
97
+ return _build_response(client=client, response=response)
98
+
99
+
100
+ def sync(
101
+ identifier: str,
102
+ *,
103
+ client: Union[Client],
104
+ body: ProcessKillRequest,
105
+ ) -> Optional[Union[ErrorResponse, SuccessResponse]]:
106
+ """Kill a process
107
+
108
+ Forcefully kill a running process
109
+
110
+ Args:
111
+ identifier (str):
112
+ body (ProcessKillRequest):
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
+ Union[ErrorResponse, SuccessResponse]
120
+ """
121
+
122
+ return sync_detailed(
123
+ identifier=identifier,
124
+ client=client,
125
+ body=body,
126
+ ).parsed
127
+
128
+
129
+ async def asyncio_detailed(
130
+ identifier: str,
131
+ *,
132
+ client: Union[Client],
133
+ body: ProcessKillRequest,
134
+ ) -> Response[Union[ErrorResponse, SuccessResponse]]:
135
+ """Kill a process
136
+
137
+ Forcefully kill a running process
138
+
139
+ Args:
140
+ identifier (str):
141
+ body (ProcessKillRequest):
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Response[Union[ErrorResponse, SuccessResponse]]
149
+ """
150
+
151
+ kwargs = _get_kwargs(
152
+ identifier=identifier,
153
+ body=body,
154
+ )
155
+
156
+ response = await client.get_async_httpx_client().request(**kwargs)
157
+
158
+ return _build_response(client=client, response=response)
159
+
160
+
161
+ async def asyncio(
162
+ identifier: str,
163
+ *,
164
+ client: Union[Client],
165
+ body: ProcessKillRequest,
166
+ ) -> Optional[Union[ErrorResponse, SuccessResponse]]:
167
+ """Kill a process
168
+
169
+ Forcefully kill a running process
170
+
171
+ Args:
172
+ identifier (str):
173
+ body (ProcessKillRequest):
174
+
175
+ Raises:
176
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
177
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
178
+
179
+ Returns:
180
+ Union[ErrorResponse, SuccessResponse]
181
+ """
182
+
183
+ return (
184
+ await asyncio_detailed(
185
+ identifier=identifier,
186
+ client=client,
187
+ body=body,
188
+ )
189
+ ).parsed
@@ -0,0 +1,135 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.process_response import ProcessResponse
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> dict[str, Any]:
13
+ _kwargs: dict[str, Any] = {
14
+ "method": "get",
15
+ "url": "/process",
16
+ }
17
+
18
+ return _kwargs
19
+
20
+
21
+ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[list["ProcessResponse"]]:
22
+ if response.status_code == 200:
23
+ response_200 = []
24
+ _response_200 = response.json()
25
+ for response_200_item_data in _response_200:
26
+ response_200_item = ProcessResponse.from_dict(response_200_item_data)
27
+
28
+ response_200.append(response_200_item)
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: Client, response: httpx.Response) -> Response[list["ProcessResponse"]]:
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[Client],
49
+ ) -> Response[list["ProcessResponse"]]:
50
+ """List all processes
51
+
52
+ Get a list of all running and completed processes
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['ProcessResponse']]
60
+ """
61
+
62
+ kwargs = _get_kwargs()
63
+
64
+ response = client.get_httpx_client().request(
65
+ **kwargs,
66
+ )
67
+
68
+ return _build_response(client=client, response=response)
69
+
70
+
71
+ def sync(
72
+ *,
73
+ client: Union[Client],
74
+ ) -> Optional[list["ProcessResponse"]]:
75
+ """List all processes
76
+
77
+ Get a list of all running and completed processes
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
+ list['ProcessResponse']
85
+ """
86
+
87
+ return sync_detailed(
88
+ client=client,
89
+ ).parsed
90
+
91
+
92
+ async def asyncio_detailed(
93
+ *,
94
+ client: Union[Client],
95
+ ) -> Response[list["ProcessResponse"]]:
96
+ """List all processes
97
+
98
+ Get a list of all running and completed processes
99
+
100
+ Raises:
101
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
102
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
103
+
104
+ Returns:
105
+ Response[list['ProcessResponse']]
106
+ """
107
+
108
+ kwargs = _get_kwargs()
109
+
110
+ response = await client.get_async_httpx_client().request(**kwargs)
111
+
112
+ return _build_response(client=client, response=response)
113
+
114
+
115
+ async def asyncio(
116
+ *,
117
+ client: Union[Client],
118
+ ) -> Optional[list["ProcessResponse"]]:
119
+ """List all processes
120
+
121
+ Get a list of all running and completed processes
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['ProcessResponse']
129
+ """
130
+
131
+ return (
132
+ await asyncio_detailed(
133
+ client=client,
134
+ )
135
+ ).parsed
@@ -0,0 +1,159 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.process_response import ProcessResponse
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ identifier: str,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "get",
18
+ "url": f"/process/{identifier}",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[ErrorResponse, ProcessResponse]]:
25
+ if response.status_code == 200:
26
+ response_200 = ProcessResponse.from_dict(response.json())
27
+
28
+ return response_200
29
+ if response.status_code == 404:
30
+ response_404 = ErrorResponse.from_dict(response.json())
31
+
32
+ return response_404
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: Client, response: httpx.Response) -> Response[Union[ErrorResponse, ProcessResponse]]:
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
+ identifier: str,
50
+ *,
51
+ client: Union[Client],
52
+ ) -> Response[Union[ErrorResponse, ProcessResponse]]:
53
+ """Get process by identifier
54
+
55
+ Get information about a process by its PID or name
56
+
57
+ Args:
58
+ identifier (str):
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[Union[ErrorResponse, ProcessResponse]]
66
+ """
67
+
68
+ kwargs = _get_kwargs(
69
+ identifier=identifier,
70
+ )
71
+
72
+ response = client.get_httpx_client().request(
73
+ **kwargs,
74
+ )
75
+
76
+ return _build_response(client=client, response=response)
77
+
78
+
79
+ def sync(
80
+ identifier: str,
81
+ *,
82
+ client: Union[Client],
83
+ ) -> Optional[Union[ErrorResponse, ProcessResponse]]:
84
+ """Get process by identifier
85
+
86
+ Get information about a process by its PID or name
87
+
88
+ Args:
89
+ identifier (str):
90
+
91
+ Raises:
92
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
93
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
94
+
95
+ Returns:
96
+ Union[ErrorResponse, ProcessResponse]
97
+ """
98
+
99
+ return sync_detailed(
100
+ identifier=identifier,
101
+ client=client,
102
+ ).parsed
103
+
104
+
105
+ async def asyncio_detailed(
106
+ identifier: str,
107
+ *,
108
+ client: Union[Client],
109
+ ) -> Response[Union[ErrorResponse, ProcessResponse]]:
110
+ """Get process by identifier
111
+
112
+ Get information about a process by its PID or name
113
+
114
+ Args:
115
+ identifier (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[Union[ErrorResponse, ProcessResponse]]
123
+ """
124
+
125
+ kwargs = _get_kwargs(
126
+ identifier=identifier,
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
+ identifier: str,
136
+ *,
137
+ client: Union[Client],
138
+ ) -> Optional[Union[ErrorResponse, ProcessResponse]]:
139
+ """Get process by identifier
140
+
141
+ Get information about a process by its PID or name
142
+
143
+ Args:
144
+ identifier (str):
145
+
146
+ Raises:
147
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
148
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
149
+
150
+ Returns:
151
+ Union[ErrorResponse, ProcessResponse]
152
+ """
153
+
154
+ return (
155
+ await asyncio_detailed(
156
+ identifier=identifier,
157
+ client=client,
158
+ )
159
+ ).parsed
@@ -0,0 +1,188 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.get_process_identifier_logs_response_200 import GetProcessIdentifierLogsResponse200
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ identifier: str,
15
+ *,
16
+ stream: Union[Unset, bool] = UNSET,
17
+ ) -> dict[str, Any]:
18
+ params: dict[str, Any] = {}
19
+
20
+ params["stream"] = stream
21
+
22
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
23
+
24
+ _kwargs: dict[str, Any] = {
25
+ "method": "get",
26
+ "url": f"/process/{identifier}/logs",
27
+ "params": params,
28
+ }
29
+
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: Client, response: httpx.Response
35
+ ) -> Optional[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
36
+ if response.status_code == 200:
37
+ response_200 = GetProcessIdentifierLogsResponse200.from_dict(response.json())
38
+
39
+ return response_200
40
+ if response.status_code == 404:
41
+ response_404 = ErrorResponse.from_dict(response.json())
42
+
43
+ return response_404
44
+ if response.status_code == 500:
45
+ response_500 = ErrorResponse.from_dict(response.json())
46
+
47
+ return response_500
48
+ if client.raise_on_unexpected_status:
49
+ raise errors.UnexpectedStatus(response.status_code, response.content)
50
+ else:
51
+ return None
52
+
53
+
54
+ def _build_response(
55
+ *, client: Client, response: httpx.Response
56
+ ) -> Response[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
57
+ return Response(
58
+ status_code=HTTPStatus(response.status_code),
59
+ content=response.content,
60
+ headers=response.headers,
61
+ parsed=_parse_response(client=client, response=response),
62
+ )
63
+
64
+
65
+ def sync_detailed(
66
+ identifier: str,
67
+ *,
68
+ client: Union[Client],
69
+ stream: Union[Unset, bool] = UNSET,
70
+ ) -> Response[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
71
+ """Get process logs
72
+
73
+ Get the stdout and stderr output of a process
74
+
75
+ Args:
76
+ identifier (str):
77
+ stream (Union[Unset, bool]):
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[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ identifier=identifier,
89
+ stream=stream,
90
+ )
91
+
92
+ response = client.get_httpx_client().request(
93
+ **kwargs,
94
+ )
95
+
96
+ return _build_response(client=client, response=response)
97
+
98
+
99
+ def sync(
100
+ identifier: str,
101
+ *,
102
+ client: Union[Client],
103
+ stream: Union[Unset, bool] = UNSET,
104
+ ) -> Optional[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
105
+ """Get process logs
106
+
107
+ Get the stdout and stderr output of a process
108
+
109
+ Args:
110
+ identifier (str):
111
+ stream (Union[Unset, bool]):
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[ErrorResponse, GetProcessIdentifierLogsResponse200]
119
+ """
120
+
121
+ return sync_detailed(
122
+ identifier=identifier,
123
+ client=client,
124
+ stream=stream,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ identifier: str,
130
+ *,
131
+ client: Union[Client],
132
+ stream: Union[Unset, bool] = UNSET,
133
+ ) -> Response[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
134
+ """Get process logs
135
+
136
+ Get the stdout and stderr output of a process
137
+
138
+ Args:
139
+ identifier (str):
140
+ stream (Union[Unset, bool]):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Response[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]
148
+ """
149
+
150
+ kwargs = _get_kwargs(
151
+ identifier=identifier,
152
+ stream=stream,
153
+ )
154
+
155
+ response = await client.get_async_httpx_client().request(**kwargs)
156
+
157
+ return _build_response(client=client, response=response)
158
+
159
+
160
+ async def asyncio(
161
+ identifier: str,
162
+ *,
163
+ client: Union[Client],
164
+ stream: Union[Unset, bool] = UNSET,
165
+ ) -> Optional[Union[ErrorResponse, GetProcessIdentifierLogsResponse200]]:
166
+ """Get process logs
167
+
168
+ Get the stdout and stderr output of a process
169
+
170
+ Args:
171
+ identifier (str):
172
+ stream (Union[Unset, bool]):
173
+
174
+ Raises:
175
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
177
+
178
+ Returns:
179
+ Union[ErrorResponse, GetProcessIdentifierLogsResponse200]
180
+ """
181
+
182
+ return (
183
+ await asyncio_detailed(
184
+ identifier=identifier,
185
+ client=client,
186
+ stream=stream,
187
+ )
188
+ ).parsed