Skip to content

Commit 6022768

Browse files
feat(api): api update
1 parent e3a125d commit 6022768

7 files changed

Lines changed: 47 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: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-e5ce0fefdcb08eeb8d337329c89374e8a11a26dd986c75cffd93ad2756fb6ed7.yml
3-
openapi_spec_hash: e2807c1c3955b268937eb33f345dbfe5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-b3ce005070de130c689c5e82a0decb0515feedc16f6aed5b68a620c0e2c33c99.yml
3+
openapi_spec_hash: a6d282538829a82c412ed65565d33c9c
44
config_hash: 60681f589a9e641fdb7f19af2021a033

src/runloop_api_client/resources/blueprints.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def create(
5555
self,
5656
*,
5757
name: str,
58+
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
5859
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
5960
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
6061
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
@@ -78,6 +79,9 @@ def create(
7879
Args:
7980
name: Name of the Blueprint.
8081
82+
base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
83+
build.
84+
8185
code_mounts: A list of code mounts to be included in the Blueprint.
8286
8387
dockerfile: Dockerfile contents to be used to build the Blueprint.
@@ -103,6 +107,7 @@ def create(
103107
body=maybe_transform(
104108
{
105109
"name": name,
110+
"base_blueprint_id": base_blueprint_id,
106111
"code_mounts": code_mounts,
107112
"dockerfile": dockerfile,
108113
"file_mounts": file_mounts,
@@ -395,6 +400,7 @@ def preview(
395400
self,
396401
*,
397402
name: str,
403+
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
398404
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
399405
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
400406
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
@@ -416,6 +422,9 @@ def preview(
416422
Args:
417423
name: Name of the Blueprint.
418424
425+
base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
426+
build.
427+
419428
code_mounts: A list of code mounts to be included in the Blueprint.
420429
421430
dockerfile: Dockerfile contents to be used to build the Blueprint.
@@ -441,6 +450,7 @@ def preview(
441450
body=maybe_transform(
442451
{
443452
"name": name,
453+
"base_blueprint_id": base_blueprint_id,
444454
"code_mounts": code_mounts,
445455
"dockerfile": dockerfile,
446456
"file_mounts": file_mounts,
@@ -484,6 +494,7 @@ async def create(
484494
self,
485495
*,
486496
name: str,
497+
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
487498
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
488499
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
489500
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
@@ -507,6 +518,9 @@ async def create(
507518
Args:
508519
name: Name of the Blueprint.
509520
521+
base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
522+
build.
523+
510524
code_mounts: A list of code mounts to be included in the Blueprint.
511525
512526
dockerfile: Dockerfile contents to be used to build the Blueprint.
@@ -532,6 +546,7 @@ async def create(
532546
body=await async_maybe_transform(
533547
{
534548
"name": name,
549+
"base_blueprint_id": base_blueprint_id,
535550
"code_mounts": code_mounts,
536551
"dockerfile": dockerfile,
537552
"file_mounts": file_mounts,
@@ -824,6 +839,7 @@ async def preview(
824839
self,
825840
*,
826841
name: str,
842+
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
827843
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
828844
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
829845
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
@@ -845,6 +861,9 @@ async def preview(
845861
Args:
846862
name: Name of the Blueprint.
847863
864+
base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
865+
build.
866+
848867
code_mounts: A list of code mounts to be included in the Blueprint.
849868
850869
dockerfile: Dockerfile contents to be used to build the Blueprint.
@@ -870,6 +889,7 @@ async def preview(
870889
body=await async_maybe_transform(
871890
{
872891
"name": name,
892+
"base_blueprint_id": base_blueprint_id,
873893
"code_mounts": code_mounts,
874894
"dockerfile": dockerfile,
875895
"file_mounts": file_mounts,

src/runloop_api_client/types/blueprint_build_parameters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ class BlueprintBuildParameters(BaseModel):
1313
name: str
1414
"""Name of the Blueprint."""
1515

16+
base_blueprint_id: Optional[str] = None
17+
"""
18+
(Optional) ID of previously built blueprint to use as a base blueprint for this
19+
build.
20+
"""
21+
1622
code_mounts: Optional[List[CodeMountParameters]] = None
1723
"""A list of code mounts to be included in the Blueprint."""
1824

src/runloop_api_client/types/blueprint_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ class BlueprintCreateParams(TypedDict, total=False):
1515
name: Required[str]
1616
"""Name of the Blueprint."""
1717

18+
base_blueprint_id: Optional[str]
19+
"""
20+
(Optional) ID of previously built blueprint to use as a base blueprint for this
21+
build.
22+
"""
23+
1824
code_mounts: Optional[Iterable[CodeMountParameters]]
1925
"""A list of code mounts to be included in the Blueprint."""
2026

src/runloop_api_client/types/blueprint_preview_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ class BlueprintPreviewParams(TypedDict, total=False):
1515
name: Required[str]
1616
"""Name of the Blueprint."""
1717

18+
base_blueprint_id: Optional[str]
19+
"""
20+
(Optional) ID of previously built blueprint to use as a base blueprint for this
21+
build.
22+
"""
23+
1824
code_mounts: Optional[Iterable[CodeMountParameters]]
1925
"""A list of code mounts to be included in the Blueprint."""
2026

src/runloop_api_client/types/blueprint_view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ class BlueprintView(BaseModel):
2828
status: Literal["provisioning", "building", "failed", "build_complete"]
2929
"""The status of the Blueprint build."""
3030

31+
base_blueprint_id: Optional[str] = None
32+
"""The ID of the base Blueprint."""
33+
3134
failure_reason: Optional[Literal["out_of_memory", "out_of_disk", "build_failed"]] = None
3235
"""The failure reason if the Blueprint build failed, if any."""

tests/api_resources/test_blueprints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_method_create(self, client: Runloop) -> None:
3333
def test_method_create_with_all_params(self, client: Runloop) -> None:
3434
blueprint = client.blueprints.create(
3535
name="name",
36+
base_blueprint_id="base_blueprint_id",
3637
code_mounts=[
3738
{
3839
"repo_name": "repo_name",
@@ -248,6 +249,7 @@ def test_method_preview(self, client: Runloop) -> None:
248249
def test_method_preview_with_all_params(self, client: Runloop) -> None:
249250
blueprint = client.blueprints.preview(
250251
name="name",
252+
base_blueprint_id="base_blueprint_id",
251253
code_mounts=[
252254
{
253255
"repo_name": "repo_name",
@@ -321,6 +323,7 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None:
321323
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
322324
blueprint = await async_client.blueprints.create(
323325
name="name",
326+
base_blueprint_id="base_blueprint_id",
324327
code_mounts=[
325328
{
326329
"repo_name": "repo_name",
@@ -536,6 +539,7 @@ async def test_method_preview(self, async_client: AsyncRunloop) -> None:
536539
async def test_method_preview_with_all_params(self, async_client: AsyncRunloop) -> None:
537540
blueprint = await async_client.blueprints.preview(
538541
name="name",
542+
base_blueprint_id="base_blueprint_id",
539543
code_mounts=[
540544
{
541545
"repo_name": "repo_name",

0 commit comments

Comments
 (0)