Skip to content

Commit dca3eef

Browse files
committed
force update, no-format but keep ruff lint
1 parent c9a65be commit dca3eef

3 files changed

Lines changed: 1200 additions & 1155 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ target-version = "py37"
166166

167167
[tool.ruff.format]
168168
docstring-code-format = true
169+
# Disable Ruff formatting while keeping linting
170+
enabled = false
169171

170172
[tool.ruff.lint]
171173
select = [

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 82 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -426,44 +426,61 @@ def is_done_booting(devbox: DevboxView) -> bool:
426426
def create_and_await_running(
427427
self,
428428
*,
429-
blueprint_id: str | NotGiven = NOT_GIVEN,
430-
blueprint_name: str | NotGiven = NOT_GIVEN,
429+
blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
430+
blueprint_name: Optional[str] | NotGiven = NOT_GIVEN,
431431
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
432-
entrypoint: str | NotGiven = NOT_GIVEN,
433-
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
434-
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
435-
launch_parameters: LaunchParameters | NotGiven = NOT_GIVEN,
436-
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
437-
name: str | NotGiven = NOT_GIVEN,
438-
prebuilt: str | NotGiven = NOT_GIVEN,
439-
snapshot_id: str | NotGiven = NOT_GIVEN,
432+
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
433+
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
434+
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
435+
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
436+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
437+
name: Optional[str] | NotGiven = NOT_GIVEN,
438+
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
439+
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
440+
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
441+
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
440442
polling_config: PollingConfig | None = None,
441443
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
442444
# The extra values given here take precedence over values defined on the client or passed to this method.
443445
extra_headers: Headers | None = None,
444446
extra_query: Query | None = None,
445447
extra_body: Body | None = None,
446448
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
449+
idempotency_key: str | None = None,
447450
) -> DevboxView:
448451
"""Create a new devbox and wait for it to be in running state.
449452
450453
Args:
451-
blueprint_id: The ID of the blueprint to use
452-
blueprint_name: The name of the blueprint to use
453-
code_mounts: Code mount parameters
454-
entrypoint: The entrypoint command
455-
environment_variables: Environment variables
456-
file_mounts: File mount parameters
457-
launch_parameters: Launch parameters
458-
metadata: Metadata key-value pairs
459-
name: The name of the devbox
460-
prebuilt: The prebuilt image to use
461-
snapshot_id: The ID of the snapshot to restore from
454+
blueprint_id: Blueprint ID to use for the Devbox. If none set, the Devbox will be created with
455+
the default Runloop Devbox image. Only one of (Snapshot ID, Blueprint ID,
456+
Blueprint name) should be specified.
457+
blueprint_name: Name of Blueprint to use for the Devbox. When set, this will load the latest
458+
successfully built Blueprint with the given name. Only one of (Snapshot ID,
459+
Blueprint ID, Blueprint name) should be specified.
460+
code_mounts: A list of code mounts to be included in the Devbox.
461+
entrypoint: (Optional) When specified, the Devbox will run this script as its main
462+
executable. The devbox lifecycle will be bound to entrypoint, shutting down when
463+
the process is complete.
464+
environment_variables: (Optional) Environment variables used to configure your Devbox.
465+
file_mounts: (Optional) Map of paths and file contents to write before setup.
466+
launch_parameters: Parameters to configure the resources and launch time behavior of the Devbox.
467+
metadata: User defined metadata to attach to the devbox for organization.
468+
name: (Optional) A user specified name to give the Devbox.
469+
prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used
470+
together with (Snapshot ID, Blueprint ID, or Blueprint name).
471+
repo_connection_id: Repository connection id the devbox should source its base image from.
472+
secrets: (Optional) Map of environment variable names to secret names. The secret values
473+
will be securely injected as environment variables in the Devbox. Example:
474+
{"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the
475+
value of secret 'DATABASE_PASSWORD'.
476+
snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID,
477+
Blueprint name) should be specified.
462478
polling_config: Optional polling configuration
463479
extra_headers: Send extra headers
464480
extra_query: Add additional query parameters to the request
465481
extra_body: Add additional JSON properties to the request
466482
timeout: Override the client-level default timeout for this request, in seconds
483+
idempotency_key: Specify a custom idempotency key for this request
467484
468485
Returns:
469486
The devbox in running state
@@ -483,11 +500,14 @@ def create_and_await_running(
483500
metadata=metadata,
484501
name=name,
485502
prebuilt=prebuilt,
503+
repo_connection_id=repo_connection_id,
504+
secrets=secrets,
486505
snapshot_id=snapshot_id,
487506
extra_headers=extra_headers,
488507
extra_query=extra_query,
489508
extra_body=extra_body,
490509
timeout=timeout,
510+
idempotency_key=idempotency_key,
491511
)
492512

493513
return self.await_running(
@@ -1592,41 +1612,61 @@ async def retrieve(
15921612
async def create_and_await_running(
15931613
self,
15941614
*,
1595-
blueprint_id: str | NotGiven = NOT_GIVEN,
1596-
blueprint_name: str | NotGiven = NOT_GIVEN,
1615+
blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
1616+
blueprint_name: Optional[str] | NotGiven = NOT_GIVEN,
15971617
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
1598-
entrypoint: str | NotGiven = NOT_GIVEN,
1599-
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
1600-
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
1601-
launch_parameters: LaunchParameters | NotGiven = NOT_GIVEN,
1602-
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
1603-
name: str | NotGiven = NOT_GIVEN,
1604-
prebuilt: str | NotGiven = NOT_GIVEN,
1605-
snapshot_id: str | NotGiven = NOT_GIVEN,
1618+
entrypoint: Optional[str] | NotGiven = NOT_GIVEN,
1619+
environment_variables: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
1620+
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
1621+
launch_parameters: Optional[LaunchParameters] | NotGiven = NOT_GIVEN,
1622+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
1623+
name: Optional[str] | NotGiven = NOT_GIVEN,
1624+
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
1625+
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
1626+
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
1627+
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
16061628
polling_config: PollingConfig | None = None,
16071629
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
16081630
# The extra values given here take precedence over values defined on the client or passed to this method.
16091631
extra_headers: Headers | None = None,
16101632
extra_query: Query | None = None,
16111633
extra_body: Body | None = None,
16121634
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1635+
idempotency_key: str | None = None,
16131636
) -> DevboxView:
16141637
"""Create a devbox and wait for it to be in running state.
16151638
16161639
Args:
1617-
code_mount_parameters: Parameters for mounting code into the devbox
1618-
environment_variables: Environment variables to set in the devbox
1619-
file_mounts: Files to mount into the devbox
1620-
launch_parameters: Parameters for launching the devbox
1621-
metadata: Metadata to attach to the devbox
1622-
name: Name of the devbox
1623-
prebuilt: Whether to use a prebuilt image
1624-
snapshot_id: ID of snapshot to create devbox from
1640+
blueprint_id: Blueprint ID to use for the Devbox. If none set, the Devbox will be created with
1641+
the default Runloop Devbox image. Only one of (Snapshot ID, Blueprint ID,
1642+
Blueprint name) should be specified.
1643+
blueprint_name: Name of Blueprint to use for the Devbox. When set, this will load the latest
1644+
successfully built Blueprint with the given name. Only one of (Snapshot ID,
1645+
Blueprint ID, Blueprint name) should be specified.
1646+
code_mounts: A list of code mounts to be included in the Devbox.
1647+
entrypoint: (Optional) When specified, the Devbox will run this script as its main
1648+
executable. The devbox lifecycle will be bound to entrypoint, shutting down when
1649+
the process is complete.
1650+
environment_variables: (Optional) Environment variables used to configure your Devbox.
1651+
file_mounts: (Optional) Map of paths and file contents to write before setup.
1652+
launch_parameters: Parameters to configure the resources and launch time behavior of the Devbox.
1653+
metadata: User defined metadata to attach to the devbox for organization.
1654+
name: (Optional) A user specified name to give the Devbox.
1655+
prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used
1656+
together with (Snapshot ID, Blueprint ID, or Blueprint name).
1657+
repo_connection_id: Repository connection id the devbox should source its base image from.
1658+
secrets: (Optional) Map of environment variable names to secret names. The secret values
1659+
will be securely injected as environment variables in the Devbox. Example:
1660+
{"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the
1661+
value of secret 'DATABASE_PASSWORD'.
1662+
snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID,
1663+
Blueprint name) should be specified.
16251664
polling_config: Optional polling configuration
16261665
extra_headers: Send extra headers
16271666
extra_query: Add additional query parameters to the request
16281667
extra_body: Add additional JSON properties to the request
16291668
timeout: Override the client-level default timeout for this request, in seconds
1669+
idempotency_key: Specify a custom idempotency key for this request
16301670
16311671
Returns:
16321672
The devbox in running state
@@ -1646,11 +1686,14 @@ async def create_and_await_running(
16461686
metadata=metadata,
16471687
name=name,
16481688
prebuilt=prebuilt,
1689+
repo_connection_id=repo_connection_id,
1690+
secrets=secrets,
16491691
snapshot_id=snapshot_id,
16501692
extra_headers=extra_headers,
16511693
extra_query=extra_query,
16521694
extra_body=extra_body,
16531695
timeout=timeout,
1696+
idempotency_key=idempotency_key,
16541697
)
16551698

16561699
return await self.await_running(

0 commit comments

Comments
 (0)