Skip to content

Commit 79f6d39

Browse files
feat(api): api update (#234)
1 parent a1dd9fe commit 79f6d39

7 files changed

Lines changed: 20 additions & 20 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: 32
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d1c9bf36f07cc070f3bf4c0065d35b6e310907810b819b66539be4a950536496.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-56beb98c6aa0c8bb041c5bb832d3c2a67812be83e1ff1099768e6c9b01f25e48.yml

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def with_streaming_response(self) -> DevboxesResourceWithStreamingResponse:
103103
def create(
104104
self,
105105
*,
106-
available_ports: Iterable[int] | NotGiven = NOT_GIVEN,
107106
blueprint_id: str | NotGiven = NOT_GIVEN,
108107
blueprint_name: str | NotGiven = NOT_GIVEN,
109108
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
@@ -129,9 +128,6 @@ def create(
129128
the 'pending' state and will transition to 'running' once it is ready.
130129
131130
Args:
132-
available_ports: A list of ports to make available on the Devbox. Call createTunnel to open a
133-
tunnel to the port.
134-
135131
blueprint_id: (Optional) Blueprint to use for the Devbox. If none set, the Devbox will be
136132
created with the default Runloop Devbox image.
137133
@@ -174,7 +170,6 @@ def create(
174170
"/v1/devboxes",
175171
body=maybe_transform(
176172
{
177-
"available_ports": available_ports,
178173
"blueprint_id": blueprint_id,
179174
"blueprint_name": blueprint_name,
180175
"code_mounts": code_mounts,
@@ -837,7 +832,6 @@ def with_streaming_response(self) -> AsyncDevboxesResourceWithStreamingResponse:
837832
async def create(
838833
self,
839834
*,
840-
available_ports: Iterable[int] | NotGiven = NOT_GIVEN,
841835
blueprint_id: str | NotGiven = NOT_GIVEN,
842836
blueprint_name: str | NotGiven = NOT_GIVEN,
843837
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
@@ -863,9 +857,6 @@ async def create(
863857
the 'pending' state and will transition to 'running' once it is ready.
864858
865859
Args:
866-
available_ports: A list of ports to make available on the Devbox. Call createTunnel to open a
867-
tunnel to the port.
868-
869860
blueprint_id: (Optional) Blueprint to use for the Devbox. If none set, the Devbox will be
870861
created with the default Runloop Devbox image.
871862
@@ -908,7 +899,6 @@ async def create(
908899
"/v1/devboxes",
909900
body=await async_maybe_transform(
910901
{
911-
"available_ports": available_ports,
912902
"blueprint_id": blueprint_id,
913903
"blueprint_name": blueprint_name,
914904
"code_mounts": code_mounts,

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212

1313

1414
class DevboxCreateParams(TypedDict, total=False):
15-
available_ports: Iterable[int]
16-
"""A list of ports to make available on the Devbox.
17-
18-
Call createTunnel to open a tunnel to the port.
19-
"""
20-
2115
blueprint_id: str
2216
"""(Optional) Blueprint to use for the Devbox.
2317

src/runloop_api_client/types/shared/launch_parameters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010

1111
class LaunchParameters(BaseModel):
12+
available_ports: Optional[List[int]] = None
13+
"""A list of ports to make available on the Devbox.
14+
15+
Call createTunnel to open a tunnel to the port.
16+
"""
17+
1218
keep_alive_time_seconds: Optional[int] = None
1319
"""Time in seconds after which Devbox will automatically shutdown.
1420

src/runloop_api_client/types/shared_params/launch_parameters.py

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

33
from __future__ import annotations
44

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

88
__all__ = ["LaunchParameters"]
99

1010

1111
class LaunchParameters(TypedDict, total=False):
12+
available_ports: Iterable[int]
13+
"""A list of ports to make available on the Devbox.
14+
15+
Call createTunnel to open a tunnel to the port.
16+
"""
17+
1218
keep_alive_time_seconds: int
1319
"""Time in seconds after which Devbox will automatically shutdown.
1420

tests/api_resources/test_blueprints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
5656
dockerfile="dockerfile",
5757
file_mounts={"foo": "string"},
5858
launch_parameters={
59+
"available_ports": [0, 0, 0],
5960
"keep_alive_time_seconds": 0,
6061
"launch_commands": ["string", "string", "string"],
6162
"resource_size_request": "SMALL",
@@ -232,6 +233,7 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None:
232233
dockerfile="dockerfile",
233234
file_mounts={"foo": "string"},
234235
launch_parameters={
236+
"available_ports": [0, 0, 0],
235237
"keep_alive_time_seconds": 0,
236238
"launch_commands": ["string", "string", "string"],
237239
"resource_size_request": "SMALL",
@@ -302,6 +304,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
302304
dockerfile="dockerfile",
303305
file_mounts={"foo": "string"},
304306
launch_parameters={
307+
"available_ports": [0, 0, 0],
305308
"keep_alive_time_seconds": 0,
306309
"launch_commands": ["string", "string", "string"],
307310
"resource_size_request": "SMALL",
@@ -478,6 +481,7 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop)
478481
dockerfile="dockerfile",
479482
file_mounts={"foo": "string"},
480483
launch_parameters={
484+
"available_ports": [0, 0, 0],
481485
"keep_alive_time_seconds": 0,
482486
"launch_commands": ["string", "string", "string"],
483487
"resource_size_request": "SMALL",

tests/api_resources/test_devboxes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def test_method_create(self, client: Runloop) -> None:
4242
@parametrize
4343
def test_method_create_with_all_params(self, client: Runloop) -> None:
4444
devbox = client.devboxes.create(
45-
available_ports=[0, 0, 0],
4645
blueprint_id="blueprint_id",
4746
blueprint_name="blueprint_name",
4847
code_mounts=[
@@ -69,6 +68,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
6968
environment_variables={"foo": "string"},
7069
file_mounts={"foo": "string"},
7170
launch_parameters={
71+
"available_ports": [0, 0, 0],
7272
"keep_alive_time_seconds": 0,
7373
"launch_commands": ["string", "string", "string"],
7474
"resource_size_request": "SMALL",
@@ -750,7 +750,6 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None:
750750
@parametrize
751751
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
752752
devbox = await async_client.devboxes.create(
753-
available_ports=[0, 0, 0],
754753
blueprint_id="blueprint_id",
755754
blueprint_name="blueprint_name",
756755
code_mounts=[
@@ -777,6 +776,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
777776
environment_variables={"foo": "string"},
778777
file_mounts={"foo": "string"},
779778
launch_parameters={
779+
"available_ports": [0, 0, 0],
780780
"keep_alive_time_seconds": 0,
781781
"launch_commands": ["string", "string", "string"],
782782
"resource_size_request": "SMALL",

0 commit comments

Comments
 (0)