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.13.0"
".": "0.14.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: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-15f23a9e2e014d2e5d4d72c39ee31c5556060fb37d1490f308ecce5aeb41d5c8.yml
configured_endpoints: 61
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-9644e0fb22c7f4f55c131356129c4da627ec8aa3a46f5305893e601b961fe1fc.yml
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.14.0 (2025-01-29)

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

### Features

* **api:** api update ([#501](https://github.com/runloopai/api-client-python/issues/501)) ([cb1f8ac](https://github.com/runloopai/api-client-python/commit/cb1f8ac9e6ea44e33db8a4739cbb325a982840f4))
* **api:** api update ([#502](https://github.com/runloopai/api-client-python/issues/502)) ([22d84a8](https://github.com/runloopai/api-client-python/commit/22d84a8727e147d26d4bfd82ca26a1ac8d32365f))


### Bug Fixes

* **tests:** make test_get_platform less flaky ([#500](https://github.com/runloopai/api-client-python/issues/500)) ([394d017](https://github.com/runloopai/api-client-python/commit/394d0172530ea1284173d3fd04a3a8a1f1dd78f9))


### Chores

* **internal:** codegen related update ([#497](https://github.com/runloopai/api-client-python/issues/497)) ([207a88e](https://github.com/runloopai/api-client-python/commit/207a88ed4bed2b87e10d15c49002661f1cf84f1c))


### Documentation

* **raw responses:** fix duplicate `the` ([#499](https://github.com/runloopai/api-client-python/issues/499)) ([80e393c](https://github.com/runloopai/api-client-python/commit/80e393c1c87319b6886cef1c2806c2ce8e467a54))

## 0.13.0 (2025-01-15)

Full Changelog: [v0.12.0...v0.13.0](https://github.com/runloopai/api-client-python/compare/v0.12.0...v0.13.0)
Expand Down
67 changes: 67 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@
from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters
```

# Benchmarks

Types:

```python
from runloop_api_client.types import (
BenchmarkCreateParameters,
BenchmarkListView,
BenchmarkRunListView,
BenchmarkRunView,
BenchmarkView,
StartBenchmarkRunParameters,
)
```

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_list_view.py">BenchmarkListView</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

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_list_view.py">BenchmarkRunListView</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

Types:
Expand Down Expand Up @@ -173,6 +203,43 @@ Methods:
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/kill">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">kill</a>(execution_id, \*, devbox_id) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>

# Scenarios

Types:

```python
from runloop_api_client.types import (
InputContextParameters,
ScenarioCreateParameters,
ScenarioEnvironmentParameters,
ScenarioListView,
ScenarioRunListView,
ScenarioRunView,
ScenarioView,
ScoringContractParameters,
ScoringContractResultView,
ScoringFunctionParameters,
ScoringFunctionResultView,
StartScenarioRunParameters,
)
```

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_list_view.py">ScenarioListView</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

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_list_view.py">ScenarioRunListView</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>

# Repositories

Types:
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cache_fine_grained = True
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
disable_error_code = func-returns-value
disable_error_code = func-returns-value,overload-cannot-match

# https://github.com/python/mypy/issues/12162
[mypy.overrides]
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.13.0"
version = "0.14.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
mypy==1.13.0
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
nest-asyncio==1.6.0
Expand All @@ -69,7 +69,7 @@ pydantic-core==2.27.1
# via pydantic
pygments==2.18.0
# via rich
pyright==1.1.390
pyright==1.1.392.post0
pytest==8.3.3
# via pytest-asyncio
pytest-asyncio==0.24.0
Expand Down
18 changes: 18 additions & 0 deletions src/runloop_api_client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@
AsyncAPIClient,
)
from .resources.devboxes import devboxes
from .resources.scenarios import scenarios
from .resources.benchmarks import benchmarks

__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Runloop", "AsyncRunloop", "Client", "AsyncClient"]


class Runloop(SyncAPIClient):
benchmarks: benchmarks.BenchmarksResource
blueprints: blueprints.BlueprintsResource
devboxes: devboxes.DevboxesResource
scenarios: scenarios.ScenariosResource
repositories: repositories.RepositoriesResource
with_raw_response: RunloopWithRawResponse
with_streaming_response: RunloopWithStreamedResponse
Expand Down Expand Up @@ -100,8 +104,10 @@ def __init__(

self._idempotency_header = "x-request-id"

self.benchmarks = benchmarks.BenchmarksResource(self)
self.blueprints = blueprints.BlueprintsResource(self)
self.devboxes = devboxes.DevboxesResource(self)
self.scenarios = scenarios.ScenariosResource(self)
self.repositories = repositories.RepositoriesResource(self)
self.with_raw_response = RunloopWithRawResponse(self)
self.with_streaming_response = RunloopWithStreamedResponse(self)
Expand Down Expand Up @@ -212,8 +218,10 @@ def _make_status_error(


class AsyncRunloop(AsyncAPIClient):
benchmarks: benchmarks.AsyncBenchmarksResource
blueprints: blueprints.AsyncBlueprintsResource
devboxes: devboxes.AsyncDevboxesResource
scenarios: scenarios.AsyncScenariosResource
repositories: repositories.AsyncRepositoriesResource
with_raw_response: AsyncRunloopWithRawResponse
with_streaming_response: AsyncRunloopWithStreamedResponse
Expand Down Expand Up @@ -274,8 +282,10 @@ def __init__(

self._idempotency_header = "x-request-id"

self.benchmarks = benchmarks.AsyncBenchmarksResource(self)
self.blueprints = blueprints.AsyncBlueprintsResource(self)
self.devboxes = devboxes.AsyncDevboxesResource(self)
self.scenarios = scenarios.AsyncScenariosResource(self)
self.repositories = repositories.AsyncRepositoriesResource(self)
self.with_raw_response = AsyncRunloopWithRawResponse(self)
self.with_streaming_response = AsyncRunloopWithStreamedResponse(self)
Expand Down Expand Up @@ -387,29 +397,37 @@ def _make_status_error(

class RunloopWithRawResponse:
def __init__(self, client: Runloop) -> None:
self.benchmarks = benchmarks.BenchmarksResourceWithRawResponse(client.benchmarks)
self.blueprints = blueprints.BlueprintsResourceWithRawResponse(client.blueprints)
self.devboxes = devboxes.DevboxesResourceWithRawResponse(client.devboxes)
self.scenarios = scenarios.ScenariosResourceWithRawResponse(client.scenarios)
self.repositories = repositories.RepositoriesResourceWithRawResponse(client.repositories)


class AsyncRunloopWithRawResponse:
def __init__(self, client: AsyncRunloop) -> None:
self.benchmarks = benchmarks.AsyncBenchmarksResourceWithRawResponse(client.benchmarks)
self.blueprints = blueprints.AsyncBlueprintsResourceWithRawResponse(client.blueprints)
self.devboxes = devboxes.AsyncDevboxesResourceWithRawResponse(client.devboxes)
self.scenarios = scenarios.AsyncScenariosResourceWithRawResponse(client.scenarios)
self.repositories = repositories.AsyncRepositoriesResourceWithRawResponse(client.repositories)


class RunloopWithStreamedResponse:
def __init__(self, client: Runloop) -> None:
self.benchmarks = benchmarks.BenchmarksResourceWithStreamingResponse(client.benchmarks)
self.blueprints = blueprints.BlueprintsResourceWithStreamingResponse(client.blueprints)
self.devboxes = devboxes.DevboxesResourceWithStreamingResponse(client.devboxes)
self.scenarios = scenarios.ScenariosResourceWithStreamingResponse(client.scenarios)
self.repositories = repositories.RepositoriesResourceWithStreamingResponse(client.repositories)


class AsyncRunloopWithStreamedResponse:
def __init__(self, client: AsyncRunloop) -> None:
self.benchmarks = benchmarks.AsyncBenchmarksResourceWithStreamingResponse(client.benchmarks)
self.blueprints = blueprints.AsyncBlueprintsResourceWithStreamingResponse(client.blueprints)
self.devboxes = devboxes.AsyncDevboxesResourceWithStreamingResponse(client.devboxes)
self.scenarios = scenarios.AsyncScenariosResourceWithStreamingResponse(client.scenarios)
self.repositories = repositories.AsyncRepositoriesResourceWithStreamingResponse(client.repositories)


Expand Down
8 changes: 7 additions & 1 deletion src/runloop_api_client/_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
return cast(R, response)

if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
if (
inspect.isclass(
origin # pyright: ignore[reportUnknownArgumentType]
)
and not issubclass(origin, BaseModel)
and issubclass(origin, pydantic.BaseModel)
):
raise TypeError(
"Pydantic models must subclass our base model type, e.g. `from runloop_api_client import BaseModel`"
)
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.13.0" # x-release-please-version
__version__ = "0.14.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/runloop_api_client/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
DevboxesResourceWithStreamingResponse,
AsyncDevboxesResourceWithStreamingResponse,
)
from .scenarios import (
ScenariosResource,
AsyncScenariosResource,
ScenariosResourceWithRawResponse,
AsyncScenariosResourceWithRawResponse,
ScenariosResourceWithStreamingResponse,
AsyncScenariosResourceWithStreamingResponse,
)
from .benchmarks import (
BenchmarksResource,
AsyncBenchmarksResource,
BenchmarksResourceWithRawResponse,
AsyncBenchmarksResourceWithRawResponse,
BenchmarksResourceWithStreamingResponse,
AsyncBenchmarksResourceWithStreamingResponse,
)
from .blueprints import (
BlueprintsResource,
AsyncBlueprintsResource,
Expand All @@ -26,6 +42,12 @@
)

__all__ = [
"BenchmarksResource",
"AsyncBenchmarksResource",
"BenchmarksResourceWithRawResponse",
"AsyncBenchmarksResourceWithRawResponse",
"BenchmarksResourceWithStreamingResponse",
"AsyncBenchmarksResourceWithStreamingResponse",
"BlueprintsResource",
"AsyncBlueprintsResource",
"BlueprintsResourceWithRawResponse",
Expand All @@ -38,6 +60,12 @@
"AsyncDevboxesResourceWithRawResponse",
"DevboxesResourceWithStreamingResponse",
"AsyncDevboxesResourceWithStreamingResponse",
"ScenariosResource",
"AsyncScenariosResource",
"ScenariosResourceWithRawResponse",
"AsyncScenariosResourceWithRawResponse",
"ScenariosResourceWithStreamingResponse",
"AsyncScenariosResourceWithStreamingResponse",
"RepositoriesResource",
"AsyncRepositoriesResource",
"RepositoriesResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/runloop_api_client/resources/benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .runs import (
RunsResource,
AsyncRunsResource,
RunsResourceWithRawResponse,
AsyncRunsResourceWithRawResponse,
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from .benchmarks import (
BenchmarksResource,
AsyncBenchmarksResource,
BenchmarksResourceWithRawResponse,
AsyncBenchmarksResourceWithRawResponse,
BenchmarksResourceWithStreamingResponse,
AsyncBenchmarksResourceWithStreamingResponse,
)

__all__ = [
"RunsResource",
"AsyncRunsResource",
"RunsResourceWithRawResponse",
"AsyncRunsResourceWithRawResponse",
"RunsResourceWithStreamingResponse",
"AsyncRunsResourceWithStreamingResponse",
"BenchmarksResource",
"AsyncBenchmarksResource",
"BenchmarksResourceWithRawResponse",
"AsyncBenchmarksResourceWithRawResponse",
"BenchmarksResourceWithStreamingResponse",
"AsyncBenchmarksResourceWithStreamingResponse",
]
Loading
Loading