@@ -426,61 +426,16 @@ def is_done_booting(devbox: DevboxView) -> bool:
426426 def create_and_await_running (
427427 self ,
428428 * ,
429- blueprint_id : Optional [str ] | NotGiven = NOT_GIVEN ,
430- blueprint_name : Optional [str ] | NotGiven = NOT_GIVEN ,
431- code_mounts : Optional [Iterable [CodeMountParameters ]] | 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 ,
429+ create_args : devbox_create_params .DevboxCreateParams ,
442430 polling_config : PollingConfig | None = None ,
443- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
444- # The extra values given here take precedence over values defined on the client or passed to this method.
445- extra_headers : Headers | None = None ,
446- extra_query : Query | None = None ,
447- extra_body : Body | None = None ,
448- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
449- idempotency_key : str | None = None ,
450431 ) -> DevboxView :
451432 """Create a new devbox and wait for it to be in running state.
452433
434+ This is a wrapper around the `create` method that waits for the devbox to reach running state.
435+
453436 Args:
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.
437+ create_args: Arguments to pass to the `create` method. See the `create` method for detailed documentation.
478438 polling_config: Optional polling configuration
479- extra_headers: Send extra headers
480- extra_query: Add additional query parameters to the request
481- extra_body: Add additional JSON properties to the request
482- timeout: Override the client-level default timeout for this request, in seconds
483- idempotency_key: Specify a custom idempotency key for this request
484439
485440 Returns:
486441 The devbox in running state
@@ -489,26 +444,7 @@ def create_and_await_running(
489444 PollingTimeout: If polling times out before devbox is running
490445 RunloopError: If devbox enters a non-running terminal state
491446 """
492- devbox = self .create (
493- blueprint_id = blueprint_id ,
494- blueprint_name = blueprint_name ,
495- code_mounts = code_mounts ,
496- entrypoint = entrypoint ,
497- environment_variables = environment_variables ,
498- file_mounts = file_mounts ,
499- launch_parameters = launch_parameters ,
500- metadata = metadata ,
501- name = name ,
502- prebuilt = prebuilt ,
503- repo_connection_id = repo_connection_id ,
504- secrets = secrets ,
505- snapshot_id = snapshot_id ,
506- extra_headers = extra_headers ,
507- extra_query = extra_query ,
508- extra_body = extra_body ,
509- timeout = timeout ,
510- idempotency_key = idempotency_key ,
511- )
447+ devbox = self .create (** create_args )
512448
513449 return self .await_running (
514450 devbox .id ,
@@ -1632,61 +1568,16 @@ async def retrieve(
16321568 async def create_and_await_running (
16331569 self ,
16341570 * ,
1635- blueprint_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1636- blueprint_name : Optional [str ] | NotGiven = NOT_GIVEN ,
1637- code_mounts : Optional [Iterable [CodeMountParameters ]] | NotGiven = NOT_GIVEN ,
1638- entrypoint : Optional [str ] | NotGiven = NOT_GIVEN ,
1639- environment_variables : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1640- file_mounts : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1641- launch_parameters : Optional [LaunchParameters ] | NotGiven = NOT_GIVEN ,
1642- metadata : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1643- name : Optional [str ] | NotGiven = NOT_GIVEN ,
1644- prebuilt : Optional [str ] | NotGiven = NOT_GIVEN ,
1645- repo_connection_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1646- secrets : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1647- snapshot_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1571+ create_args : devbox_create_params .DevboxCreateParams ,
16481572 polling_config : PollingConfig | None = None ,
1649- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1650- # The extra values given here take precedence over values defined on the client or passed to this method.
1651- extra_headers : Headers | None = None ,
1652- extra_query : Query | None = None ,
1653- extra_body : Body | None = None ,
1654- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1655- idempotency_key : str | None = None ,
16561573 ) -> DevboxView :
16571574 """Create a devbox and wait for it to be in running state.
16581575
1576+ This is a wrapper around the `create` method that waits for the devbox to reach running state.
1577+
16591578 Args:
1660- blueprint_id: Blueprint ID to use for the Devbox. If none set, the Devbox will be created with
1661- the default Runloop Devbox image. Only one of (Snapshot ID, Blueprint ID,
1662- Blueprint name) should be specified.
1663- blueprint_name: Name of Blueprint to use for the Devbox. When set, this will load the latest
1664- successfully built Blueprint with the given name. Only one of (Snapshot ID,
1665- Blueprint ID, Blueprint name) should be specified.
1666- code_mounts: A list of code mounts to be included in the Devbox.
1667- entrypoint: (Optional) When specified, the Devbox will run this script as its main
1668- executable. The devbox lifecycle will be bound to entrypoint, shutting down when
1669- the process is complete.
1670- environment_variables: (Optional) Environment variables used to configure your Devbox.
1671- file_mounts: (Optional) Map of paths and file contents to write before setup.
1672- launch_parameters: Parameters to configure the resources and launch time behavior of the Devbox.
1673- metadata: User defined metadata to attach to the devbox for organization.
1674- name: (Optional) A user specified name to give the Devbox.
1675- prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used
1676- together with (Snapshot ID, Blueprint ID, or Blueprint name).
1677- repo_connection_id: Repository connection id the devbox should source its base image from.
1678- secrets: (Optional) Map of environment variable names to secret names. The secret values
1679- will be securely injected as environment variables in the Devbox. Example:
1680- {"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the
1681- value of secret 'DATABASE_PASSWORD'.
1682- snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID,
1683- Blueprint name) should be specified.
1579+ create_args: Arguments to pass to the `create` method. See the `create` method for detailed documentation.
16841580 polling_config: Optional polling configuration
1685- extra_headers: Send extra headers
1686- extra_query: Add additional query parameters to the request
1687- extra_body: Add additional JSON properties to the request
1688- timeout: Override the client-level default timeout for this request, in seconds
1689- idempotency_key: Specify a custom idempotency key for this request
16901581
16911582 Returns:
16921583 The devbox in running state
@@ -1695,26 +1586,7 @@ async def create_and_await_running(
16951586 PollingTimeout: If polling times out before devbox is running
16961587 RunloopError: If devbox enters a non-running terminal state
16971588 """
1698- devbox = await self .create (
1699- blueprint_id = blueprint_id ,
1700- blueprint_name = blueprint_name ,
1701- code_mounts = code_mounts ,
1702- entrypoint = entrypoint ,
1703- environment_variables = environment_variables ,
1704- file_mounts = file_mounts ,
1705- launch_parameters = launch_parameters ,
1706- metadata = metadata ,
1707- name = name ,
1708- prebuilt = prebuilt ,
1709- repo_connection_id = repo_connection_id ,
1710- secrets = secrets ,
1711- snapshot_id = snapshot_id ,
1712- extra_headers = extra_headers ,
1713- extra_query = extra_query ,
1714- extra_body = extra_body ,
1715- timeout = timeout ,
1716- idempotency_key = idempotency_key ,
1717- )
1589+ devbox = await self .create (** create_args )
17181590
17191591 return await self .await_running (
17201592 devbox .id ,
0 commit comments