Skip to content

Commit 104af9f

Browse files
feat(api): api update
1 parent b01847c commit 104af9f

10 files changed

Lines changed: 115 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 100
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-feb1c5fb18adf1bfc11f6fc7ee95f08a319ce4a504c34c68dee66f090f69a70c.yml
3-
openapi_spec_hash: 758379882a3c4bf49f3ded6ac065a604
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6056b68db5d556977ff43e18d58b7ab073fca5ceb8c7204326895bc37618a0e2.yml
3+
openapi_spec_hash: 093289672abcf8bb4d4d1eca424012bc
44
config_hash: b97411af91b8ec0b8b066358c29091b4

src/runloop_api_client/resources/blueprints.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def create(
7777
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
7878
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
7979
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
80+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
8081
services: Optional[Iterable[blueprint_create_params.Service]] | NotGiven = NOT_GIVEN,
8182
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
8283
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -108,6 +109,8 @@ def create(
108109
109110
launch_parameters: Parameters to configure your Devbox at launch time.
110111
112+
metadata: (Optional) User defined metadata for the Blueprint.
113+
111114
services: (Optional) List of containerized services to include in the Blueprint. These
112115
services will be pre-pulled during the build phase for optimized startup
113116
performance.
@@ -134,6 +137,7 @@ def create(
134137
"dockerfile": dockerfile,
135138
"file_mounts": file_mounts,
136139
"launch_parameters": launch_parameters,
140+
"metadata": metadata,
137141
"services": services,
138142
"system_setup_commands": system_setup_commands,
139143
},
@@ -472,6 +476,7 @@ def preview(
472476
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
473477
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
474478
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
479+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
475480
services: Optional[Iterable[blueprint_preview_params.Service]] | NotGiven = NOT_GIVEN,
476481
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
477482
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -501,6 +506,8 @@ def preview(
501506
502507
launch_parameters: Parameters to configure your Devbox at launch time.
503508
509+
metadata: (Optional) User defined metadata for the Blueprint.
510+
504511
services: (Optional) List of containerized services to include in the Blueprint. These
505512
services will be pre-pulled during the build phase for optimized startup
506513
performance.
@@ -527,6 +534,7 @@ def preview(
527534
"dockerfile": dockerfile,
528535
"file_mounts": file_mounts,
529536
"launch_parameters": launch_parameters,
537+
"metadata": metadata,
530538
"services": services,
531539
"system_setup_commands": system_setup_commands,
532540
},
@@ -572,6 +580,7 @@ async def create(
572580
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
573581
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
574582
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
583+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
575584
services: Optional[Iterable[blueprint_create_params.Service]] | NotGiven = NOT_GIVEN,
576585
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
577586
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -603,6 +612,8 @@ async def create(
603612
604613
launch_parameters: Parameters to configure your Devbox at launch time.
605614
615+
metadata: (Optional) User defined metadata for the Blueprint.
616+
606617
services: (Optional) List of containerized services to include in the Blueprint. These
607618
services will be pre-pulled during the build phase for optimized startup
608619
performance.
@@ -629,6 +640,7 @@ async def create(
629640
"dockerfile": dockerfile,
630641
"file_mounts": file_mounts,
631642
"launch_parameters": launch_parameters,
643+
"metadata": metadata,
632644
"services": services,
633645
"system_setup_commands": system_setup_commands,
634646
},
@@ -967,6 +979,7 @@ async def preview(
967979
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
968980
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
969981
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
982+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
970983
services: Optional[Iterable[blueprint_preview_params.Service]] | NotGiven = NOT_GIVEN,
971984
system_setup_commands: Optional[List[str]] | NotGiven = NOT_GIVEN,
972985
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -996,6 +1009,8 @@ async def preview(
9961009
9971010
launch_parameters: Parameters to configure your Devbox at launch time.
9981011
1012+
metadata: (Optional) User defined metadata for the Blueprint.
1013+
9991014
services: (Optional) List of containerized services to include in the Blueprint. These
10001015
services will be pre-pulled during the build phase for optimized startup
10011016
performance.
@@ -1022,6 +1037,7 @@ async def preview(
10221037
"dockerfile": dockerfile,
10231038
"file_mounts": file_mounts,
10241039
"launch_parameters": launch_parameters,
1040+
"metadata": metadata,
10251041
"services": services,
10261042
"system_setup_commands": system_setup_commands,
10271043
},

src/runloop_api_client/types/blueprint_build_parameters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class BlueprintBuildParameters(BaseModel):
6262
launch_parameters: Optional[LaunchParameters] = None
6363
"""Parameters to configure your Devbox at launch time."""
6464

65+
metadata: Optional[Dict[str, str]] = None
66+
"""(Optional) User defined metadata for the Blueprint."""
67+
6568
services: Optional[List[Service]] = None
6669
"""(Optional) List of containerized services to include in the Blueprint.
6770

src/runloop_api_client/types/blueprint_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class BlueprintCreateParams(TypedDict, total=False):
3333
launch_parameters: Optional[LaunchParameters]
3434
"""Parameters to configure your Devbox at launch time."""
3535

36+
metadata: Optional[Dict[str, str]]
37+
"""(Optional) User defined metadata for the Blueprint."""
38+
3639
services: Optional[Iterable[Service]]
3740
"""(Optional) List of containerized services to include in the Blueprint.
3841

src/runloop_api_client/types/blueprint_preview_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class BlueprintPreviewParams(TypedDict, total=False):
3333
launch_parameters: Optional[LaunchParameters]
3434
"""Parameters to configure your Devbox at launch time."""
3535

36+
metadata: Optional[Dict[str, str]]
37+
"""(Optional) User defined metadata for the Blueprint."""
38+
3639
services: Optional[Iterable[Service]]
3740
"""(Optional) List of containerized services to include in the Blueprint.
3841

src/runloop_api_client/types/shared/run_profile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pydantic import Field as FieldInfo
66

77
from ..._models import BaseModel
8+
from .launch_parameters import LaunchParameters
89

910
__all__ = ["RunProfile"]
1011

@@ -17,6 +18,9 @@ class RunProfile(BaseModel):
1718
set the environment variable 'DB_PASS' to the value 'DATABASE_PASSWORD_VALUE'.
1819
"""
1920

21+
launch_parameters: Optional[LaunchParameters] = FieldInfo(alias="launchParameters", default=None)
22+
"""Additional runtime LaunchParameters to apply after the devbox starts."""
23+
2024
purpose: Optional[str] = None
2125
"""Purpose of the run."""
2226

src/runloop_api_client/types/shared_params/run_profile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing_extensions import Annotated, TypedDict
77

88
from ..._utils import PropertyInfo
9+
from .launch_parameters import LaunchParameters
910

1011
__all__ = ["RunProfile"]
1112

@@ -18,6 +19,9 @@ class RunProfile(TypedDict, total=False):
1819
set the environment variable 'DB_PASS' to the value 'DATABASE_PASSWORD_VALUE'.
1920
"""
2021

22+
launch_parameters: Annotated[Optional[LaunchParameters], PropertyInfo(alias="launchParameters")]
23+
"""Additional runtime LaunchParameters to apply after the devbox starts."""
24+
2125
purpose: Optional[str]
2226
"""Purpose of the run."""
2327

tests/api_resources/test_benchmarks.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,25 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None:
288288
run_name="run_name",
289289
run_profile={
290290
"env_vars": {"foo": "string"},
291+
"launch_parameters": {
292+
"after_idle": {
293+
"idle_time_seconds": 0,
294+
"on_idle": "shutdown",
295+
},
296+
"architecture": "x86_64",
297+
"available_ports": [0],
298+
"custom_cpu_cores": 0,
299+
"custom_disk_size": 0,
300+
"custom_gb_memory": 0,
301+
"keep_alive_time_seconds": 0,
302+
"launch_commands": ["string"],
303+
"required_services": ["string"],
304+
"resource_size_request": "X_SMALL",
305+
"user_parameters": {
306+
"uid": 0,
307+
"username": "username",
308+
},
309+
},
291310
"purpose": "purpose",
292311
"secrets": {"foo": "string"},
293312
},
@@ -590,6 +609,25 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop
590609
run_name="run_name",
591610
run_profile={
592611
"env_vars": {"foo": "string"},
612+
"launch_parameters": {
613+
"after_idle": {
614+
"idle_time_seconds": 0,
615+
"on_idle": "shutdown",
616+
},
617+
"architecture": "x86_64",
618+
"available_ports": [0],
619+
"custom_cpu_cores": 0,
620+
"custom_disk_size": 0,
621+
"custom_gb_memory": 0,
622+
"keep_alive_time_seconds": 0,
623+
"launch_commands": ["string"],
624+
"required_services": ["string"],
625+
"resource_size_request": "X_SMALL",
626+
"user_parameters": {
627+
"uid": 0,
628+
"username": "username",
629+
},
630+
},
593631
"purpose": "purpose",
594632
"secrets": {"foo": "string"},
595633
},

tests/api_resources/test_blueprints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
6363
"username": "username",
6464
},
6565
},
66+
metadata={"foo": "string"},
6667
services=[
6768
{
6869
"image": "image",
@@ -327,6 +328,7 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None:
327328
"username": "username",
328329
},
329330
},
331+
metadata={"foo": "string"},
330332
services=[
331333
{
332334
"image": "image",
@@ -415,6 +417,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
415417
"username": "username",
416418
},
417419
},
420+
metadata={"foo": "string"},
418421
services=[
419422
{
420423
"image": "image",
@@ -679,6 +682,7 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop)
679682
"username": "username",
680683
},
681684
},
685+
metadata={"foo": "string"},
682686
services=[
683687
{
684688
"image": "image",

tests/api_resources/test_scenarios.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,25 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None:
364364
run_name="run_name",
365365
run_profile={
366366
"env_vars": {"foo": "string"},
367+
"launch_parameters": {
368+
"after_idle": {
369+
"idle_time_seconds": 0,
370+
"on_idle": "shutdown",
371+
},
372+
"architecture": "x86_64",
373+
"available_ports": [0],
374+
"custom_cpu_cores": 0,
375+
"custom_disk_size": 0,
376+
"custom_gb_memory": 0,
377+
"keep_alive_time_seconds": 0,
378+
"launch_commands": ["string"],
379+
"required_services": ["string"],
380+
"resource_size_request": "X_SMALL",
381+
"user_parameters": {
382+
"uid": 0,
383+
"username": "username",
384+
},
385+
},
367386
"purpose": "purpose",
368387
"secrets": {"foo": "string"},
369388
},
@@ -743,6 +762,25 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop
743762
run_name="run_name",
744763
run_profile={
745764
"env_vars": {"foo": "string"},
765+
"launch_parameters": {
766+
"after_idle": {
767+
"idle_time_seconds": 0,
768+
"on_idle": "shutdown",
769+
},
770+
"architecture": "x86_64",
771+
"available_ports": [0],
772+
"custom_cpu_cores": 0,
773+
"custom_disk_size": 0,
774+
"custom_gb_memory": 0,
775+
"keep_alive_time_seconds": 0,
776+
"launch_commands": ["string"],
777+
"required_services": ["string"],
778+
"resource_size_request": "X_SMALL",
779+
"user_parameters": {
780+
"uid": 0,
781+
"username": "username",
782+
},
783+
},
746784
"purpose": "purpose",
747785
"secrets": {"foo": "string"},
748786
},

0 commit comments

Comments
 (0)