Skip to content

Commit bc21327

Browse files
committed
added file system mounts to devbox creation parameters and cleaned up default parameters (matches base api)
1 parent f4ba131 commit bc21327

File tree

8 files changed

+175
-157
lines changed

8 files changed

+175
-157
lines changed

src/runloop_api_client/sdk/_async.py

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
import httpx
77

8-
from .._types import NOT_GIVEN, Body, Omit, Query, Headers, Timeout, NotGiven, SequenceNotStr, omit, not_given
8+
from .._types import Body, Omit, Query, Headers, Timeout, NotGiven, SequenceNotStr, omit, not_given
99
from .._client import AsyncRunloop
1010
from ._helpers import ContentType, detect_content_type
1111
from ..lib.polling import PollingConfig
1212
from .async_devbox import AsyncDevbox
1313
from .async_snapshot import AsyncSnapshot
1414
from .async_blueprint import AsyncBlueprint
1515
from .async_storage_object import AsyncStorageObject
16+
from ..types.shared_params.mount import Mount
1617
from ..types.blueprint_create_params import Service
1718
from ..types.shared_params.launch_parameters import LaunchParameters
1819
from ..types.shared_params.code_mount_parameters import CodeMountParameters
@@ -27,18 +28,19 @@ def __init__(self, client: AsyncRunloop) -> None:
2728
async def create(
2829
self,
2930
*,
30-
blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
31-
blueprint_name: Optional[str] | NotGiven = NOT_GIVEN,
32-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
33-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
34-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
35-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
36-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
37-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
38-
name: Optional[str] | NotGiven = NOT_GIVEN,
39-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
40-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
41-
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
31+
blueprint_id: Optional[str] | Omit = omit,
32+
blueprint_name: Optional[str] | Omit = omit,
33+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
34+
entrypoint: Optional[str] | Omit = omit,
35+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
36+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
37+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
38+
metadata: Optional[Dict[str, str]] | Omit = omit,
39+
mounts: Optional[Iterable[Mount]] | Omit = omit,
40+
name: Optional[str] | Omit = omit,
41+
repo_connection_id: Optional[str] | Omit = omit,
42+
secrets: Optional[Dict[str, str]] | Omit = omit,
43+
snapshot_id: Optional[str] | Omit = omit,
4244
polling_config: PollingConfig | None = None,
4345
extra_headers: Headers | None = None,
4446
extra_query: Query | None = None,
@@ -55,6 +57,7 @@ async def create(
5557
file_mounts=file_mounts,
5658
launch_parameters=launch_parameters,
5759
metadata=metadata,
60+
mounts=mounts,
5861
name=name,
5962
repo_connection_id=repo_connection_id,
6063
secrets=secrets,
@@ -72,15 +75,15 @@ async def create_from_blueprint_id(
7275
self,
7376
blueprint_id: str,
7477
*,
75-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
76-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
77-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
78-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
79-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
80-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
81-
name: Optional[str] | NotGiven = NOT_GIVEN,
82-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
83-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
78+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
79+
entrypoint: Optional[str] | Omit = omit,
80+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
81+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
82+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
83+
metadata: Optional[Dict[str, str]] | Omit = omit,
84+
name: Optional[str] | Omit = omit,
85+
repo_connection_id: Optional[str] | Omit = omit,
86+
secrets: Optional[Dict[str, str]] | Omit = omit,
8487
polling_config: PollingConfig | None = None,
8588
extra_headers: Headers | None = None,
8689
extra_query: Query | None = None,
@@ -112,15 +115,15 @@ async def create_from_blueprint_name(
112115
self,
113116
blueprint_name: str,
114117
*,
115-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
116-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
117-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
118-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
119-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
120-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
121-
name: Optional[str] | NotGiven = NOT_GIVEN,
122-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
123-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
118+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
119+
entrypoint: Optional[str] | Omit = omit,
120+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
121+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
122+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
123+
metadata: Optional[Dict[str, str]] | Omit = omit,
124+
name: Optional[str] | Omit = omit,
125+
repo_connection_id: Optional[str] | Omit = omit,
126+
secrets: Optional[Dict[str, str]] | Omit = omit,
124127
polling_config: PollingConfig | None = None,
125128
extra_headers: Headers | None = None,
126129
extra_query: Query | None = None,
@@ -152,15 +155,15 @@ async def create_from_snapshot(
152155
self,
153156
snapshot_id: str,
154157
*,
155-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
156-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
157-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
158-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
159-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
160-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
161-
name: Optional[str] | NotGiven = NOT_GIVEN,
162-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
163-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
158+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
159+
entrypoint: Optional[str] | Omit = omit,
160+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
161+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
162+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
163+
metadata: Optional[Dict[str, str]] | Omit = omit,
164+
name: Optional[str] | Omit = omit,
165+
repo_connection_id: Optional[str] | Omit = omit,
166+
secrets: Optional[Dict[str, str]] | Omit = omit,
164167
polling_config: PollingConfig | None = None,
165168
extra_headers: Headers | None = None,
166169
extra_query: Query | None = None,
@@ -278,7 +281,7 @@ async def create(
278281
extra_headers: Headers | None = None,
279282
extra_query: Query | None = None,
280283
extra_body: Body | None = None,
281-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
284+
timeout: float | Timeout | None | NotGiven = not_given,
282285
idempotency_key: str | None = None,
283286
) -> AsyncBlueprint:
284287
blueprint = await self._client.blueprints.create_and_await_build_complete(

src/runloop_api_client/sdk/_sync.py

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
import httpx
77

88
from .devbox import Devbox
9-
from .._types import NOT_GIVEN, Body, Omit, Query, Headers, Timeout, NotGiven, SequenceNotStr, omit, not_given
9+
from .._types import Body, Omit, Query, Headers, Timeout, NotGiven, SequenceNotStr, omit, not_given
1010
from .._client import Runloop
1111
from ._helpers import ContentType, detect_content_type
1212
from .snapshot import Snapshot
1313
from .blueprint import Blueprint
1414
from ..lib.polling import PollingConfig
1515
from .storage_object import StorageObject
16+
from ..types.shared_params.mount import Mount
1617
from ..types.blueprint_create_params import Service
1718
from ..types.shared_params.launch_parameters import LaunchParameters
1819
from ..types.shared_params.code_mount_parameters import CodeMountParameters
@@ -27,18 +28,19 @@ def __init__(self, client: Runloop) -> None:
2728
def create(
2829
self,
2930
*,
30-
blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
31-
blueprint_name: Optional[str] | NotGiven = NOT_GIVEN,
32-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
33-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
34-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
35-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
36-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
37-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
38-
name: Optional[str] | NotGiven = NOT_GIVEN,
39-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
40-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
41-
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
31+
blueprint_id: Optional[str] | Omit = omit,
32+
blueprint_name: Optional[str] | Omit = omit,
33+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
34+
entrypoint: Optional[str] | Omit = omit,
35+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
36+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
37+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
38+
metadata: Optional[Dict[str, str]] | Omit = omit,
39+
mounts: Optional[Iterable[Mount]] | Omit = omit,
40+
name: Optional[str] | Omit = omit,
41+
repo_connection_id: Optional[str] | Omit = omit,
42+
secrets: Optional[Dict[str, str]] | Omit = omit,
43+
snapshot_id: Optional[str] | Omit = omit,
4244
polling_config: PollingConfig | None = None,
4345
extra_headers: Headers | None = None,
4446
extra_query: Query | None = None,
@@ -55,6 +57,7 @@ def create(
5557
file_mounts=file_mounts,
5658
launch_parameters=launch_parameters,
5759
metadata=metadata,
60+
mounts=mounts,
5861
name=name,
5962
repo_connection_id=repo_connection_id,
6063
secrets=secrets,
@@ -72,15 +75,16 @@ def create_from_blueprint_id(
7275
self,
7376
blueprint_id: str,
7477
*,
75-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
76-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
77-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
78-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
79-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
80-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
81-
name: Optional[str] | NotGiven = NOT_GIVEN,
82-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
83-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
78+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
79+
entrypoint: Optional[str] | Omit = omit,
80+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
81+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
82+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
83+
metadata: Optional[Dict[str, str]] | Omit = omit,
84+
mounts: Optional[Iterable[Mount]] | Omit = omit,
85+
name: Optional[str] | Omit = omit,
86+
repo_connection_id: Optional[str] | Omit = omit,
87+
secrets: Optional[Dict[str, str]] | Omit = omit,
8488
polling_config: PollingConfig | None = None,
8589
extra_headers: Headers | None = None,
8690
extra_query: Query | None = None,
@@ -96,6 +100,7 @@ def create_from_blueprint_id(
96100
file_mounts=file_mounts,
97101
launch_parameters=launch_parameters,
98102
metadata=metadata,
103+
mounts=mounts,
99104
name=name,
100105
repo_connection_id=repo_connection_id,
101106
secrets=secrets,
@@ -112,15 +117,16 @@ def create_from_blueprint_name(
112117
self,
113118
blueprint_name: str,
114119
*,
115-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
116-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
117-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
118-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
119-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
120-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
121-
name: Optional[str] | NotGiven = NOT_GIVEN,
122-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
123-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
120+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
121+
entrypoint: Optional[str] | Omit = omit,
122+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
123+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
124+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
125+
metadata: Optional[Dict[str, str]] | Omit = omit,
126+
mounts: Optional[Iterable[Mount]] | Omit = omit,
127+
name: Optional[str] | Omit = omit,
128+
repo_connection_id: Optional[str] | Omit = omit,
129+
secrets: Optional[Dict[str, str]] | Omit = omit,
124130
polling_config: PollingConfig | None = None,
125131
extra_headers: Headers | None = None,
126132
extra_query: Query | None = None,
@@ -136,6 +142,7 @@ def create_from_blueprint_name(
136142
file_mounts=file_mounts,
137143
launch_parameters=launch_parameters,
138144
metadata=metadata,
145+
mounts=mounts,
139146
name=name,
140147
repo_connection_id=repo_connection_id,
141148
secrets=secrets,
@@ -152,15 +159,16 @@ def create_from_snapshot(
152159
self,
153160
snapshot_id: str,
154161
*,
155-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
156-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
157-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
158-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
159-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
160-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
161-
name: Optional[str] | NotGiven = NOT_GIVEN,
162-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
163-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
162+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
163+
entrypoint: Optional[str] | Omit = omit,
164+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
165+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
166+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
167+
metadata: Optional[Dict[str, str]] | Omit = omit,
168+
mounts: Optional[Iterable[Mount]] | Omit = omit,
169+
name: Optional[str] | Omit = omit,
170+
repo_connection_id: Optional[str] | Omit = omit,
171+
secrets: Optional[Dict[str, str]] | Omit = omit,
164172
polling_config: PollingConfig | None = None,
165173
extra_headers: Headers | None = None,
166174
extra_query: Query | None = None,
@@ -176,6 +184,7 @@ def create_from_snapshot(
176184
file_mounts=file_mounts,
177185
launch_parameters=launch_parameters,
178186
metadata=metadata,
187+
mounts=mounts,
179188
name=name,
180189
repo_connection_id=repo_connection_id,
181190
secrets=secrets,
@@ -279,7 +288,7 @@ def create(
279288
extra_headers: Headers | None = None,
280289
extra_query: Query | None = None,
281290
extra_body: Body | None = None,
282-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
291+
timeout: float | Timeout | None | NotGiven = not_given,
283292
idempotency_key: str | None = None,
284293
) -> Blueprint:
285294
blueprint = self._client.blueprints.create_and_await_build_complete(

src/runloop_api_client/sdk/async_blueprint.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
if TYPE_CHECKING:
77
from .async_devbox import AsyncDevbox
88
from ..types import BlueprintView
9-
from .._types import NOT_GIVEN, Body, Query, Headers, Timeout, NotGiven, not_given
9+
from .._types import Body, Omit, Query, Headers, Timeout, NotGiven, omit, not_given
1010
from .._client import AsyncRunloop
1111
from ..lib.polling import PollingConfig
1212
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView
@@ -86,15 +86,15 @@ async def delete(
8686
async def create_devbox(
8787
self,
8888
*,
89-
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
90-
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
91-
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
92-
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
93-
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
94-
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
95-
name: Optional[str] | NotGiven = NOT_GIVEN,
96-
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
97-
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
89+
code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit,
90+
entrypoint: Optional[str] | Omit = omit,
91+
environment_variables: Optional[Dict[str, str]] | Omit = omit,
92+
file_mounts: Optional[Dict[str, str]] | Omit = omit,
93+
launch_parameters: Optional[LaunchParameters] | Omit = omit,
94+
metadata: Optional[Dict[str, str]] | Omit = omit,
95+
name: Optional[str] | Omit = omit,
96+
repo_connection_id: Optional[str] | Omit = omit,
97+
secrets: Optional[Dict[str, str]] | Omit = omit,
9898
polling_config: PollingConfig | None = None,
9999
extra_headers: Headers | None = None,
100100
extra_query: Query | None = None,

0 commit comments

Comments
 (0)