Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.33.0"
".": "0.34.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 79
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-589e342137de29187fec9e332ae5ca29de64e531f8b92b46b2469fdb3449a721.yml
openapi_spec_hash: 5dbf4fe59153afb4d4c8642e05fcecdc
config_hash: 7cef6c9fce4f9a345184516c6cde462f
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-88c3df1881ce3ca780736c14f781e2b1930abb2ceeadb5cdabeda4d67f877511.yml
openapi_spec_hash: e47eece926740aba8272685c342a1d4b
config_hash: e17450cd026f260f68713ad9f12bd999
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.34.0 (2025-05-27)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/runloopai/api-client-python/compare/v0.33.0...v0.34.0)

### Features

* **api:** api update ([997a8ff](https://github.com/runloopai/api-client-python/commit/997a8ffab12ffc3f3a305058456af2bebeae8482))

## 0.33.0 (2025-05-22)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/runloopai/api-client-python/compare/v0.32.0...v0.33.0)
Expand Down
7 changes: 6 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Methods:
- <code title="post /v1/devboxes/{id}/resume">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">resume</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
- <code title="post /v1/devboxes/{id}/snapshot_disk">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">snapshot_disk</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_snapshot_disk_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">DevboxSnapshotView</a></code>
- <code title="post /v1/devboxes/{id}/snapshot_disk_async">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">snapshot_disk_async</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_snapshot_disk_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">DevboxSnapshotView</a></code>
- <code title="post /v1/devboxes/{id}/suspend">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">suspend</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">upload_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_upload_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_upload_file_response.py">object</a></code>
- <code title="post /v1/devboxes/{id}/write_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">write_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_write_file_contents_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
Expand All @@ -109,14 +110,18 @@ Methods:
Types:

```python
from runloop_api_client.types.devboxes import DiskSnapshotDeleteResponse
from runloop_api_client.types.devboxes import (
DevboxSnapshotAsyncStatusView,
DiskSnapshotDeleteResponse,
)
```

Methods:

- <code title="post /v1/devboxes/disk_snapshots/{id}">client.devboxes.disk_snapshots.<a href="./src/runloop_api_client/resources/devboxes/disk_snapshots.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/disk_snapshot_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">DevboxSnapshotView</a></code>
- <code title="get /v1/devboxes/disk_snapshots">client.devboxes.disk_snapshots.<a href="./src/runloop_api_client/resources/devboxes/disk_snapshots.py">list</a>(\*\*<a href="src/runloop_api_client/types/devboxes/disk_snapshot_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]</a></code>
- <code title="post /v1/devboxes/disk_snapshots/{id}/delete">client.devboxes.disk_snapshots.<a href="./src/runloop_api_client/resources/devboxes/disk_snapshots.py">delete</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/disk_snapshot_delete_response.py">object</a></code>
- <code title="get /v1/devboxes/disk_snapshots/{id}/status">client.devboxes.disk_snapshots.<a href="./src/runloop_api_client/resources/devboxes/disk_snapshots.py">query_status</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py">DevboxSnapshotAsyncStatusView</a></code>

## Browsers

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
version = "0.33.0"
version = "0.34.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/runloop_api_client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "runloop_api_client"
__version__ = "0.33.0" # x-release-please-version
__version__ = "0.34.0" # x-release-please-version
123 changes: 123 additions & 0 deletions src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
devbox_snapshot_disk_params,
devbox_read_file_contents_params,
devbox_list_disk_snapshots_params,
devbox_snapshot_disk_async_params,
devbox_write_file_contents_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
Expand Down Expand Up @@ -1152,6 +1153,61 @@ def snapshot_disk(
cast_to=DevboxSnapshotView,
)

def snapshot_disk_async(
self,
id: str,
*,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> DevboxSnapshotView:
"""
Start an asynchronous disk snapshot of a devbox with the specified name and
metadata. The snapshot operation will continue in the background and can be
monitored using the query endpoint.

Args:
metadata: (Optional) Metadata used to describe the snapshot

name: (Optional) A user specified name to give the snapshot

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._post(
f"/v1/devboxes/{id}/snapshot_disk_async",
body=maybe_transform(
{
"metadata": metadata,
"name": name,
},
devbox_snapshot_disk_async_params.DevboxSnapshotDiskAsyncParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=DevboxSnapshotView,
)

def suspend(
self,
id: str,
Expand Down Expand Up @@ -2349,6 +2405,61 @@ async def snapshot_disk(
cast_to=DevboxSnapshotView,
)

async def snapshot_disk_async(
self,
id: str,
*,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> DevboxSnapshotView:
"""
Start an asynchronous disk snapshot of a devbox with the specified name and
metadata. The snapshot operation will continue in the background and can be
monitored using the query endpoint.

Args:
metadata: (Optional) Metadata used to describe the snapshot

name: (Optional) A user specified name to give the snapshot

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._post(
f"/v1/devboxes/{id}/snapshot_disk_async",
body=await async_maybe_transform(
{
"metadata": metadata,
"name": name,
},
devbox_snapshot_disk_async_params.DevboxSnapshotDiskAsyncParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=DevboxSnapshotView,
)

async def suspend(
self,
id: str,
Expand Down Expand Up @@ -2565,6 +2676,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.snapshot_disk = to_raw_response_wrapper(
devboxes.snapshot_disk,
)
self.snapshot_disk_async = to_raw_response_wrapper(
devboxes.snapshot_disk_async,
)
self.suspend = to_raw_response_wrapper(
devboxes.suspend,
)
Expand Down Expand Up @@ -2656,6 +2770,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.snapshot_disk = async_to_raw_response_wrapper(
devboxes.snapshot_disk,
)
self.snapshot_disk_async = async_to_raw_response_wrapper(
devboxes.snapshot_disk_async,
)
self.suspend = async_to_raw_response_wrapper(
devboxes.suspend,
)
Expand Down Expand Up @@ -2747,6 +2864,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.snapshot_disk = to_streamed_response_wrapper(
devboxes.snapshot_disk,
)
self.snapshot_disk_async = to_streamed_response_wrapper(
devboxes.snapshot_disk_async,
)
self.suspend = to_streamed_response_wrapper(
devboxes.suspend,
)
Expand Down Expand Up @@ -2838,6 +2958,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.snapshot_disk = async_to_streamed_response_wrapper(
devboxes.snapshot_disk,
)
self.snapshot_disk_async = async_to_streamed_response_wrapper(
devboxes.snapshot_disk_async,
)
self.suspend = async_to_streamed_response_wrapper(
devboxes.suspend,
)
Expand Down
81 changes: 81 additions & 0 deletions src/runloop_api_client/resources/devboxes/disk_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ..._base_client import AsyncPaginator, make_request_options
from ...types.devboxes import disk_snapshot_list_params, disk_snapshot_update_params
from ...types.devbox_snapshot_view import DevboxSnapshotView
from ...types.devboxes.devbox_snapshot_async_status_view import DevboxSnapshotAsyncStatusView

__all__ = ["DiskSnapshotsResource", "AsyncDiskSnapshotsResource"]

Expand Down Expand Up @@ -200,6 +201,40 @@ def delete(
cast_to=object,
)

def query_status(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> DevboxSnapshotAsyncStatusView:
"""
Get the current status of an asynchronous disk snapshot operation, including
whether it is still in progress and any error messages if it failed.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._get(
f"/v1/devboxes/disk_snapshots/{id}/status",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=DevboxSnapshotAsyncStatusView,
)


class AsyncDiskSnapshotsResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -377,6 +412,40 @@ async def delete(
cast_to=object,
)

async def query_status(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> DevboxSnapshotAsyncStatusView:
"""
Get the current status of an asynchronous disk snapshot operation, including
whether it is still in progress and any error messages if it failed.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._get(
f"/v1/devboxes/disk_snapshots/{id}/status",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=DevboxSnapshotAsyncStatusView,
)


class DiskSnapshotsResourceWithRawResponse:
def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
Expand All @@ -391,6 +460,9 @@ def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
self.delete = to_raw_response_wrapper(
disk_snapshots.delete,
)
self.query_status = to_raw_response_wrapper(
disk_snapshots.query_status,
)


class AsyncDiskSnapshotsResourceWithRawResponse:
Expand All @@ -406,6 +478,9 @@ def __init__(self, disk_snapshots: AsyncDiskSnapshotsResource) -> None:
self.delete = async_to_raw_response_wrapper(
disk_snapshots.delete,
)
self.query_status = async_to_raw_response_wrapper(
disk_snapshots.query_status,
)


class DiskSnapshotsResourceWithStreamingResponse:
Expand All @@ -421,6 +496,9 @@ def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
self.delete = to_streamed_response_wrapper(
disk_snapshots.delete,
)
self.query_status = to_streamed_response_wrapper(
disk_snapshots.query_status,
)


class AsyncDiskSnapshotsResourceWithStreamingResponse:
Expand All @@ -436,3 +514,6 @@ def __init__(self, disk_snapshots: AsyncDiskSnapshotsResource) -> None:
self.delete = async_to_streamed_response_wrapper(
disk_snapshots.delete,
)
self.query_status = async_to_streamed_response_wrapper(
disk_snapshots.query_status,
)
1 change: 1 addition & 0 deletions src/runloop_api_client/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
from .repository_connection_list_view import RepositoryConnectionListView as RepositoryConnectionListView
from .devbox_read_file_contents_params import DevboxReadFileContentsParams as DevboxReadFileContentsParams
from .devbox_list_disk_snapshots_params import DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams
from .devbox_snapshot_disk_async_params import DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams
from .devbox_write_file_contents_params import DevboxWriteFileContentsParams as DevboxWriteFileContentsParams
from .devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView as DevboxAsyncExecutionDetailView
from .devbox_read_file_contents_response import DevboxReadFileContentsResponse as DevboxReadFileContentsResponse
16 changes: 16 additions & 0 deletions src/runloop_api_client/types/devbox_snapshot_disk_async_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Dict, Optional
from typing_extensions import TypedDict

__all__ = ["DevboxSnapshotDiskAsyncParams"]


class DevboxSnapshotDiskAsyncParams(TypedDict, total=False):
metadata: Optional[Dict[str, str]]
"""(Optional) Metadata used to describe the snapshot"""

name: Optional[str]
"""(Optional) A user specified name to give the snapshot"""
Loading
Loading