Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-1fdc9bae4fba7d365eca69915191a06ab5b0faec74f80404339e92cba37036f7.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ad7847a96db411953d1b7601aa60c0da482335255dd581c26b04d533cc99d930.yml
10 changes: 1 addition & 9 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Methods:
- <code title="post /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">create</a>(\*\*<a href="src/runloop_api_client/types/devbox_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
- <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>
- <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>
- <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_execution_detail_view.py">DevboxExecutionDetailView</a></code>
- <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>
- <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>

## Logs
Expand Down Expand Up @@ -60,14 +60,6 @@ Methods:
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">list</a>() -> <a href="./src/runloop_api_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/kill_operation_response.py">object</a></code>

### Spans

Types:

```python
from runloop_api_client.types.functions.invocations import InvocationSpanListView
```

# Projects

Types:
Expand Down
10 changes: 9 additions & 1 deletion src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
from ...types import devbox_list_params, devbox_create_params
from ...types import devbox_list_params, devbox_create_params, devbox_execute_sync_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
Expand Down Expand Up @@ -185,6 +185,7 @@ def execute_sync(
self,
id: str,
*,
command: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -196,6 +197,8 @@ def execute_sync(
Synchronously execute a command on a devbox

Args:
command: The command to execute on the Devbox.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -208,6 +211,7 @@ def execute_sync(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._post(
f"/v1/devboxes/{id}/execute_sync",
body=maybe_transform({"command": command}, devbox_execute_sync_params.DevboxExecuteSyncParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -396,6 +400,7 @@ async def execute_sync(
self,
id: str,
*,
command: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -407,6 +412,8 @@ async def execute_sync(
Synchronously execute a command on a devbox

Args:
command: The command to execute on the Devbox.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -419,6 +426,7 @@ async def execute_sync(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._post(
f"/v1/devboxes/{id}/execute_sync",
body=await async_maybe_transform({"command": command}, devbox_execute_sync_params.DevboxExecuteSyncParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
1 change: 1 addition & 0 deletions src/runloop_api_client/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .devbox_list_params import DevboxListParams as DevboxListParams
from .function_list_view import FunctionListView as FunctionListView
from .devbox_create_params import DevboxCreateParams as DevboxCreateParams
from .devbox_execute_sync_params import DevboxExecuteSyncParams as DevboxExecuteSyncParams
from .function_invoke_sync_params import FunctionInvokeSyncParams as FunctionInvokeSyncParams
from .devbox_execution_detail_view import DevboxExecutionDetailView as DevboxExecutionDetailView
from .function_invoke_async_params import FunctionInvokeAsyncParams as FunctionInvokeAsyncParams
12 changes: 12 additions & 0 deletions src/runloop_api_client/types/devbox_execute_sync_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import TypedDict

__all__ = ["DevboxExecuteSyncParams"]


class DevboxExecuteSyncParams(TypedDict, total=False):
command: str
"""The command to execute on the Devbox."""
16 changes: 16 additions & 0 deletions tests/api_resources/test_devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ def test_method_execute_sync(self, client: Runloop) -> None:
)
assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"])

@parametrize
def test_method_execute_sync_with_all_params(self, client: Runloop) -> None:
devbox = client.devboxes.execute_sync(
"string",
command="string",
)
assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"])

@parametrize
def test_raw_response_execute_sync(self, client: Runloop) -> None:
response = client.devboxes.with_raw_response.execute_sync(
Expand Down Expand Up @@ -318,6 +326,14 @@ async def test_method_execute_sync(self, async_client: AsyncRunloop) -> None:
)
assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"])

@parametrize
async def test_method_execute_sync_with_all_params(self, async_client: AsyncRunloop) -> None:
devbox = await async_client.devboxes.execute_sync(
"string",
command="string",
)
assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"])

@parametrize
async def test_raw_response_execute_sync(self, async_client: AsyncRunloop) -> None:
response = await async_client.devboxes.with_raw_response.execute_sync(
Expand Down