From 597df884cf33c10fadb2148393bef626aaf23c53 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 30 Apr 2025 21:43:51 +0000
Subject: [PATCH 01/10] feat(api): api update
---
.stats.yml | 6 +-
api.md | 29 +++----
.../resources/benchmarks/benchmarks.py | 45 +++++-----
.../resources/scenarios/scenarios.py | 54 ++++++------
src/runloop_api_client/types/__init__.py | 11 +--
.../types/benchmark_create_response.py | 26 ------
.../types/benchmark_list_public_response.py | 26 ------
.../types/benchmark_retrieve_response.py | 26 ------
...ark_list_response.py => benchmark_view.py} | 4 +-
.../types/scenario_create_response.py | 40 ---------
.../types/scenario_list_public_response.py | 40 ---------
.../types/scenario_retrieve_response.py | 40 ---------
.../types/scenario_update_response.py | 40 ---------
...ario_list_response.py => scenario_view.py} | 4 +-
tests/api_resources/test_benchmarks.py | 65 +++++++--------
tests/api_resources/test_scenarios.py | 82 +++++++++----------
16 files changed, 136 insertions(+), 402 deletions(-)
delete mode 100644 src/runloop_api_client/types/benchmark_create_response.py
delete mode 100644 src/runloop_api_client/types/benchmark_list_public_response.py
delete mode 100644 src/runloop_api_client/types/benchmark_retrieve_response.py
rename src/runloop_api_client/types/{benchmark_list_response.py => benchmark_view.py} (88%)
delete mode 100644 src/runloop_api_client/types/scenario_create_response.py
delete mode 100644 src/runloop_api_client/types/scenario_list_public_response.py
delete mode 100644 src/runloop_api_client/types/scenario_retrieve_response.py
delete mode 100644 src/runloop_api_client/types/scenario_update_response.py
rename src/runloop_api_client/types/{scenario_list_response.py => scenario_view.py} (93%)
diff --git a/.stats.yml b/.stats.yml
index bae579201..f3bd95afb 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 79
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ba1b6db5490b976ad56ecea10d380f462ec5b9f8d47d139f87d7fff3e7df330a.yml
-openapi_spec_hash: bf76fd15629ea1a4c134c4af5436c78f
-config_hash: 4cb90c87fb61338e46c50cea9c42abd7
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8227cc69585fb2b6d4eed5266a60ed91768c97200f52f95fe022417c6e9e91da.yml
+openapi_spec_hash: e038f338d187fe1ac41d36ccce67dcc6
+config_hash: e9831eba75eecfc502817af80812f6a7
diff --git a/api.md b/api.md
index 4ac1bcb8d..8c1b856d0 100644
--- a/api.md
+++ b/api.md
@@ -13,20 +13,17 @@ from runloop_api_client.types import (
BenchmarkCreateParameters,
BenchmarkRunListView,
BenchmarkRunView,
+ BenchmarkView,
StartBenchmarkRunParameters,
- BenchmarkCreateResponse,
- BenchmarkRetrieveResponse,
- BenchmarkListResponse,
- BenchmarkListPublicResponse,
)
```
Methods:
-- client.benchmarks.create(\*\*params) -> BenchmarkCreateResponse
-- client.benchmarks.retrieve(id) -> BenchmarkRetrieveResponse
-- client.benchmarks.list(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkListResponse]
-- client.benchmarks.list_public(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]
+- client.benchmarks.create(\*\*params) -> BenchmarkView
+- client.benchmarks.retrieve(id) -> BenchmarkView
+- client.benchmarks.list(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkView]
+- client.benchmarks.list_public(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkView]
- client.benchmarks.start_run(\*\*params) -> BenchmarkRunView
## Runs
@@ -269,26 +266,22 @@ from runloop_api_client.types import (
ScenarioEnvironment,
ScenarioRunListView,
ScenarioRunView,
+ ScenarioView,
ScoringContract,
ScoringContractResultView,
ScoringFunction,
ScoringFunctionResultView,
StartScenarioRunParameters,
- ScenarioCreateResponse,
- ScenarioRetrieveResponse,
- ScenarioUpdateResponse,
- ScenarioListResponse,
- ScenarioListPublicResponse,
)
```
Methods:
-- client.scenarios.create(\*\*params) -> ScenarioCreateResponse
-- client.scenarios.retrieve(id) -> ScenarioRetrieveResponse
-- client.scenarios.update(id, \*\*params) -> ScenarioUpdateResponse
-- client.scenarios.list(\*\*params) -> SyncScenariosCursorIDPage[ScenarioListResponse]
-- client.scenarios.list_public(\*\*params) -> SyncScenariosCursorIDPage[ScenarioListPublicResponse]
+- client.scenarios.create(\*\*params) -> ScenarioView
+- client.scenarios.retrieve(id) -> ScenarioView
+- client.scenarios.update(id, \*\*params) -> ScenarioView
+- client.scenarios.list(\*\*params) -> SyncScenariosCursorIDPage[ScenarioView]
+- client.scenarios.list_public(\*\*params) -> SyncScenariosCursorIDPage[ScenarioView]
- client.scenarios.start_run(\*\*params) -> ScenarioRunView
## Runs
diff --git a/src/runloop_api_client/resources/benchmarks/benchmarks.py b/src/runloop_api_client/resources/benchmarks/benchmarks.py
index beb5f42c3..3b2823b3d 100644
--- a/src/runloop_api_client/resources/benchmarks/benchmarks.py
+++ b/src/runloop_api_client/resources/benchmarks/benchmarks.py
@@ -32,11 +32,8 @@
)
from ...pagination import SyncBenchmarksCursorIDPage, AsyncBenchmarksCursorIDPage
from ..._base_client import AsyncPaginator, make_request_options
+from ...types.benchmark_view import BenchmarkView
from ...types.benchmark_run_view import BenchmarkRunView
-from ...types.benchmark_list_response import BenchmarkListResponse
-from ...types.benchmark_create_response import BenchmarkCreateResponse
-from ...types.benchmark_retrieve_response import BenchmarkRetrieveResponse
-from ...types.benchmark_list_public_response import BenchmarkListPublicResponse
__all__ = ["BenchmarksResource", "AsyncBenchmarksResource"]
@@ -79,7 +76,7 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> BenchmarkCreateResponse:
+ ) -> BenchmarkView:
"""
Create a Benchmark with a set of Scenarios.
@@ -120,7 +117,7 @@ def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=BenchmarkCreateResponse,
+ cast_to=BenchmarkView,
)
def retrieve(
@@ -133,7 +130,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BenchmarkRetrieveResponse:
+ ) -> BenchmarkView:
"""
Get a previously created Benchmark.
@@ -153,7 +150,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=BenchmarkRetrieveResponse,
+ cast_to=BenchmarkView,
)
def list(
@@ -167,7 +164,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncBenchmarksCursorIDPage[BenchmarkListResponse]:
+ ) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
"""
List all Benchmarks matching filter.
@@ -186,7 +183,7 @@ def list(
"""
return self._get_api_list(
"/v1/benchmarks",
- page=SyncBenchmarksCursorIDPage[BenchmarkListResponse],
+ page=SyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -200,7 +197,7 @@ def list(
benchmark_list_params.BenchmarkListParams,
),
),
- model=BenchmarkListResponse,
+ model=BenchmarkView,
)
def list_public(
@@ -214,7 +211,7 @@ def list_public(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]:
+ ) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
"""
List all public benchmarks matching filter.
@@ -233,7 +230,7 @@ def list_public(
"""
return self._get_api_list(
"/v1/benchmarks/list_public",
- page=SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
+ page=SyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -247,7 +244,7 @@ def list_public(
benchmark_list_public_params.BenchmarkListPublicParams,
),
),
- model=BenchmarkListPublicResponse,
+ model=BenchmarkView,
)
def start_run(
@@ -343,7 +340,7 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> BenchmarkCreateResponse:
+ ) -> BenchmarkView:
"""
Create a Benchmark with a set of Scenarios.
@@ -384,7 +381,7 @@ async def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=BenchmarkCreateResponse,
+ cast_to=BenchmarkView,
)
async def retrieve(
@@ -397,7 +394,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BenchmarkRetrieveResponse:
+ ) -> BenchmarkView:
"""
Get a previously created Benchmark.
@@ -417,7 +414,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=BenchmarkRetrieveResponse,
+ cast_to=BenchmarkView,
)
def list(
@@ -431,7 +428,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[BenchmarkListResponse, AsyncBenchmarksCursorIDPage[BenchmarkListResponse]]:
+ ) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
"""
List all Benchmarks matching filter.
@@ -450,7 +447,7 @@ def list(
"""
return self._get_api_list(
"/v1/benchmarks",
- page=AsyncBenchmarksCursorIDPage[BenchmarkListResponse],
+ page=AsyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -464,7 +461,7 @@ def list(
benchmark_list_params.BenchmarkListParams,
),
),
- model=BenchmarkListResponse,
+ model=BenchmarkView,
)
def list_public(
@@ -478,7 +475,7 @@ def list_public(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[BenchmarkListPublicResponse, AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]]:
+ ) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
"""
List all public benchmarks matching filter.
@@ -497,7 +494,7 @@ def list_public(
"""
return self._get_api_list(
"/v1/benchmarks/list_public",
- page=AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
+ page=AsyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -511,7 +508,7 @@ def list_public(
benchmark_list_public_params.BenchmarkListPublicParams,
),
),
- model=BenchmarkListPublicResponse,
+ model=BenchmarkView,
)
async def start_run(
diff --git a/src/runloop_api_client/resources/scenarios/scenarios.py b/src/runloop_api_client/resources/scenarios/scenarios.py
index 31aa4274b..1adec8d66 100644
--- a/src/runloop_api_client/resources/scenarios/scenarios.py
+++ b/src/runloop_api_client/resources/scenarios/scenarios.py
@@ -42,15 +42,11 @@
from ...pagination import SyncScenariosCursorIDPage, AsyncScenariosCursorIDPage
from ...lib.polling import PollingConfig
from ..._base_client import AsyncPaginator, make_request_options
+from ...types.scenario_view import ScenarioView
from ...types.scenario_run_view import ScenarioRunView
from ...types.input_context_param import InputContextParam
-from ...types.scenario_list_response import ScenarioListResponse
from ...types.scoring_contract_param import ScoringContractParam
-from ...types.scenario_create_response import ScenarioCreateResponse
-from ...types.scenario_update_response import ScenarioUpdateResponse
from ...types.scenario_environment_param import ScenarioEnvironmentParam
-from ...types.scenario_retrieve_response import ScenarioRetrieveResponse
-from ...types.scenario_list_public_response import ScenarioListPublicResponse
__all__ = ["ScenariosResource", "AsyncScenariosResource"]
@@ -100,7 +96,7 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ScenarioCreateResponse:
+ ) -> ScenarioView:
"""
Create a Scenario, a repeatable AI coding evaluation test that defines the
starting environment as well as evaluation success criteria.
@@ -153,7 +149,7 @@ def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=ScenarioCreateResponse,
+ cast_to=ScenarioView,
)
def retrieve(
@@ -166,7 +162,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ScenarioRetrieveResponse:
+ ) -> ScenarioView:
"""
Get a previously created scenario.
@@ -186,7 +182,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=ScenarioRetrieveResponse,
+ cast_to=ScenarioView,
)
def update(
@@ -207,7 +203,7 @@ def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ScenarioUpdateResponse:
+ ) -> ScenarioView:
"""
Update a Scenario, a repeatable AI coding evaluation test that defines the
starting environment as well as evaluation success criteria.
@@ -262,7 +258,7 @@ def update(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=ScenarioUpdateResponse,
+ cast_to=ScenarioView,
)
def list(
@@ -277,7 +273,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncScenariosCursorIDPage[ScenarioListResponse]:
+ ) -> SyncScenariosCursorIDPage[ScenarioView]:
"""List all Scenarios matching filter.
Args:
@@ -299,7 +295,7 @@ def list(
"""
return self._get_api_list(
"/v1/scenarios",
- page=SyncScenariosCursorIDPage[ScenarioListResponse],
+ page=SyncScenariosCursorIDPage[ScenarioView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -314,7 +310,7 @@ def list(
scenario_list_params.ScenarioListParams,
),
),
- model=ScenarioListResponse,
+ model=ScenarioView,
)
def list_public(
@@ -329,7 +325,7 @@ def list_public(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncScenariosCursorIDPage[ScenarioListPublicResponse]:
+ ) -> SyncScenariosCursorIDPage[ScenarioView]:
"""
List all public scenarios matching filter.
@@ -350,7 +346,7 @@ def list_public(
"""
return self._get_api_list(
"/v1/scenarios/list_public",
- page=SyncScenariosCursorIDPage[ScenarioListPublicResponse],
+ page=SyncScenariosCursorIDPage[ScenarioView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -365,7 +361,7 @@ def list_public(
scenario_list_public_params.ScenarioListPublicParams,
),
),
- model=ScenarioListPublicResponse,
+ model=ScenarioView,
)
def start_run(
@@ -531,7 +527,7 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ScenarioCreateResponse:
+ ) -> ScenarioView:
"""
Create a Scenario, a repeatable AI coding evaluation test that defines the
starting environment as well as evaluation success criteria.
@@ -584,7 +580,7 @@ async def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=ScenarioCreateResponse,
+ cast_to=ScenarioView,
)
async def retrieve(
@@ -597,7 +593,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ScenarioRetrieveResponse:
+ ) -> ScenarioView:
"""
Get a previously created scenario.
@@ -617,7 +613,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=ScenarioRetrieveResponse,
+ cast_to=ScenarioView,
)
async def update(
@@ -638,7 +634,7 @@ async def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ScenarioUpdateResponse:
+ ) -> ScenarioView:
"""
Update a Scenario, a repeatable AI coding evaluation test that defines the
starting environment as well as evaluation success criteria.
@@ -693,7 +689,7 @@ async def update(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=ScenarioUpdateResponse,
+ cast_to=ScenarioView,
)
def list(
@@ -708,7 +704,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[ScenarioListResponse, AsyncScenariosCursorIDPage[ScenarioListResponse]]:
+ ) -> AsyncPaginator[ScenarioView, AsyncScenariosCursorIDPage[ScenarioView]]:
"""List all Scenarios matching filter.
Args:
@@ -730,7 +726,7 @@ def list(
"""
return self._get_api_list(
"/v1/scenarios",
- page=AsyncScenariosCursorIDPage[ScenarioListResponse],
+ page=AsyncScenariosCursorIDPage[ScenarioView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -745,7 +741,7 @@ def list(
scenario_list_params.ScenarioListParams,
),
),
- model=ScenarioListResponse,
+ model=ScenarioView,
)
def list_public(
@@ -760,7 +756,7 @@ def list_public(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[ScenarioListPublicResponse, AsyncScenariosCursorIDPage[ScenarioListPublicResponse]]:
+ ) -> AsyncPaginator[ScenarioView, AsyncScenariosCursorIDPage[ScenarioView]]:
"""
List all public scenarios matching filter.
@@ -781,7 +777,7 @@ def list_public(
"""
return self._get_api_list(
"/v1/scenarios/list_public",
- page=AsyncScenariosCursorIDPage[ScenarioListPublicResponse],
+ page=AsyncScenariosCursorIDPage[ScenarioView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -796,7 +792,7 @@ def list_public(
scenario_list_public_params.ScenarioListPublicParams,
),
),
- model=ScenarioListPublicResponse,
+ model=ScenarioView,
)
async def start_run(
diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py
index 88e630982..f3dbc61d9 100644
--- a/src/runloop_api_client/types/__init__.py
+++ b/src/runloop_api_client/types/__init__.py
@@ -9,6 +9,8 @@
)
from .devbox_view import DevboxView as DevboxView
from .input_context import InputContext as InputContext
+from .scenario_view import ScenarioView as ScenarioView
+from .benchmark_view import BenchmarkView as BenchmarkView
from .blueprint_view import BlueprintView as BlueprintView
from .devbox_list_view import DevboxListView as DevboxListView
from .scoring_contract import ScoringContract as ScoringContract
@@ -30,20 +32,15 @@
from .blueprint_preview_view import BlueprintPreviewView as BlueprintPreviewView
from .repository_list_params import RepositoryListParams as RepositoryListParams
from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
-from .scenario_list_response import ScenarioListResponse as ScenarioListResponse
from .scenario_run_list_view import ScenarioRunListView as ScenarioRunListView
from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
from .scoring_contract_param import ScoringContractParam as ScoringContractParam
from .scoring_function_param import ScoringFunctionParam as ScoringFunctionParam
from .benchmark_create_params import BenchmarkCreateParams as BenchmarkCreateParams
-from .benchmark_list_response import BenchmarkListResponse as BenchmarkListResponse
from .benchmark_run_list_view import BenchmarkRunListView as BenchmarkRunListView
from .blueprint_create_params import BlueprintCreateParams as BlueprintCreateParams
from .blueprint_preview_params import BlueprintPreviewParams as BlueprintPreviewParams
from .repository_create_params import RepositoryCreateParams as RepositoryCreateParams
-from .scenario_create_response import ScenarioCreateResponse as ScenarioCreateResponse
-from .scenario_update_response import ScenarioUpdateResponse as ScenarioUpdateResponse
-from .benchmark_create_response import BenchmarkCreateResponse as BenchmarkCreateResponse
from .devbox_snapshot_list_view import DevboxSnapshotListView as DevboxSnapshotListView
from .devbox_upload_file_params import DevboxUploadFileParams as DevboxUploadFileParams
from .scenario_start_run_params import ScenarioStartRunParams as ScenarioStartRunParams
@@ -53,8 +50,6 @@
from .repository_connection_view import RepositoryConnectionView as RepositoryConnectionView
from .repository_version_details import RepositoryVersionDetails as RepositoryVersionDetails
from .scenario_environment_param import ScenarioEnvironmentParam as ScenarioEnvironmentParam
-from .scenario_retrieve_response import ScenarioRetrieveResponse as ScenarioRetrieveResponse
-from .benchmark_retrieve_response import BenchmarkRetrieveResponse as BenchmarkRetrieveResponse
from .devbox_create_tunnel_params import DevboxCreateTunnelParams as DevboxCreateTunnelParams
from .devbox_download_file_params import DevboxDownloadFileParams as DevboxDownloadFileParams
from .devbox_execute_async_params import DevboxExecuteAsyncParams as DevboxExecuteAsyncParams
@@ -66,8 +61,6 @@
from .repository_version_list_view import RepositoryVersionListView as RepositoryVersionListView
from .scoring_contract_result_view import ScoringContractResultView as ScoringContractResultView
from .scoring_function_result_view import ScoringFunctionResultView as ScoringFunctionResultView
-from .scenario_list_public_response import ScenarioListPublicResponse as ScenarioListPublicResponse
-from .benchmark_list_public_response import BenchmarkListPublicResponse as BenchmarkListPublicResponse
from .blueprint_build_logs_list_view import BlueprintBuildLogsListView as BlueprintBuildLogsListView
from .devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse as DevboxCreateSSHKeyResponse
from .repository_connection_list_view import RepositoryConnectionListView as RepositoryConnectionListView
diff --git a/src/runloop_api_client/types/benchmark_create_response.py b/src/runloop_api_client/types/benchmark_create_response.py
deleted file mode 100644
index b0c62817a..000000000
--- a/src/runloop_api_client/types/benchmark_create_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Optional
-
-from pydantic import Field as FieldInfo
-
-from .._models import BaseModel
-
-__all__ = ["BenchmarkCreateResponse"]
-
-
-class BenchmarkCreateResponse(BaseModel):
- id: str
- """The ID of the Benchmark."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the benchmark for organization."""
-
- name: str
- """The name of the Benchmark."""
-
- scenario_ids: List[str] = FieldInfo(alias="scenarioIds")
- """List of Scenario IDs that make up the benchmark."""
-
- is_public: Optional[bool] = None
- """Whether this benchmark is public."""
diff --git a/src/runloop_api_client/types/benchmark_list_public_response.py b/src/runloop_api_client/types/benchmark_list_public_response.py
deleted file mode 100644
index 4df643f8d..000000000
--- a/src/runloop_api_client/types/benchmark_list_public_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Optional
-
-from pydantic import Field as FieldInfo
-
-from .._models import BaseModel
-
-__all__ = ["BenchmarkListPublicResponse"]
-
-
-class BenchmarkListPublicResponse(BaseModel):
- id: str
- """The ID of the Benchmark."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the benchmark for organization."""
-
- name: str
- """The name of the Benchmark."""
-
- scenario_ids: List[str] = FieldInfo(alias="scenarioIds")
- """List of Scenario IDs that make up the benchmark."""
-
- is_public: Optional[bool] = None
- """Whether this benchmark is public."""
diff --git a/src/runloop_api_client/types/benchmark_retrieve_response.py b/src/runloop_api_client/types/benchmark_retrieve_response.py
deleted file mode 100644
index c704a6209..000000000
--- a/src/runloop_api_client/types/benchmark_retrieve_response.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Optional
-
-from pydantic import Field as FieldInfo
-
-from .._models import BaseModel
-
-__all__ = ["BenchmarkRetrieveResponse"]
-
-
-class BenchmarkRetrieveResponse(BaseModel):
- id: str
- """The ID of the Benchmark."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the benchmark for organization."""
-
- name: str
- """The name of the Benchmark."""
-
- scenario_ids: List[str] = FieldInfo(alias="scenarioIds")
- """List of Scenario IDs that make up the benchmark."""
-
- is_public: Optional[bool] = None
- """Whether this benchmark is public."""
diff --git a/src/runloop_api_client/types/benchmark_list_response.py b/src/runloop_api_client/types/benchmark_view.py
similarity index 88%
rename from src/runloop_api_client/types/benchmark_list_response.py
rename to src/runloop_api_client/types/benchmark_view.py
index 2578ec19c..ceab4ff95 100644
--- a/src/runloop_api_client/types/benchmark_list_response.py
+++ b/src/runloop_api_client/types/benchmark_view.py
@@ -6,10 +6,10 @@
from .._models import BaseModel
-__all__ = ["BenchmarkListResponse"]
+__all__ = ["BenchmarkView"]
-class BenchmarkListResponse(BaseModel):
+class BenchmarkView(BaseModel):
id: str
"""The ID of the Benchmark."""
diff --git a/src/runloop_api_client/types/scenario_create_response.py b/src/runloop_api_client/types/scenario_create_response.py
deleted file mode 100644
index 7ab062f96..000000000
--- a/src/runloop_api_client/types/scenario_create_response.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, Optional
-
-from .._models import BaseModel
-from .input_context import InputContext
-from .scoring_contract import ScoringContract
-from .scenario_environment import ScenarioEnvironment
-
-__all__ = ["ScenarioCreateResponse"]
-
-
-class ScenarioCreateResponse(BaseModel):
- id: str
- """The ID of the Scenario."""
-
- input_context: InputContext
- """The input context for the Scenario."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the scenario for organization."""
-
- name: str
- """The name of the Scenario."""
-
- scoring_contract: ScoringContract
- """The scoring contract for the Scenario."""
-
- environment: Optional[ScenarioEnvironment] = None
- """The Environment in which the Scenario is run."""
-
- is_public: Optional[bool] = None
- """Whether this scenario is public."""
-
- reference_output: Optional[str] = None
- """A string representation of the reference output to solve the scenario.
-
- Commonly can be the result of a git diff or a sequence of command actions to
- apply to the environment.
- """
diff --git a/src/runloop_api_client/types/scenario_list_public_response.py b/src/runloop_api_client/types/scenario_list_public_response.py
deleted file mode 100644
index 8fa375956..000000000
--- a/src/runloop_api_client/types/scenario_list_public_response.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, Optional
-
-from .._models import BaseModel
-from .input_context import InputContext
-from .scoring_contract import ScoringContract
-from .scenario_environment import ScenarioEnvironment
-
-__all__ = ["ScenarioListPublicResponse"]
-
-
-class ScenarioListPublicResponse(BaseModel):
- id: str
- """The ID of the Scenario."""
-
- input_context: InputContext
- """The input context for the Scenario."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the scenario for organization."""
-
- name: str
- """The name of the Scenario."""
-
- scoring_contract: ScoringContract
- """The scoring contract for the Scenario."""
-
- environment: Optional[ScenarioEnvironment] = None
- """The Environment in which the Scenario is run."""
-
- is_public: Optional[bool] = None
- """Whether this scenario is public."""
-
- reference_output: Optional[str] = None
- """A string representation of the reference output to solve the scenario.
-
- Commonly can be the result of a git diff or a sequence of command actions to
- apply to the environment.
- """
diff --git a/src/runloop_api_client/types/scenario_retrieve_response.py b/src/runloop_api_client/types/scenario_retrieve_response.py
deleted file mode 100644
index 21297daf1..000000000
--- a/src/runloop_api_client/types/scenario_retrieve_response.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, Optional
-
-from .._models import BaseModel
-from .input_context import InputContext
-from .scoring_contract import ScoringContract
-from .scenario_environment import ScenarioEnvironment
-
-__all__ = ["ScenarioRetrieveResponse"]
-
-
-class ScenarioRetrieveResponse(BaseModel):
- id: str
- """The ID of the Scenario."""
-
- input_context: InputContext
- """The input context for the Scenario."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the scenario for organization."""
-
- name: str
- """The name of the Scenario."""
-
- scoring_contract: ScoringContract
- """The scoring contract for the Scenario."""
-
- environment: Optional[ScenarioEnvironment] = None
- """The Environment in which the Scenario is run."""
-
- is_public: Optional[bool] = None
- """Whether this scenario is public."""
-
- reference_output: Optional[str] = None
- """A string representation of the reference output to solve the scenario.
-
- Commonly can be the result of a git diff or a sequence of command actions to
- apply to the environment.
- """
diff --git a/src/runloop_api_client/types/scenario_update_response.py b/src/runloop_api_client/types/scenario_update_response.py
deleted file mode 100644
index dd8617f71..000000000
--- a/src/runloop_api_client/types/scenario_update_response.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, Optional
-
-from .._models import BaseModel
-from .input_context import InputContext
-from .scoring_contract import ScoringContract
-from .scenario_environment import ScenarioEnvironment
-
-__all__ = ["ScenarioUpdateResponse"]
-
-
-class ScenarioUpdateResponse(BaseModel):
- id: str
- """The ID of the Scenario."""
-
- input_context: InputContext
- """The input context for the Scenario."""
-
- metadata: Dict[str, str]
- """User defined metadata to attach to the scenario for organization."""
-
- name: str
- """The name of the Scenario."""
-
- scoring_contract: ScoringContract
- """The scoring contract for the Scenario."""
-
- environment: Optional[ScenarioEnvironment] = None
- """The Environment in which the Scenario is run."""
-
- is_public: Optional[bool] = None
- """Whether this scenario is public."""
-
- reference_output: Optional[str] = None
- """A string representation of the reference output to solve the scenario.
-
- Commonly can be the result of a git diff or a sequence of command actions to
- apply to the environment.
- """
diff --git a/src/runloop_api_client/types/scenario_list_response.py b/src/runloop_api_client/types/scenario_view.py
similarity index 93%
rename from src/runloop_api_client/types/scenario_list_response.py
rename to src/runloop_api_client/types/scenario_view.py
index 1d7097172..1a3233ab7 100644
--- a/src/runloop_api_client/types/scenario_list_response.py
+++ b/src/runloop_api_client/types/scenario_view.py
@@ -7,10 +7,10 @@
from .scoring_contract import ScoringContract
from .scenario_environment import ScenarioEnvironment
-__all__ = ["ScenarioListResponse"]
+__all__ = ["ScenarioView"]
-class ScenarioListResponse(BaseModel):
+class ScenarioView(BaseModel):
id: str
"""The ID of the Scenario."""
diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py
index 7c2d47be9..19a93ad89 100644
--- a/tests/api_resources/test_benchmarks.py
+++ b/tests/api_resources/test_benchmarks.py
@@ -10,11 +10,8 @@
from tests.utils import assert_matches_type
from runloop_api_client import Runloop, AsyncRunloop
from runloop_api_client.types import (
+ BenchmarkView,
BenchmarkRunView,
- BenchmarkListResponse,
- BenchmarkCreateResponse,
- BenchmarkRetrieveResponse,
- BenchmarkListPublicResponse,
)
from runloop_api_client.pagination import SyncBenchmarksCursorIDPage, AsyncBenchmarksCursorIDPage
@@ -30,7 +27,7 @@ def test_method_create(self, client: Runloop) -> None:
is_public=True,
name="name",
)
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Runloop) -> None:
@@ -40,7 +37,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
metadata={"foo": "string"},
scenario_ids=["string"],
)
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
def test_raw_response_create(self, client: Runloop) -> None:
@@ -52,7 +49,7 @@ def test_raw_response_create(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Runloop) -> None:
@@ -64,7 +61,7 @@ def test_streaming_response_create(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -73,7 +70,7 @@ def test_method_retrieve(self, client: Runloop) -> None:
benchmark = client.benchmarks.retrieve(
"id",
)
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Runloop) -> None:
@@ -84,7 +81,7 @@ def test_raw_response_retrieve(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
def test_streaming_response_retrieve(self, client: Runloop) -> None:
@@ -95,7 +92,7 @@ def test_streaming_response_retrieve(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -109,7 +106,7 @@ def test_path_params_retrieve(self, client: Runloop) -> None:
@parametrize
def test_method_list(self, client: Runloop) -> None:
benchmark = client.benchmarks.list()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Runloop) -> None:
@@ -117,7 +114,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
limit=0,
starting_after="starting_after",
)
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_raw_response_list(self, client: Runloop) -> None:
@@ -126,7 +123,7 @@ def test_raw_response_list(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Runloop) -> None:
@@ -135,14 +132,14 @@ def test_streaming_response_list(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_list_public(self, client: Runloop) -> None:
benchmark = client.benchmarks.list_public()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_method_list_public_with_all_params(self, client: Runloop) -> None:
@@ -150,7 +147,7 @@ def test_method_list_public_with_all_params(self, client: Runloop) -> None:
limit=0,
starting_after="starting_after",
)
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_raw_response_list_public(self, client: Runloop) -> None:
@@ -159,7 +156,7 @@ def test_raw_response_list_public(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
def test_streaming_response_list_public(self, client: Runloop) -> None:
@@ -168,7 +165,7 @@ def test_streaming_response_list_public(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = response.parse()
- assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(SyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -222,7 +219,7 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None:
is_public=True,
name="name",
)
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -232,7 +229,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
metadata={"foo": "string"},
scenario_ids=["string"],
)
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
@@ -244,7 +241,7 @@ async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncRunloop) -> None:
@@ -256,7 +253,7 @@ async def test_streaming_response_create(self, async_client: AsyncRunloop) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(BenchmarkCreateResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -265,7 +262,7 @@ async def test_method_retrieve(self, async_client: AsyncRunloop) -> None:
benchmark = await async_client.benchmarks.retrieve(
"id",
)
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncRunloop) -> None:
@@ -276,7 +273,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncRunloop) -> None:
@@ -287,7 +284,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncRunloop) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(BenchmarkRetrieveResponse, benchmark, path=["response"])
+ assert_matches_type(BenchmarkView, benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -301,7 +298,7 @@ async def test_path_params_retrieve(self, async_client: AsyncRunloop) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncRunloop) -> None:
benchmark = await async_client.benchmarks.list()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -309,7 +306,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
limit=0,
starting_after="starting_after",
)
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
@@ -318,7 +315,7 @@ async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None:
@@ -327,14 +324,14 @@ async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_list_public(self, async_client: AsyncRunloop) -> None:
benchmark = await async_client.benchmarks.list_public()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_method_list_public_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -342,7 +339,7 @@ async def test_method_list_public_with_all_params(self, async_client: AsyncRunlo
limit=0,
starting_after="starting_after",
)
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_raw_response_list_public(self, async_client: AsyncRunloop) -> None:
@@ -351,7 +348,7 @@ async def test_raw_response_list_public(self, async_client: AsyncRunloop) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
@parametrize
async def test_streaming_response_list_public(self, async_client: AsyncRunloop) -> None:
@@ -360,7 +357,7 @@ async def test_streaming_response_list_public(self, async_client: AsyncRunloop)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
benchmark = await response.parse()
- assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse], benchmark, path=["response"])
+ assert_matches_type(AsyncBenchmarksCursorIDPage[BenchmarkView], benchmark, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_scenarios.py b/tests/api_resources/test_scenarios.py
index 6f7183bf8..a55134679 100644
--- a/tests/api_resources/test_scenarios.py
+++ b/tests/api_resources/test_scenarios.py
@@ -10,12 +10,8 @@
from tests.utils import assert_matches_type
from runloop_api_client import Runloop, AsyncRunloop
from runloop_api_client.types import (
+ ScenarioView,
ScenarioRunView,
- ScenarioListResponse,
- ScenarioCreateResponse,
- ScenarioUpdateResponse,
- ScenarioRetrieveResponse,
- ScenarioListPublicResponse,
)
from runloop_api_client.pagination import SyncScenariosCursorIDPage, AsyncScenariosCursorIDPage
@@ -45,7 +41,7 @@ def test_method_create(self, client: Runloop) -> None:
]
},
)
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Runloop) -> None:
@@ -96,7 +92,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
metadata={"foo": "string"},
reference_output="reference_output",
)
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_raw_response_create(self, client: Runloop) -> None:
@@ -122,7 +118,7 @@ def test_raw_response_create(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Runloop) -> None:
@@ -148,7 +144,7 @@ def test_streaming_response_create(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -157,7 +153,7 @@ def test_method_retrieve(self, client: Runloop) -> None:
scenario = client.scenarios.retrieve(
"id",
)
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Runloop) -> None:
@@ -168,7 +164,7 @@ def test_raw_response_retrieve(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_streaming_response_retrieve(self, client: Runloop) -> None:
@@ -179,7 +175,7 @@ def test_streaming_response_retrieve(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -211,7 +207,7 @@ def test_method_update(self, client: Runloop) -> None:
]
},
)
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Runloop) -> None:
@@ -263,7 +259,7 @@ def test_method_update_with_all_params(self, client: Runloop) -> None:
metadata={"foo": "string"},
reference_output="reference_output",
)
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_raw_response_update(self, client: Runloop) -> None:
@@ -290,7 +286,7 @@ def test_raw_response_update(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Runloop) -> None:
@@ -317,7 +313,7 @@ def test_streaming_response_update(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -347,7 +343,7 @@ def test_path_params_update(self, client: Runloop) -> None:
@parametrize
def test_method_list(self, client: Runloop) -> None:
scenario = client.scenarios.list()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Runloop) -> None:
@@ -356,7 +352,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
name="name",
starting_after="starting_after",
)
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_raw_response_list(self, client: Runloop) -> None:
@@ -365,7 +361,7 @@ def test_raw_response_list(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Runloop) -> None:
@@ -374,14 +370,14 @@ def test_streaming_response_list(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_list_public(self, client: Runloop) -> None:
scenario = client.scenarios.list_public()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_method_list_public_with_all_params(self, client: Runloop) -> None:
@@ -390,7 +386,7 @@ def test_method_list_public_with_all_params(self, client: Runloop) -> None:
name="name",
starting_after="starting_after",
)
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_raw_response_list_public(self, client: Runloop) -> None:
@@ -399,7 +395,7 @@ def test_raw_response_list_public(self, client: Runloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
def test_streaming_response_list_public(self, client: Runloop) -> None:
@@ -408,7 +404,7 @@ def test_streaming_response_list_public(self, client: Runloop) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = response.parse()
- assert_matches_type(SyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(SyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -477,7 +473,7 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None:
]
},
)
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -528,7 +524,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
metadata={"foo": "string"},
reference_output="reference_output",
)
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
@@ -554,7 +550,7 @@ async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncRunloop) -> None:
@@ -580,7 +576,7 @@ async def test_streaming_response_create(self, async_client: AsyncRunloop) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioCreateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -589,7 +585,7 @@ async def test_method_retrieve(self, async_client: AsyncRunloop) -> None:
scenario = await async_client.scenarios.retrieve(
"id",
)
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncRunloop) -> None:
@@ -600,7 +596,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncRunloop) -> None:
@@ -611,7 +607,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncRunloop) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioRetrieveResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -643,7 +639,7 @@ async def test_method_update(self, async_client: AsyncRunloop) -> None:
]
},
)
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -695,7 +691,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) -
metadata={"foo": "string"},
reference_output="reference_output",
)
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncRunloop) -> None:
@@ -722,7 +718,7 @@ async def test_raw_response_update(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncRunloop) -> None:
@@ -749,7 +745,7 @@ async def test_streaming_response_update(self, async_client: AsyncRunloop) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(ScenarioUpdateResponse, scenario, path=["response"])
+ assert_matches_type(ScenarioView, scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -779,7 +775,7 @@ async def test_path_params_update(self, async_client: AsyncRunloop) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncRunloop) -> None:
scenario = await async_client.scenarios.list()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -788,7 +784,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
name="name",
starting_after="starting_after",
)
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
@@ -797,7 +793,7 @@ async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None:
@@ -806,14 +802,14 @@ async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_list_public(self, async_client: AsyncRunloop) -> None:
scenario = await async_client.scenarios.list_public()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_method_list_public_with_all_params(self, async_client: AsyncRunloop) -> None:
@@ -822,7 +818,7 @@ async def test_method_list_public_with_all_params(self, async_client: AsyncRunlo
name="name",
starting_after="starting_after",
)
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_raw_response_list_public(self, async_client: AsyncRunloop) -> None:
@@ -831,7 +827,7 @@ async def test_raw_response_list_public(self, async_client: AsyncRunloop) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
@parametrize
async def test_streaming_response_list_public(self, async_client: AsyncRunloop) -> None:
@@ -840,7 +836,7 @@ async def test_streaming_response_list_public(self, async_client: AsyncRunloop)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
scenario = await response.parse()
- assert_matches_type(AsyncScenariosCursorIDPage[ScenarioListPublicResponse], scenario, path=["response"])
+ assert_matches_type(AsyncScenariosCursorIDPage[ScenarioView], scenario, path=["response"])
assert cast(Any, response.is_closed) is True
From e825829b51d90c2d2b18b0f6d0864ee8fc1b0419 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 9 May 2025 04:19:36 +0000
Subject: [PATCH 02/10] chore(internal): avoid errors for isinstance checks on
proxies
---
src/runloop_api_client/_utils/_proxy.py | 5 ++++-
tests/test_utils/test_proxy.py | 11 +++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/runloop_api_client/_utils/_proxy.py b/src/runloop_api_client/_utils/_proxy.py
index ffd883e9d..0f239a33c 100644
--- a/src/runloop_api_client/_utils/_proxy.py
+++ b/src/runloop_api_client/_utils/_proxy.py
@@ -46,7 +46,10 @@ def __dir__(self) -> Iterable[str]:
@property # type: ignore
@override
def __class__(self) -> type: # pyright: ignore
- proxied = self.__get_proxied__()
+ try:
+ proxied = self.__get_proxied__()
+ except Exception:
+ return type(self)
if issubclass(type(proxied), LazyProxy):
return type(proxied)
return proxied.__class__
diff --git a/tests/test_utils/test_proxy.py b/tests/test_utils/test_proxy.py
index af0c2a623..e3506d9c3 100644
--- a/tests/test_utils/test_proxy.py
+++ b/tests/test_utils/test_proxy.py
@@ -21,3 +21,14 @@ def test_recursive_proxy() -> None:
assert dir(proxy) == []
assert type(proxy).__name__ == "RecursiveLazyProxy"
assert type(operator.attrgetter("name.foo.bar.baz")(proxy)).__name__ == "RecursiveLazyProxy"
+
+
+def test_isinstance_does_not_error() -> None:
+ class AlwaysErrorProxy(LazyProxy[Any]):
+ @override
+ def __load__(self) -> Any:
+ raise RuntimeError("Mocking missing dependency")
+
+ proxy = AlwaysErrorProxy()
+ assert not isinstance(proxy, dict)
+ assert isinstance(proxy, LazyProxy)
From a08fe0e64744f7edb832574c8ed66ecb181cdeba Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 9 May 2025 20:46:54 +0000
Subject: [PATCH 03/10] feat(api): api update
---
.stats.yml | 4 ++--
src/runloop_api_client/resources/benchmarks/benchmarks.py | 4 ++--
src/runloop_api_client/types/benchmark_create_params.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f3bd95afb..975ec3b38 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 79
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8227cc69585fb2b6d4eed5266a60ed91768c97200f52f95fe022417c6e9e91da.yml
-openapi_spec_hash: e038f338d187fe1ac41d36ccce67dcc6
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-31e39bc164768e4e73feb3ed3727643705b455e322c91e7fff1dfb2df504d2e8.yml
+openapi_spec_hash: 3f2c3d5358dc1732a92e3fed0f5cbcd7
config_hash: e9831eba75eecfc502817af80812f6a7
diff --git a/src/runloop_api_client/resources/benchmarks/benchmarks.py b/src/runloop_api_client/resources/benchmarks/benchmarks.py
index 3b2823b3d..0c77ce342 100644
--- a/src/runloop_api_client/resources/benchmarks/benchmarks.py
+++ b/src/runloop_api_client/resources/benchmarks/benchmarks.py
@@ -83,7 +83,7 @@ def create(
Args:
is_public: Whether this benchmark is public.
- name: The name of the Benchmark.
+ name: The name of the Benchmark. This must be unique.
metadata: User defined metadata to attach to the benchmark for organization.
@@ -347,7 +347,7 @@ async def create(
Args:
is_public: Whether this benchmark is public.
- name: The name of the Benchmark.
+ name: The name of the Benchmark. This must be unique.
metadata: User defined metadata to attach to the benchmark for organization.
diff --git a/src/runloop_api_client/types/benchmark_create_params.py b/src/runloop_api_client/types/benchmark_create_params.py
index 27aabe737..7e1621f59 100644
--- a/src/runloop_api_client/types/benchmark_create_params.py
+++ b/src/runloop_api_client/types/benchmark_create_params.py
@@ -13,7 +13,7 @@ class BenchmarkCreateParams(TypedDict, total=False):
"""Whether this benchmark is public."""
name: Required[str]
- """The name of the Benchmark."""
+ """The name of the Benchmark. This must be unique."""
metadata: Optional[Dict[str, str]]
"""User defined metadata to attach to the benchmark for organization."""
From 44f30d62901a439f835e7ea9367d2691de8844a8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 10 May 2025 03:40:13 +0000
Subject: [PATCH 04/10] fix(package): support direct resource imports
---
src/runloop_api_client/__init__.py | 5 ++++
.../_utils/_resources_proxy.py | 24 +++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 src/runloop_api_client/_utils/_resources_proxy.py
diff --git a/src/runloop_api_client/__init__.py b/src/runloop_api_client/__init__.py
index 42d79a14c..fd4bc5d8d 100644
--- a/src/runloop_api_client/__init__.py
+++ b/src/runloop_api_client/__init__.py
@@ -1,5 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+import typing as _t
+
from . import types
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
from ._utils import file_from_path
@@ -68,6 +70,9 @@
"DefaultAsyncHttpxClient",
]
+if not _t.TYPE_CHECKING:
+ from ._utils._resources_proxy import resources as resources
+
_setup_logging()
# Update the __module__ attribute for exported symbols so that
diff --git a/src/runloop_api_client/_utils/_resources_proxy.py b/src/runloop_api_client/_utils/_resources_proxy.py
new file mode 100644
index 000000000..a3b5c0479
--- /dev/null
+++ b/src/runloop_api_client/_utils/_resources_proxy.py
@@ -0,0 +1,24 @@
+from __future__ import annotations
+
+from typing import Any
+from typing_extensions import override
+
+from ._proxy import LazyProxy
+
+
+class ResourcesProxy(LazyProxy[Any]):
+ """A proxy for the `runloop_api_client.resources` module.
+
+ This is used so that we can lazily import `runloop_api_client.resources` only when
+ needed *and* so that users can just import `runloop_api_client` and reference `runloop_api_client.resources`
+ """
+
+ @override
+ def __load__(self) -> Any:
+ import importlib
+
+ mod = importlib.import_module("runloop_api_client.resources")
+ return mod
+
+
+resources = ResourcesProxy().__as_proxied__()
From 25dbae18d04f12b9a19dac7cea76546b6be0acab Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 15 May 2025 05:01:55 +0000
Subject: [PATCH 05/10] chore(ci): upload sdks to package manager
---
.github/workflows/ci.yml | 24 ++++++++++++++++++++++++
scripts/utils/upload-artifact.sh | 25 +++++++++++++++++++++++++
2 files changed, 49 insertions(+)
create mode 100755 scripts/utils/upload-artifact.sh
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 87c2de57f..f88c4fe28 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,6 +30,30 @@ jobs:
- name: Run lints
run: ./scripts/lint
+ upload:
+ if: github.repository == 'stainless-sdks/runloop-python'
+ timeout-minutes: 10
+ name: upload
+ permissions:
+ contents: read
+ id-token: write
+ runs-on: depot-ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Get GitHub OIDC Token
+ id: github-oidc
+ uses: actions/github-script@v6
+ with:
+ script: core.setOutput('github_token', await core.getIDToken());
+
+ - name: Upload tarball
+ env:
+ URL: https://pkg.stainless.com/s
+ AUTH: ${{ steps.github-oidc.outputs.github_token }}
+ SHA: ${{ github.sha }}
+ run: ./scripts/utils/upload-artifact.sh
+
test:
timeout-minutes: 10
name: test
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
new file mode 100755
index 000000000..b1f9b36b1
--- /dev/null
+++ b/scripts/utils/upload-artifact.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+set -exuo pipefail
+
+RESPONSE=$(curl -X POST "$URL" \
+ -H "Authorization: Bearer $AUTH" \
+ -H "Content-Type: application/json")
+
+SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url')
+
+if [[ "$SIGNED_URL" == "null" ]]; then
+ echo -e "\033[31mFailed to get signed URL.\033[0m"
+ exit 1
+fi
+
+UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
+ -H "Content-Type: application/gzip" \
+ --data-binary @- "$SIGNED_URL" 2>&1)
+
+if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
+ echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
+ echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/runloop-python/$SHA'\033[0m"
+else
+ echo -e "\033[31mFailed to upload artifact.\033[0m"
+ exit 1
+fi
From 5fed44abc7323ac5360c60a3c2472b24c3a7359a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 16 May 2025 03:51:03 +0000
Subject: [PATCH 06/10] chore(ci): fix installation instructions
---
scripts/utils/upload-artifact.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index b1f9b36b1..01188eb0a 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/runloop-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/runloop-python/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
From a0c74a50c8209448b1eaaf29416fc30a25c5eecc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 22 May 2025 02:36:24 +0000
Subject: [PATCH 07/10] chore(docs): grammar improvements
---
SECURITY.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SECURITY.md b/SECURITY.md
index 3524f0045..6426d978b 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -16,11 +16,11 @@ before making any information public.
## Reporting Non-SDK Related Security Issues
If you encounter security issues that are not directly related to SDKs but pertain to the services
-or products provided by Runloop please follow the respective company's security reporting guidelines.
+or products provided by Runloop, please follow the respective company's security reporting guidelines.
### Runloop Terms and Policies
-Please contact support@runloop.ai for any questions or concerns regarding security of our services.
+Please contact support@runloop.ai for any questions or concerns regarding the security of our services.
---
From d86368b9d942d4eada396ad864f2f75dfeec3f1a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 22 May 2025 21:35:46 +0000
Subject: [PATCH 08/10] feat(api): api update
---
.stats.yml | 6 +--
README.md | 4 +-
src/runloop_api_client/_constants.py | 4 +-
.../resources/devboxes/devboxes.py | 38 +++++++++++++------
.../resources/devboxes/disk_snapshots.py | 24 +++++++++++-
.../devbox_list_disk_snapshots_params.py | 13 ++++++-
.../devboxes/disk_snapshot_list_params.py | 13 ++++++-
.../devboxes/test_disk_snapshots.py | 4 ++
tests/api_resources/test_devboxes.py | 4 ++
9 files changed, 87 insertions(+), 23 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 975ec3b38..4506c9ccb 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 79
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-31e39bc164768e4e73feb3ed3727643705b455e322c91e7fff1dfb2df504d2e8.yml
-openapi_spec_hash: 3f2c3d5358dc1732a92e3fed0f5cbcd7
-config_hash: e9831eba75eecfc502817af80812f6a7
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-589e342137de29187fec9e332ae5ca29de64e531f8b92b46b2469fdb3449a721.yml
+openapi_spec_hash: 5dbf4fe59153afb4d4c8642e05fcecdc
+config_hash: 38219157b7a6dd4d0accbd0d57095420
diff --git a/README.md b/README.md
index 05e74c625..0664c6b26 100644
--- a/README.md
+++ b/README.md
@@ -250,7 +250,7 @@ client.with_options(max_retries=5).devboxes.create()
### Timeouts
-By default requests time out after 1 minute. You can configure this with a `timeout` option,
+By default requests time out after 10 minutes. You can configure this with a `timeout` option,
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
```python
@@ -258,7 +258,7 @@ from runloop_api_client import Runloop
# Configure the default for all requests:
client = Runloop(
- # 20 seconds (default is 1 minute)
+ # 20 seconds (default is 10 minutes)
timeout=20.0,
)
diff --git a/src/runloop_api_client/_constants.py b/src/runloop_api_client/_constants.py
index 6be0f5e04..a949b3e6f 100644
--- a/src/runloop_api_client/_constants.py
+++ b/src/runloop_api_client/_constants.py
@@ -5,8 +5,8 @@
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
-# default timeout is 1 minute
-DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
+# default timeout is 10 minutes
+DEFAULT_TIMEOUT = httpx.Timeout(timeout=600, connect=5.0)
DEFAULT_MAX_RETRIES = 0
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py
index a51255713..fc64d979f 100644
--- a/src/runloop_api_client/resources/devboxes/devboxes.py
+++ b/src/runloop_api_client/resources/devboxes/devboxes.py
@@ -574,11 +574,8 @@ def create_tunnel(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> DevboxTunnelView:
- """Create a live tunnel to an available port on the Devbox.
-
- Note the port must be
- made available using Devbox.create.availablePorts. Otherwise, the tunnel will
- not connect to any running processes on the Devbox.
+ """
+ Create a live tunnel to an available port on the Devbox.
Args:
port: Devbox port that tunnel will expose.
@@ -859,6 +856,8 @@ def list_disk_snapshots(
*,
devbox_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
+ metadata_key: str | NotGiven = NOT_GIVEN,
+ metadata_key_in: str | NotGiven = NOT_GIVEN,
starting_after: 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.
@@ -868,13 +867,19 @@ def list_disk_snapshots(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]:
"""
- List all snapshots of a Devbox while optionally filtering by Devbox ID.
+ List all snapshots of a Devbox while optionally filtering by Devbox ID and
+ metadata.
Args:
devbox_id: Devbox ID to filter by.
limit: The limit of items to return. Default is 20.
+ metadata_key: Filter snapshots by metadata key-value pair. Can be used multiple times for
+ different keys.
+
+ metadata_key_in: Filter snapshots by metadata key with multiple possible values (OR condition).
+
starting_after: Load the next page of data starting after the item with the given ID.
extra_headers: Send extra headers
@@ -897,6 +902,8 @@ def list_disk_snapshots(
{
"devbox_id": devbox_id,
"limit": limit,
+ "metadata_key": metadata_key,
+ "metadata_key_in": metadata_key_in,
"starting_after": starting_after,
},
devbox_list_disk_snapshots_params.DevboxListDiskSnapshotsParams,
@@ -1760,11 +1767,8 @@ async def create_tunnel(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> DevboxTunnelView:
- """Create a live tunnel to an available port on the Devbox.
-
- Note the port must be
- made available using Devbox.create.availablePorts. Otherwise, the tunnel will
- not connect to any running processes on the Devbox.
+ """
+ Create a live tunnel to an available port on the Devbox.
Args:
port: Devbox port that tunnel will expose.
@@ -2045,6 +2049,8 @@ def list_disk_snapshots(
*,
devbox_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
+ metadata_key: str | NotGiven = NOT_GIVEN,
+ metadata_key_in: str | NotGiven = NOT_GIVEN,
starting_after: 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.
@@ -2054,13 +2060,19 @@ def list_disk_snapshots(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[DevboxSnapshotView, AsyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]]:
"""
- List all snapshots of a Devbox while optionally filtering by Devbox ID.
+ List all snapshots of a Devbox while optionally filtering by Devbox ID and
+ metadata.
Args:
devbox_id: Devbox ID to filter by.
limit: The limit of items to return. Default is 20.
+ metadata_key: Filter snapshots by metadata key-value pair. Can be used multiple times for
+ different keys.
+
+ metadata_key_in: Filter snapshots by metadata key with multiple possible values (OR condition).
+
starting_after: Load the next page of data starting after the item with the given ID.
extra_headers: Send extra headers
@@ -2083,6 +2095,8 @@ def list_disk_snapshots(
{
"devbox_id": devbox_id,
"limit": limit,
+ "metadata_key": metadata_key,
+ "metadata_key_in": metadata_key_in,
"starting_after": starting_after,
},
devbox_list_disk_snapshots_params.DevboxListDiskSnapshotsParams,
diff --git a/src/runloop_api_client/resources/devboxes/disk_snapshots.py b/src/runloop_api_client/resources/devboxes/disk_snapshots.py
index 72439a4ec..7b99974e9 100644
--- a/src/runloop_api_client/resources/devboxes/disk_snapshots.py
+++ b/src/runloop_api_client/resources/devboxes/disk_snapshots.py
@@ -104,6 +104,8 @@ def list(
*,
devbox_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
+ metadata_key: str | NotGiven = NOT_GIVEN,
+ metadata_key_in: str | NotGiven = NOT_GIVEN,
starting_after: 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.
@@ -113,13 +115,19 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]:
"""
- List all snapshots of a Devbox while optionally filtering by Devbox ID.
+ List all snapshots of a Devbox while optionally filtering by Devbox ID and
+ metadata.
Args:
devbox_id: Devbox ID to filter by.
limit: The limit of items to return. Default is 20.
+ metadata_key: Filter snapshots by metadata key-value pair. Can be used multiple times for
+ different keys.
+
+ metadata_key_in: Filter snapshots by metadata key with multiple possible values (OR condition).
+
starting_after: Load the next page of data starting after the item with the given ID.
extra_headers: Send extra headers
@@ -142,6 +150,8 @@ def list(
{
"devbox_id": devbox_id,
"limit": limit,
+ "metadata_key": metadata_key,
+ "metadata_key_in": metadata_key_in,
"starting_after": starting_after,
},
disk_snapshot_list_params.DiskSnapshotListParams,
@@ -271,6 +281,8 @@ def list(
*,
devbox_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
+ metadata_key: str | NotGiven = NOT_GIVEN,
+ metadata_key_in: str | NotGiven = NOT_GIVEN,
starting_after: 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.
@@ -280,13 +292,19 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[DevboxSnapshotView, AsyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]]:
"""
- List all snapshots of a Devbox while optionally filtering by Devbox ID.
+ List all snapshots of a Devbox while optionally filtering by Devbox ID and
+ metadata.
Args:
devbox_id: Devbox ID to filter by.
limit: The limit of items to return. Default is 20.
+ metadata_key: Filter snapshots by metadata key-value pair. Can be used multiple times for
+ different keys.
+
+ metadata_key_in: Filter snapshots by metadata key with multiple possible values (OR condition).
+
starting_after: Load the next page of data starting after the item with the given ID.
extra_headers: Send extra headers
@@ -309,6 +327,8 @@ def list(
{
"devbox_id": devbox_id,
"limit": limit,
+ "metadata_key": metadata_key,
+ "metadata_key_in": metadata_key_in,
"starting_after": starting_after,
},
disk_snapshot_list_params.DiskSnapshotListParams,
diff --git a/src/runloop_api_client/types/devbox_list_disk_snapshots_params.py b/src/runloop_api_client/types/devbox_list_disk_snapshots_params.py
index 7676c1de9..ad476b208 100644
--- a/src/runloop_api_client/types/devbox_list_disk_snapshots_params.py
+++ b/src/runloop_api_client/types/devbox_list_disk_snapshots_params.py
@@ -2,7 +2,9 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Annotated, TypedDict
+
+from .._utils import PropertyInfo
__all__ = ["DevboxListDiskSnapshotsParams"]
@@ -14,5 +16,14 @@ class DevboxListDiskSnapshotsParams(TypedDict, total=False):
limit: int
"""The limit of items to return. Default is 20."""
+ metadata_key: Annotated[str, PropertyInfo(alias="metadata[key]")]
+ """Filter snapshots by metadata key-value pair.
+
+ Can be used multiple times for different keys.
+ """
+
+ metadata_key_in: Annotated[str, PropertyInfo(alias="metadata[key][in]")]
+ """Filter snapshots by metadata key with multiple possible values (OR condition)."""
+
starting_after: str
"""Load the next page of data starting after the item with the given ID."""
diff --git a/src/runloop_api_client/types/devboxes/disk_snapshot_list_params.py b/src/runloop_api_client/types/devboxes/disk_snapshot_list_params.py
index 82cd12731..e43a55d1d 100644
--- a/src/runloop_api_client/types/devboxes/disk_snapshot_list_params.py
+++ b/src/runloop_api_client/types/devboxes/disk_snapshot_list_params.py
@@ -2,7 +2,9 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
__all__ = ["DiskSnapshotListParams"]
@@ -14,5 +16,14 @@ class DiskSnapshotListParams(TypedDict, total=False):
limit: int
"""The limit of items to return. Default is 20."""
+ metadata_key: Annotated[str, PropertyInfo(alias="metadata[key]")]
+ """Filter snapshots by metadata key-value pair.
+
+ Can be used multiple times for different keys.
+ """
+
+ metadata_key_in: Annotated[str, PropertyInfo(alias="metadata[key][in]")]
+ """Filter snapshots by metadata key with multiple possible values (OR condition)."""
+
starting_after: str
"""Load the next page of data starting after the item with the given ID."""
diff --git a/tests/api_resources/devboxes/test_disk_snapshots.py b/tests/api_resources/devboxes/test_disk_snapshots.py
index dbbefa079..c7708f348 100644
--- a/tests/api_resources/devboxes/test_disk_snapshots.py
+++ b/tests/api_resources/devboxes/test_disk_snapshots.py
@@ -75,6 +75,8 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
disk_snapshot = client.devboxes.disk_snapshots.list(
devbox_id="devbox_id",
limit=0,
+ metadata_key="metadata[key]",
+ metadata_key_in="metadata[key][in]",
starting_after="starting_after",
)
assert_matches_type(SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView], disk_snapshot, path=["response"])
@@ -198,6 +200,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
disk_snapshot = await async_client.devboxes.disk_snapshots.list(
devbox_id="devbox_id",
limit=0,
+ metadata_key="metadata[key]",
+ metadata_key_in="metadata[key][in]",
starting_after="starting_after",
)
assert_matches_type(AsyncDiskSnapshotsCursorIDPage[DevboxSnapshotView], disk_snapshot, path=["response"])
diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py
index 0f7045def..d27e04f01 100644
--- a/tests/api_resources/test_devboxes.py
+++ b/tests/api_resources/test_devboxes.py
@@ -548,6 +548,8 @@ def test_method_list_disk_snapshots_with_all_params(self, client: Runloop) -> No
devbox = client.devboxes.list_disk_snapshots(
devbox_id="devbox_id",
limit=0,
+ metadata_key="metadata[key]",
+ metadata_key_in="metadata[key][in]",
starting_after="starting_after",
)
assert_matches_type(SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView], devbox, path=["response"])
@@ -1428,6 +1430,8 @@ async def test_method_list_disk_snapshots_with_all_params(self, async_client: As
devbox = await async_client.devboxes.list_disk_snapshots(
devbox_id="devbox_id",
limit=0,
+ metadata_key="metadata[key]",
+ metadata_key_in="metadata[key][in]",
starting_after="starting_after",
)
assert_matches_type(AsyncDiskSnapshotsCursorIDPage[DevboxSnapshotView], devbox, path=["response"])
From cb65028a6402068015249344ae28bccc73f06a44 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 22 May 2025 22:35:21 +0000
Subject: [PATCH 09/10] feat(api): api update
---
.stats.yml | 2 +-
README.md | 4 ++--
src/runloop_api_client/_constants.py | 4 ++--
src/runloop_api_client/resources/devboxes/devboxes.py | 11 ++++++++++-
4 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 4506c9ccb..637120fbb 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -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: 38219157b7a6dd4d0accbd0d57095420
+config_hash: 7cef6c9fce4f9a345184516c6cde462f
diff --git a/README.md b/README.md
index 0664c6b26..05e74c625 100644
--- a/README.md
+++ b/README.md
@@ -250,7 +250,7 @@ client.with_options(max_retries=5).devboxes.create()
### Timeouts
-By default requests time out after 10 minutes. You can configure this with a `timeout` option,
+By default requests time out after 1 minute. You can configure this with a `timeout` option,
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
```python
@@ -258,7 +258,7 @@ from runloop_api_client import Runloop
# Configure the default for all requests:
client = Runloop(
- # 20 seconds (default is 10 minutes)
+ # 20 seconds (default is 1 minute)
timeout=20.0,
)
diff --git a/src/runloop_api_client/_constants.py b/src/runloop_api_client/_constants.py
index a949b3e6f..6be0f5e04 100644
--- a/src/runloop_api_client/_constants.py
+++ b/src/runloop_api_client/_constants.py
@@ -5,8 +5,8 @@
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
-# default timeout is 10 minutes
-DEFAULT_TIMEOUT = httpx.Timeout(timeout=600, connect=5.0)
+# default timeout is 1 minute
+DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
DEFAULT_MAX_RETRIES = 0
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py
index fc64d979f..c854f7a64 100644
--- a/src/runloop_api_client/resources/devboxes/devboxes.py
+++ b/src/runloop_api_client/resources/devboxes/devboxes.py
@@ -39,7 +39,7 @@
devbox_write_file_contents_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
+from ..._utils import is_given, extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from .browsers import (
BrowsersResource,
AsyncBrowsersResource,
@@ -80,6 +80,7 @@
async_to_custom_raw_response_wrapper,
async_to_custom_streamed_response_wrapper,
)
+from ..._constants import DEFAULT_TIMEOUT
from ...pagination import (
SyncDevboxesCursorIDPage,
AsyncDevboxesCursorIDPage,
@@ -791,6 +792,8 @@ def execute_sync(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT:
+ timeout = 600
return self._post(
f"/v1/devboxes/{id}/execute_sync",
body=maybe_transform(
@@ -1128,6 +1131,8 @@ def snapshot_disk(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT:
+ timeout = 600
return self._post(
f"/v1/devboxes/{id}/snapshot_disk",
body=maybe_transform(
@@ -1984,6 +1989,8 @@ async def execute_sync(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT:
+ timeout = 600
return await self._post(
f"/v1/devboxes/{id}/execute_sync",
body=await async_maybe_transform(
@@ -2321,6 +2328,8 @@ async def snapshot_disk(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT:
+ timeout = 600
return await self._post(
f"/v1/devboxes/{id}/snapshot_disk",
body=await async_maybe_transform(
From a3e24ce3093e29989736b111878260aa0f2a7bba Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 22 May 2025 22:35:40 +0000
Subject: [PATCH 10/10] release: 0.33.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 24 ++++++++++++++++++++++++
pyproject.toml | 2 +-
src/runloop_api_client/_version.py | 2 +-
4 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f04d08965..57dc0c3da 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.32.0"
+ ".": "0.33.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a7838408..f4fb293ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,29 @@
# Changelog
+## 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)
+
+### Features
+
+* **api:** api update ([cb65028](https://github.com/runloopai/api-client-python/commit/cb65028a6402068015249344ae28bccc73f06a44))
+* **api:** api update ([d86368b](https://github.com/runloopai/api-client-python/commit/d86368b9d942d4eada396ad864f2f75dfeec3f1a))
+* **api:** api update ([a08fe0e](https://github.com/runloopai/api-client-python/commit/a08fe0e64744f7edb832574c8ed66ecb181cdeba))
+* **api:** api update ([597df88](https://github.com/runloopai/api-client-python/commit/597df884cf33c10fadb2148393bef626aaf23c53))
+
+
+### Bug Fixes
+
+* **package:** support direct resource imports ([44f30d6](https://github.com/runloopai/api-client-python/commit/44f30d62901a439f835e7ea9367d2691de8844a8))
+
+
+### Chores
+
+* **ci:** fix installation instructions ([5fed44a](https://github.com/runloopai/api-client-python/commit/5fed44abc7323ac5360c60a3c2472b24c3a7359a))
+* **ci:** upload sdks to package manager ([25dbae1](https://github.com/runloopai/api-client-python/commit/25dbae18d04f12b9a19dac7cea76546b6be0acab))
+* **docs:** grammar improvements ([a0c74a5](https://github.com/runloopai/api-client-python/commit/a0c74a50c8209448b1eaaf29416fc30a25c5eecc))
+* **internal:** avoid errors for isinstance checks on proxies ([e825829](https://github.com/runloopai/api-client-python/commit/e825829b51d90c2d2b18b0f6d0864ee8fc1b0419))
+
## 0.32.0 (2025-04-25)
Full Changelog: [v0.31.0...v0.32.0](https://github.com/runloopai/api-client-python/compare/v0.31.0...v0.32.0)
diff --git a/pyproject.toml b/pyproject.toml
index 1ace85349..7b17becbb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
-version = "0.32.0"
+version = "0.33.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py
index 6db6388a9..fc69d63b8 100644
--- a/src/runloop_api_client/_version.py
+++ b/src/runloop_api_client/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "runloop_api_client"
-__version__ = "0.32.0" # x-release-please-version
+__version__ = "0.33.0" # x-release-please-version