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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.18.0"
".": "0.19.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 66
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8030b5a782144e97b4c813649da362416bd258f9a0bdd5d43b507c474d7f0bc0.yml
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ad83f8f9f6d60b6ef468111bde705c475948948951ff9ec80c54c2df76ff5596.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.19.0 (2025-02-03)

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

### Features

* add helper methods for scenarios ([551fcfc](https://github.com/runloopai/api-client-python/commit/551fcfc1dc5b8b67c0c6179d49c3eef2c0a38676))
* **api:** api update ([#520](https://github.com/runloopai/api-client-python/issues/520)) ([750b4ba](https://github.com/runloopai/api-client-python/commit/750b4ba51cc0c848258113af8bf882ceb679bf9e))

## 0.18.0 (2025-02-01)

Full Changelog: [v0.17.0...v0.18.0](https://github.com/runloopai/api-client-python/compare/v0.17.0...v0.18.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Methods:
- <code title="post /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">create</a>(\*\*<a href="src/runloop_api_client/types/benchmark_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
- <code title="get /v1/benchmarks/{id}">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
- <code title="get /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
- <code title="post /v1/benchmarks/start_run">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/benchmark_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>

## Runs
Expand Down Expand Up @@ -261,6 +262,7 @@ Methods:
- <code title="post /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">create</a>(\*\*<a href="src/runloop_api_client/types/scenario_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
- <code title="get /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
- <code title="get /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
- <code title="get /v1/scenarios/list_public">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
- <code title="post /v1/scenarios/start_run">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/scenario_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>

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

__title__ = "runloop_api_client"
__version__ = "0.18.0" # x-release-please-version
__version__ = "0.19.0" # x-release-please-version
123 changes: 112 additions & 11 deletions src/runloop_api_client/resources/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from ...types import benchmark_list_params, benchmark_create_params, benchmark_start_run_params
from ...types import (
benchmark_list_params,
benchmark_create_params,
benchmark_start_run_params,
benchmark_list_public_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
Expand Down Expand Up @@ -147,7 +152,6 @@ def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
public: bool | 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.
Expand All @@ -162,9 +166,6 @@ def list(
Args:
limit: The limit of items to return. Default is 20.

public: List public benchmarks, e.g. SWE-bench. Defaults to false, i.e. only
user-defined benchmarks are listed.

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers
Expand All @@ -186,7 +187,6 @@ def list(
query=maybe_transform(
{
"limit": limit,
"public": public,
"starting_after": starting_after,
},
benchmark_list_params.BenchmarkListParams,
Expand All @@ -195,6 +195,53 @@ def list(
model=BenchmarkView,
)

def list_public(
self,
*,
limit: int | 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.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
"""
List all public benchmarks matching filter.

Args:
limit: The limit of items to return. Default is 20.

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/v1/benchmarks/list_public",
page=SyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"limit": limit,
"starting_after": starting_after,
},
benchmark_list_public_params.BenchmarkListPublicParams,
),
),
model=BenchmarkView,
)

def start_run(
self,
*,
Expand Down Expand Up @@ -357,7 +404,6 @@ def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
public: bool | 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.
Expand All @@ -372,9 +418,6 @@ def list(
Args:
limit: The limit of items to return. Default is 20.

public: List public benchmarks, e.g. SWE-bench. Defaults to false, i.e. only
user-defined benchmarks are listed.

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers
Expand All @@ -396,7 +439,6 @@ def list(
query=maybe_transform(
{
"limit": limit,
"public": public,
"starting_after": starting_after,
},
benchmark_list_params.BenchmarkListParams,
Expand All @@ -405,6 +447,53 @@ def list(
model=BenchmarkView,
)

def list_public(
self,
*,
limit: int | 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.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
"""
List all public benchmarks matching filter.

Args:
limit: The limit of items to return. Default is 20.

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/v1/benchmarks/list_public",
page=AsyncBenchmarksCursorIDPage[BenchmarkView],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"limit": limit,
"starting_after": starting_after,
},
benchmark_list_public_params.BenchmarkListPublicParams,
),
),
model=BenchmarkView,
)

async def start_run(
self,
*,
Expand Down Expand Up @@ -469,6 +558,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.list = to_raw_response_wrapper(
benchmarks.list,
)
self.list_public = to_raw_response_wrapper(
benchmarks.list_public,
)
self.start_run = to_raw_response_wrapper(
benchmarks.start_run,
)
Expand All @@ -491,6 +583,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.list = async_to_raw_response_wrapper(
benchmarks.list,
)
self.list_public = async_to_raw_response_wrapper(
benchmarks.list_public,
)
self.start_run = async_to_raw_response_wrapper(
benchmarks.start_run,
)
Expand All @@ -513,6 +608,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.list = to_streamed_response_wrapper(
benchmarks.list,
)
self.list_public = to_streamed_response_wrapper(
benchmarks.list_public,
)
self.start_run = to_streamed_response_wrapper(
benchmarks.start_run,
)
Expand All @@ -535,6 +633,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.list = async_to_streamed_response_wrapper(
benchmarks.list,
)
self.list_public = async_to_streamed_response_wrapper(
benchmarks.list_public,
)
self.start_run = async_to_streamed_response_wrapper(
benchmarks.start_run,
)
Expand Down
6 changes: 3 additions & 3 deletions src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@
async_to_custom_raw_response_wrapper,
async_to_custom_streamed_response_wrapper,
)
from ..._exceptions import RunloopError
from ...lib.polling import PollingConfig, poll_until
from ...lib.polling_async import async_poll_until
from ...pagination import (
SyncDevboxesCursorIDPage,
AsyncDevboxesCursorIDPage,
SyncDiskSnapshotsCursorIDPage,
AsyncDiskSnapshotsCursorIDPage,
)
from ..._exceptions import RunloopError
from ...lib.polling import PollingConfig, poll_until
from ..._base_client import AsyncPaginator, make_request_options
from ...lib.polling_async import async_poll_until
from ...types.devbox_view import DevboxView
from ...types.devbox_tunnel_view import DevboxTunnelView
from ...types.devbox_snapshot_view import DevboxSnapshotView
Expand Down
6 changes: 3 additions & 3 deletions src/runloop_api_client/resources/scenarios/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
async_to_streamed_response_wrapper,
)
from ...pagination import SyncBenchmarkRunsCursorIDPage, AsyncBenchmarkRunsCursorIDPage
from ..._base_client import AsyncPaginator, make_request_options
from ...types.scenarios import run_list_params
from ...types.scenario_run_view import ScenarioRunView
from ..._exceptions import RunloopError
from ...lib.polling import PollingConfig, poll_until
from ..._base_client import AsyncPaginator, make_request_options
from ...types.scenarios import run_list_params
from ...lib.polling_async import async_poll_until
from ...types.scenario_run_view import ScenarioRunView

__all__ = ["RunsResource", "AsyncRunsResource"]

Expand Down
Loading
Loading