Skip to content

Commit e6350ec

Browse files
stainless-app[bot]Stainless Bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#154)
1 parent 39ffb90 commit e6350ec

4 files changed

Lines changed: 56 additions & 3 deletions

File tree

.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-8e083622d148034420e27803d50f4f4021f9ffdc16603cf283091f760e5fb31b.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-e5814f43206695e4828bf231b12d995986b9e8e638e9075ebe104de68b2a29a4.yml

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, List, Mapping, cast
5+
from typing import Dict, List, Mapping, Iterable, cast
66

77
import httpx
88

@@ -49,6 +49,7 @@
4949
from ..._base_client import make_request_options
5050
from ...types.devbox_view import DevboxView
5151
from ...types.devbox_list_view import DevboxListView
52+
from ...types.code_mount_parameters_param import CodeMountParametersParam
5253
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
5354
from ...types.devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse
5455
from ...types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
@@ -78,6 +79,7 @@ def create(
7879
*,
7980
blueprint_id: str | NotGiven = NOT_GIVEN,
8081
blueprint_name: str | NotGiven = NOT_GIVEN,
82+
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
8183
entrypoint: str | NotGiven = NOT_GIVEN,
8284
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
8385
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
@@ -104,6 +106,8 @@ def create(
104106
blueprint_name: (Optional) Name of Blueprint to use for the Devbox. When set, this will load the
105107
latest successfully built Blueprint with the given name.
106108
109+
code_mounts: A list of code mounts to be included in the Devbox.
110+
107111
entrypoint: (Optional) When specified, the Devbox will run this script as its main
108112
executable. The devbox lifecycle will be bound to entrypoint, shutting down when
109113
the process is complete.
@@ -136,6 +140,7 @@ def create(
136140
{
137141
"blueprint_id": blueprint_id,
138142
"blueprint_name": blueprint_name,
143+
"code_mounts": code_mounts,
139144
"entrypoint": entrypoint,
140145
"environment_variables": environment_variables,
141146
"file_mounts": file_mounts,
@@ -554,6 +559,7 @@ async def create(
554559
*,
555560
blueprint_id: str | NotGiven = NOT_GIVEN,
556561
blueprint_name: str | NotGiven = NOT_GIVEN,
562+
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
557563
entrypoint: str | NotGiven = NOT_GIVEN,
558564
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
559565
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
@@ -580,6 +586,8 @@ async def create(
580586
blueprint_name: (Optional) Name of Blueprint to use for the Devbox. When set, this will load the
581587
latest successfully built Blueprint with the given name.
582588
589+
code_mounts: A list of code mounts to be included in the Devbox.
590+
583591
entrypoint: (Optional) When specified, the Devbox will run this script as its main
584592
executable. The devbox lifecycle will be bound to entrypoint, shutting down when
585593
the process is complete.
@@ -612,6 +620,7 @@ async def create(
612620
{
613621
"blueprint_id": blueprint_id,
614622
"blueprint_name": blueprint_name,
623+
"code_mounts": code_mounts,
615624
"entrypoint": entrypoint,
616625
"environment_variables": environment_variables,
617626
"file_mounts": file_mounts,

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, List
5+
from typing import Dict, List, Iterable
66
from typing_extensions import TypedDict
77

88
from .resource_size import ResourceSize
9+
from .code_mount_parameters_param import CodeMountParametersParam
910

1011
__all__ = ["DevboxCreateParams", "LaunchParameters"]
1112

@@ -24,6 +25,9 @@ class DevboxCreateParams(TypedDict, total=False):
2425
name.
2526
"""
2627

28+
code_mounts: Iterable[CodeMountParametersParam]
29+
"""A list of code mounts to be included in the Devbox."""
30+
2731
entrypoint: str
2832
"""
2933
(Optional) When specified, the Devbox will run this script as its main

tests/api_resources/test_devboxes.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
3333
devbox = client.devboxes.create(
3434
blueprint_id="blueprint_id",
3535
blueprint_name="blueprint_name",
36+
code_mounts=[
37+
{
38+
"token": "token",
39+
"install_command": "install_command",
40+
"repo_name": "repo_name",
41+
"repo_owner": "repo_owner",
42+
},
43+
{
44+
"token": "token",
45+
"install_command": "install_command",
46+
"repo_name": "repo_name",
47+
"repo_owner": "repo_owner",
48+
},
49+
{
50+
"token": "token",
51+
"install_command": "install_command",
52+
"repo_name": "repo_name",
53+
"repo_owner": "repo_owner",
54+
},
55+
],
3656
entrypoint="entrypoint",
3757
environment_variables={"foo": "string"},
3858
file_mounts={"foo": "string"},
@@ -463,6 +483,26 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
463483
devbox = await async_client.devboxes.create(
464484
blueprint_id="blueprint_id",
465485
blueprint_name="blueprint_name",
486+
code_mounts=[
487+
{
488+
"token": "token",
489+
"install_command": "install_command",
490+
"repo_name": "repo_name",
491+
"repo_owner": "repo_owner",
492+
},
493+
{
494+
"token": "token",
495+
"install_command": "install_command",
496+
"repo_name": "repo_name",
497+
"repo_owner": "repo_owner",
498+
},
499+
{
500+
"token": "token",
501+
"install_command": "install_command",
502+
"repo_name": "repo_name",
503+
"repo_owner": "repo_owner",
504+
},
505+
],
466506
entrypoint="entrypoint",
467507
environment_variables={"foo": "string"},
468508
file_mounts={"foo": "string"},

0 commit comments

Comments
 (0)