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.34.1"
".": "0.35.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-88c3df1881ce3ca780736c14f781e2b1930abb2ceeadb5cdabeda4d67f877511.yml
openapi_spec_hash: e47eece926740aba8272685c342a1d4b
config_hash: e17450cd026f260f68713ad9f12bd999
configured_endpoints: 84
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-da7ec5b4cc55e7316bc3de6a9c0a37f5ee3057d3d68fdda9cb570d1a1fee57ea.yml
openapi_spec_hash: 5b89a8e3c67c4816dfab9a87fd67247d
config_hash: 8c014837a658512c2e23c002bb0f2ab1
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.35.0 (2025-05-30)

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

### Features

* **api:** api update ([c303a71](https://github.com/runloopai/api-client-python/commit/c303a710e21d6da73de907638905b08027acf64a))

## 0.34.1 (2025-05-28)

Full Changelog: [v0.34.0...v0.34.1](https://github.com/runloopai/api-client-python/compare/v0.34.0...v0.34.1)
Expand Down
3 changes: 3 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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="post /v1/benchmarks/{id}">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/benchmark_update_params.py">params</a>) -> <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>
Expand All @@ -32,6 +33,7 @@ Methods:

- <code title="get /v1/benchmarks/runs/{id}">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
- <code title="get /v1/benchmarks/runs">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmarks/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">SyncBenchmarkRunsCursorIDPage[BenchmarkRunView]</a></code>
- <code title="post /v1/benchmarks/runs/{id}/cancel">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">cancel</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
- <code title="post /v1/benchmarks/runs/{id}/complete">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>

# Blueprints
Expand Down Expand Up @@ -287,6 +289,7 @@ Methods:

- <code title="get /v1/scenarios/runs/{id}">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
- <code title="get /v1/scenarios/runs">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenarios/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">SyncBenchmarkRunsCursorIDPage[ScenarioRunView]</a></code>
- <code title="post /v1/scenarios/runs/{id}/cancel">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">cancel</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
- <code title="post /v1/scenarios/runs/{id}/complete">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
- <code title="post /v1/scenarios/runs/{id}/score">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">score</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>

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.34.1"
version = "0.35.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.34.1" # x-release-please-version
__version__ = "0.35.0" # x-release-please-version
135 changes: 135 additions & 0 deletions src/runloop_api_client/resources/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ...types import (
benchmark_list_params,
benchmark_create_params,
benchmark_update_params,
benchmark_start_run_params,
benchmark_list_public_params,
)
Expand Down Expand Up @@ -153,6 +154,67 @@ def retrieve(
cast_to=BenchmarkView,
)

def update(
self,
id: str,
*,
is_public: bool,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> BenchmarkView:
"""
Update a Benchmark with a set of Scenarios.

Args:
is_public: Whether this benchmark is public.

name: The name of the Benchmark. This must be unique.

metadata: User defined metadata to attach to the benchmark for organization.

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

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

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

def list(
self,
*,
Expand Down Expand Up @@ -417,6 +479,67 @@ async def retrieve(
cast_to=BenchmarkView,
)

async def update(
self,
id: str,
*,
is_public: bool,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> BenchmarkView:
"""
Update a Benchmark with a set of Scenarios.

Args:
is_public: Whether this benchmark is public.

name: The name of the Benchmark. This must be unique.

metadata: User defined metadata to attach to the benchmark for organization.

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

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

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

def list(
self,
*,
Expand Down Expand Up @@ -576,6 +699,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.retrieve = to_raw_response_wrapper(
benchmarks.retrieve,
)
self.update = to_raw_response_wrapper(
benchmarks.update,
)
self.list = to_raw_response_wrapper(
benchmarks.list,
)
Expand All @@ -601,6 +727,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
benchmarks.retrieve,
)
self.update = async_to_raw_response_wrapper(
benchmarks.update,
)
self.list = async_to_raw_response_wrapper(
benchmarks.list,
)
Expand All @@ -626,6 +755,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.retrieve = to_streamed_response_wrapper(
benchmarks.retrieve,
)
self.update = to_streamed_response_wrapper(
benchmarks.update,
)
self.list = to_streamed_response_wrapper(
benchmarks.list,
)
Expand All @@ -651,6 +783,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
benchmarks.retrieve,
)
self.update = async_to_streamed_response_wrapper(
benchmarks.update,
)
self.list = async_to_streamed_response_wrapper(
benchmarks.list,
)
Expand Down
92 changes: 92 additions & 0 deletions src/runloop_api_client/resources/benchmarks/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,46 @@ def list(
model=BenchmarkRunView,
)

def cancel(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> BenchmarkRunView:
"""
Cancel a currently running Benchmark run.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

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

idempotency_key: Specify a custom idempotency key for this request
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._post(
f"/v1/benchmarks/runs/{id}/cancel",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=BenchmarkRunView,
)

def complete(
self,
id: str,
Expand Down Expand Up @@ -271,6 +311,46 @@ def list(
model=BenchmarkRunView,
)

async def cancel(
self,
id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> BenchmarkRunView:
"""
Cancel a currently running Benchmark run.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

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

idempotency_key: Specify a custom idempotency key for this request
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._post(
f"/v1/benchmarks/runs/{id}/cancel",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=BenchmarkRunView,
)

async def complete(
self,
id: str,
Expand Down Expand Up @@ -322,6 +402,9 @@ def __init__(self, runs: RunsResource) -> None:
self.list = to_raw_response_wrapper(
runs.list,
)
self.cancel = to_raw_response_wrapper(
runs.cancel,
)
self.complete = to_raw_response_wrapper(
runs.complete,
)
Expand All @@ -337,6 +420,9 @@ def __init__(self, runs: AsyncRunsResource) -> None:
self.list = async_to_raw_response_wrapper(
runs.list,
)
self.cancel = async_to_raw_response_wrapper(
runs.cancel,
)
self.complete = async_to_raw_response_wrapper(
runs.complete,
)
Expand All @@ -352,6 +438,9 @@ def __init__(self, runs: RunsResource) -> None:
self.list = to_streamed_response_wrapper(
runs.list,
)
self.cancel = to_streamed_response_wrapper(
runs.cancel,
)
self.complete = to_streamed_response_wrapper(
runs.complete,
)
Expand All @@ -367,6 +456,9 @@ def __init__(self, runs: AsyncRunsResource) -> None:
self.list = async_to_streamed_response_wrapper(
runs.list,
)
self.cancel = async_to_streamed_response_wrapper(
runs.cancel,
)
self.complete = async_to_streamed_response_wrapper(
runs.complete,
)
Loading
Loading