Skip to content

Commit 0924c18

Browse files
authored
Merge pull request #140 from runloopai/release-please--branches--main--changes--next
release: 0.1.0-alpha.19
2 parents 8d6dac2 + ca6087e commit 0924c18

File tree

14 files changed

+270
-19
lines changed

14 files changed

+270
-19
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.18"
2+
".": "0.1.0-alpha.19"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6f0c5d11d068264882131101603e33a7d1574db90f3de9b7777f02dbd4649954.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f604aab9dce4ace8553e47c1fba2785330184e2b57ef594de0ac6e4027b9fd66.yml

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.1.0-alpha.19 (2024-08-28)
4+
5+
Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
6+
7+
### Features
8+
9+
* **api:** OpenAPI spec update via Stainless API ([#139](https://github.com/runloopai/api-client-python/issues/139)) ([f359981](https://github.com/runloopai/api-client-python/commit/f359981163f1358b9556c53a5f72e9cbe5a56a81))
10+
* **api:** OpenAPI spec update via Stainless API ([#141](https://github.com/runloopai/api-client-python/issues/141)) ([ebd75f4](https://github.com/runloopai/api-client-python/commit/ebd75f4c3e4348e01cb107a77d92477d0906329a))
11+
312
## 0.1.0-alpha.18 (2024-08-28)
413

514
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)

api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Methods:
6565
- <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
6666
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop_api_client/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_list_view.py">DevboxListView</a></code>
6767
- <code title="post /v1/devboxes/{id}/create_ssh_key">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">create_ssh_key</a>(id) -> <a href="./src/runloop_api_client/types/devbox_create_ssh_key_response.py">DevboxCreateSSHKeyResponse</a></code>
68-
- <code title="post /v1/devboxes/{id}/executions/execute_async">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
68+
- <code title="post /v1/devboxes/{id}/execute_async">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
6969
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
7070
- <code title="post /v1/devboxes/{id}/read_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_read_file_contents_params.py">params</a>) -> str</code>
7171
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
@@ -82,13 +82,14 @@ from runloop_api_client.types.devboxes import DevboxLogsListView
8282

8383
Methods:
8484

85-
- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop_api_client/resources/devboxes/logs.py">list</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
85+
- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop_api_client/resources/devboxes/logs.py">list</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/log_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
8686

8787
## Executions
8888

8989
Methods:
9090

9191
- <code title="get /v1/devboxes/{id}/executions/{execution_id}">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">retrieve</a>(execution_id, \*, id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_retrieve_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
92+
- <code title="post /v1/devboxes/{id}/execute_async">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
9293
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
9394
- <code title="post /v1/devboxes/{id}/executions/{execution_id}/kill">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">kill</a>(execution_id, \*, id) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
9495

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "runloop_api_client"
3-
version = "0.1.0-alpha.18"
3+
version = "0.1.0-alpha.19"
44
description = "The official Python library for the runloop API"
55
dynamic = ["readme"]
66
license = "MIT"

src/runloop_api_client/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "runloop_api_client"
4-
__version__ = "0.1.0-alpha.18" # x-release-please-version
4+
__version__ = "0.1.0-alpha.19" # x-release-please-version

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def execute_async(
300300
if not id:
301301
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
302302
return self._post(
303-
f"/v1/devboxes/{id}/executions/execute_async",
303+
f"/v1/devboxes/{id}/execute_async",
304304
body=maybe_transform({"command": command}, devbox_execute_async_params.DevboxExecuteAsyncParams),
305305
options=make_request_options(
306306
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -758,7 +758,7 @@ async def execute_async(
758758
if not id:
759759
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
760760
return await self._post(
761-
f"/v1/devboxes/{id}/executions/execute_async",
761+
f"/v1/devboxes/{id}/execute_async",
762762
body=await async_maybe_transform(
763763
{"command": command}, devbox_execute_async_params.DevboxExecuteAsyncParams
764764
),

src/runloop_api_client/resources/devboxes/executions.py

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
async_to_streamed_response_wrapper,
1919
)
2020
from ..._base_client import make_request_options
21-
from ...types.devboxes import execution_retrieve_params, execution_execute_sync_params
21+
from ...types.devboxes import execution_retrieve_params, execution_execute_sync_params, execution_execute_async_params
2222
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
2323
from ...types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
2424

@@ -77,6 +77,43 @@ def retrieve(
7777
cast_to=DevboxAsyncExecutionDetailView,
7878
)
7979

80+
def execute_async(
81+
self,
82+
id: str,
83+
*,
84+
command: str | NotGiven = NOT_GIVEN,
85+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
86+
# The extra values given here take precedence over values defined on the client or passed to this method.
87+
extra_headers: Headers | None = None,
88+
extra_query: Query | None = None,
89+
extra_body: Body | None = None,
90+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
91+
) -> DevboxAsyncExecutionDetailView:
92+
"""
93+
Asynchronously execute a command on a devbox
94+
95+
Args:
96+
command: The command to execute on the Devbox.
97+
98+
extra_headers: Send extra headers
99+
100+
extra_query: Add additional query parameters to the request
101+
102+
extra_body: Add additional JSON properties to the request
103+
104+
timeout: Override the client-level default timeout for this request, in seconds
105+
"""
106+
if not id:
107+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
108+
return self._post(
109+
f"/v1/devboxes/{id}/execute_async",
110+
body=maybe_transform({"command": command}, execution_execute_async_params.ExecutionExecuteAsyncParams),
111+
options=make_request_options(
112+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
113+
),
114+
cast_to=DevboxAsyncExecutionDetailView,
115+
)
116+
80117
def execute_sync(
81118
self,
82119
id: str,
@@ -205,6 +242,45 @@ async def retrieve(
205242
cast_to=DevboxAsyncExecutionDetailView,
206243
)
207244

245+
async def execute_async(
246+
self,
247+
id: str,
248+
*,
249+
command: str | NotGiven = NOT_GIVEN,
250+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
251+
# The extra values given here take precedence over values defined on the client or passed to this method.
252+
extra_headers: Headers | None = None,
253+
extra_query: Query | None = None,
254+
extra_body: Body | None = None,
255+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
256+
) -> DevboxAsyncExecutionDetailView:
257+
"""
258+
Asynchronously execute a command on a devbox
259+
260+
Args:
261+
command: The command to execute on the Devbox.
262+
263+
extra_headers: Send extra headers
264+
265+
extra_query: Add additional query parameters to the request
266+
267+
extra_body: Add additional JSON properties to the request
268+
269+
timeout: Override the client-level default timeout for this request, in seconds
270+
"""
271+
if not id:
272+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
273+
return await self._post(
274+
f"/v1/devboxes/{id}/execute_async",
275+
body=await async_maybe_transform(
276+
{"command": command}, execution_execute_async_params.ExecutionExecuteAsyncParams
277+
),
278+
options=make_request_options(
279+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
280+
),
281+
cast_to=DevboxAsyncExecutionDetailView,
282+
)
283+
208284
async def execute_sync(
209285
self,
210286
id: str,
@@ -288,6 +364,9 @@ def __init__(self, executions: ExecutionsResource) -> None:
288364
self.retrieve = to_raw_response_wrapper(
289365
executions.retrieve,
290366
)
367+
self.execute_async = to_raw_response_wrapper(
368+
executions.execute_async,
369+
)
291370
self.execute_sync = to_raw_response_wrapper(
292371
executions.execute_sync,
293372
)
@@ -303,6 +382,9 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
303382
self.retrieve = async_to_raw_response_wrapper(
304383
executions.retrieve,
305384
)
385+
self.execute_async = async_to_raw_response_wrapper(
386+
executions.execute_async,
387+
)
306388
self.execute_sync = async_to_raw_response_wrapper(
307389
executions.execute_sync,
308390
)
@@ -318,6 +400,9 @@ def __init__(self, executions: ExecutionsResource) -> None:
318400
self.retrieve = to_streamed_response_wrapper(
319401
executions.retrieve,
320402
)
403+
self.execute_async = to_streamed_response_wrapper(
404+
executions.execute_async,
405+
)
321406
self.execute_sync = to_streamed_response_wrapper(
322407
executions.execute_sync,
323408
)
@@ -333,6 +418,9 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
333418
self.retrieve = async_to_streamed_response_wrapper(
334419
executions.retrieve,
335420
)
421+
self.execute_async = async_to_streamed_response_wrapper(
422+
executions.execute_async,
423+
)
336424
self.execute_sync = async_to_streamed_response_wrapper(
337425
executions.execute_sync,
338426
)

src/runloop_api_client/resources/devboxes/logs.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import httpx
66

77
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8+
from ..._utils import (
9+
maybe_transform,
10+
async_maybe_transform,
11+
)
812
from ..._compat import cached_property
913
from ..._resource import SyncAPIResource, AsyncAPIResource
1014
from ..._response import (
@@ -14,6 +18,7 @@
1418
async_to_streamed_response_wrapper,
1519
)
1620
from ..._base_client import make_request_options
21+
from ...types.devboxes import log_list_params
1722
from ...types.devboxes.devbox_logs_list_view import DevboxLogsListView
1823

1924
__all__ = ["LogsResource", "AsyncLogsResource"]
@@ -32,6 +37,7 @@ def list(
3237
self,
3338
id: str,
3439
*,
40+
execution_id: str | NotGiven = NOT_GIVEN,
3541
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3642
# The extra values given here take precedence over values defined on the client or passed to this method.
3743
extra_headers: Headers | None = None,
@@ -43,6 +49,8 @@ def list(
4349
Get all logs from a Devbox by id.
4450
4551
Args:
52+
execution_id: Id of execution to filter logs by.
53+
4654
extra_headers: Send extra headers
4755
4856
extra_query: Add additional query parameters to the request
@@ -56,7 +64,11 @@ def list(
5664
return self._get(
5765
f"/v1/devboxes/{id}/logs",
5866
options=make_request_options(
59-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
67+
extra_headers=extra_headers,
68+
extra_query=extra_query,
69+
extra_body=extra_body,
70+
timeout=timeout,
71+
query=maybe_transform({"execution_id": execution_id}, log_list_params.LogListParams),
6072
),
6173
cast_to=DevboxLogsListView,
6274
)
@@ -75,6 +87,7 @@ async def list(
7587
self,
7688
id: str,
7789
*,
90+
execution_id: str | NotGiven = NOT_GIVEN,
7891
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7992
# The extra values given here take precedence over values defined on the client or passed to this method.
8093
extra_headers: Headers | None = None,
@@ -86,6 +99,8 @@ async def list(
8699
Get all logs from a Devbox by id.
87100
88101
Args:
102+
execution_id: Id of execution to filter logs by.
103+
89104
extra_headers: Send extra headers
90105
91106
extra_query: Add additional query parameters to the request
@@ -99,7 +114,11 @@ async def list(
99114
return await self._get(
100115
f"/v1/devboxes/{id}/logs",
101116
options=make_request_options(
102-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
117+
extra_headers=extra_headers,
118+
extra_query=extra_query,
119+
extra_body=extra_body,
120+
timeout=timeout,
121+
query=await async_maybe_transform({"execution_id": execution_id}, log_list_params.LogListParams),
103122
),
104123
cast_to=DevboxLogsListView,
105124
)

src/runloop_api_client/types/devboxes/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from .log_list_params import LogListParams as LogListParams
56
from .devbox_logs_list_view import DevboxLogsListView as DevboxLogsListView
67
from .execution_retrieve_params import ExecutionRetrieveParams as ExecutionRetrieveParams
78
from .execution_execute_sync_params import ExecutionExecuteSyncParams as ExecutionExecuteSyncParams
9+
from .execution_execute_async_params import ExecutionExecuteAsyncParams as ExecutionExecuteAsyncParams

0 commit comments

Comments
 (0)