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.55.2"
".": "0.56.1-beta"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 93
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5bf266bfc4635f690b764f54cbbcd71ff347622e3bfd8540a7d2a4d7d2d78be8.yml
openapi_spec_hash: 3769820d0ac76caf6a1950802c73a382
config_hash: 7d940dc50b19e75e3719c4d41fd0e8dd
configured_endpoints: 100
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-feb1c5fb18adf1bfc11f6fc7ee95f08a319ce4a504c34c68dee66f090f69a70c.yml
openapi_spec_hash: 758379882a3c4bf49f3ded6ac065a604
config_hash: b97411af91b8ec0b8b066358c29091b4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.56.1-beta (2025-08-21)

Full Changelog: [v0.55.2...v0.56.1-beta](https://github.com/runloopai/api-client-python/compare/v0.55.2...v0.56.1-beta)

### Features

* **api:** api update ([9ad6951](https://github.com/runloopai/api-client-python/commit/9ad69513705ef867763ef306c15af777de542437))

## 0.55.2 (2025-08-19)

Full Changelog: [v0.55.1...v0.55.2](https://github.com/runloopai/api-client-python/compare/v0.55.1...v0.55.2)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The REST API documentation can be found on [runloop.ai](https://runloop.ai). The

```sh
# install from PyPI
pip install runloop_api_client
pip install --pre runloop_api_client
```

## Usage
Expand Down Expand Up @@ -73,7 +73,7 @@ You can enable this by installing `aiohttp`:

```sh
# install from PyPI
pip install runloop_api_client[aiohttp]
pip install --pre runloop_api_client[aiohttp]
```

Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
Expand Down
25 changes: 24 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shared Types

```python
from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters
from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters, RunProfile
```

# Benchmarks
Expand Down Expand Up @@ -326,6 +326,29 @@ Methods:
- <code title="get /v1/scenarios/scorers">client.scenarios.scorers.<a href="./src/runloop_api_client/resources/scenarios/scorers.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenarios/scorer_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenarios/scorer_list_response.py">SyncScenarioScorersCursorIDPage[ScorerListResponse]</a></code>
- <code title="post /v1/scenarios/scorers/{id}/validate">client.scenarios.scorers.<a href="./src/runloop_api_client/resources/scenarios/scorers.py">validate</a>(id, \*\*<a href="src/runloop_api_client/types/scenarios/scorer_validate_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenarios/scorer_validate_response.py">ScorerValidateResponse</a></code>

# Objects

Types:

```python
from runloop_api_client.types import (
ObjectCreateParameters,
ObjectDownloadURLView,
ObjectListView,
ObjectView,
)
```

Methods:

- <code title="post /v1/objects">client.objects.<a href="./src/runloop_api_client/resources/objects.py">create</a>(\*\*<a href="src/runloop_api_client/types/object_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/object_view.py">ObjectView</a></code>
- <code title="get /v1/objects/{id}">client.objects.<a href="./src/runloop_api_client/resources/objects.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/object_view.py">ObjectView</a></code>
- <code title="get /v1/objects">client.objects.<a href="./src/runloop_api_client/resources/objects.py">list</a>(\*\*<a href="src/runloop_api_client/types/object_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/object_view.py">SyncObjectsCursorIDPage[ObjectView]</a></code>
- <code title="post /v1/objects/{id}/delete">client.objects.<a href="./src/runloop_api_client/resources/objects.py">delete</a>(id) -> <a href="./src/runloop_api_client/types/object_view.py">ObjectView</a></code>
- <code title="post /v1/objects/{id}/complete">client.objects.<a href="./src/runloop_api_client/resources/objects.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/object_view.py">ObjectView</a></code>
- <code title="get /v1/objects/{id}/download">client.objects.<a href="./src/runloop_api_client/resources/objects.py">download</a>(id, \*\*<a href="src/runloop_api_client/types/object_download_params.py">params</a>) -> <a href="./src/runloop_api_client/types/object_download_url_view.py">ObjectDownloadURLView</a></code>
- <code title="get /v1/objects/list_public">client.objects.<a href="./src/runloop_api_client/resources/objects.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/object_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/object_view.py">SyncObjectsCursorIDPage[ObjectView]</a></code>

# Repositories

Types:
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.55.2"
version = "0.56.1-beta"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
10 changes: 9 additions & 1 deletion src/runloop_api_client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
from ._utils import is_given, get_async_library
from ._version import __version__
from .resources import secrets, blueprints, repositories
from .resources import objects, secrets, blueprints, repositories
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import RunloopError, APIStatusError
from ._base_client import (
Expand All @@ -41,6 +41,7 @@ class Runloop(SyncAPIClient):
blueprints: blueprints.BlueprintsResource
devboxes: devboxes.DevboxesResource
scenarios: scenarios.ScenariosResource
objects: objects.ObjectsResource
repositories: repositories.RepositoriesResource
secrets: secrets.SecretsResource
with_raw_response: RunloopWithRawResponse
Expand Down Expand Up @@ -106,6 +107,7 @@ def __init__(
self.blueprints = blueprints.BlueprintsResource(self)
self.devboxes = devboxes.DevboxesResource(self)
self.scenarios = scenarios.ScenariosResource(self)
self.objects = objects.ObjectsResource(self)
self.repositories = repositories.RepositoriesResource(self)
self.secrets = secrets.SecretsResource(self)
self.with_raw_response = RunloopWithRawResponse(self)
Expand Down Expand Up @@ -221,6 +223,7 @@ class AsyncRunloop(AsyncAPIClient):
blueprints: blueprints.AsyncBlueprintsResource
devboxes: devboxes.AsyncDevboxesResource
scenarios: scenarios.AsyncScenariosResource
objects: objects.AsyncObjectsResource
repositories: repositories.AsyncRepositoriesResource
secrets: secrets.AsyncSecretsResource
with_raw_response: AsyncRunloopWithRawResponse
Expand Down Expand Up @@ -286,6 +289,7 @@ def __init__(
self.blueprints = blueprints.AsyncBlueprintsResource(self)
self.devboxes = devboxes.AsyncDevboxesResource(self)
self.scenarios = scenarios.AsyncScenariosResource(self)
self.objects = objects.AsyncObjectsResource(self)
self.repositories = repositories.AsyncRepositoriesResource(self)
self.secrets = secrets.AsyncSecretsResource(self)
self.with_raw_response = AsyncRunloopWithRawResponse(self)
Expand Down Expand Up @@ -402,6 +406,7 @@ def __init__(self, client: Runloop) -> None:
self.blueprints = blueprints.BlueprintsResourceWithRawResponse(client.blueprints)
self.devboxes = devboxes.DevboxesResourceWithRawResponse(client.devboxes)
self.scenarios = scenarios.ScenariosResourceWithRawResponse(client.scenarios)
self.objects = objects.ObjectsResourceWithRawResponse(client.objects)
self.repositories = repositories.RepositoriesResourceWithRawResponse(client.repositories)
self.secrets = secrets.SecretsResourceWithRawResponse(client.secrets)

Expand All @@ -412,6 +417,7 @@ def __init__(self, client: AsyncRunloop) -> None:
self.blueprints = blueprints.AsyncBlueprintsResourceWithRawResponse(client.blueprints)
self.devboxes = devboxes.AsyncDevboxesResourceWithRawResponse(client.devboxes)
self.scenarios = scenarios.AsyncScenariosResourceWithRawResponse(client.scenarios)
self.objects = objects.AsyncObjectsResourceWithRawResponse(client.objects)
self.repositories = repositories.AsyncRepositoriesResourceWithRawResponse(client.repositories)
self.secrets = secrets.AsyncSecretsResourceWithRawResponse(client.secrets)

Expand All @@ -422,6 +428,7 @@ def __init__(self, client: Runloop) -> None:
self.blueprints = blueprints.BlueprintsResourceWithStreamingResponse(client.blueprints)
self.devboxes = devboxes.DevboxesResourceWithStreamingResponse(client.devboxes)
self.scenarios = scenarios.ScenariosResourceWithStreamingResponse(client.scenarios)
self.objects = objects.ObjectsResourceWithStreamingResponse(client.objects)
self.repositories = repositories.RepositoriesResourceWithStreamingResponse(client.repositories)
self.secrets = secrets.SecretsResourceWithStreamingResponse(client.secrets)

Expand All @@ -432,6 +439,7 @@ def __init__(self, client: AsyncRunloop) -> None:
self.blueprints = blueprints.AsyncBlueprintsResourceWithStreamingResponse(client.blueprints)
self.devboxes = devboxes.AsyncDevboxesResourceWithStreamingResponse(client.devboxes)
self.scenarios = scenarios.AsyncScenariosResourceWithStreamingResponse(client.scenarios)
self.objects = objects.AsyncObjectsResourceWithStreamingResponse(client.objects)
self.repositories = repositories.AsyncRepositoriesResourceWithStreamingResponse(client.repositories)
self.secrets = secrets.AsyncSecretsResourceWithStreamingResponse(client.secrets)

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.55.2" # x-release-please-version
__version__ = "0.56.1-beta" # x-release-please-version
75 changes: 75 additions & 0 deletions src/runloop_api_client/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"AsyncScenarioRunsCursorIDPage",
"SyncScenarioScorersCursorIDPage",
"AsyncScenarioScorersCursorIDPage",
"SyncObjectsCursorIDPage",
"AsyncObjectsCursorIDPage",
]

_T = TypeVar("_T")
Expand Down Expand Up @@ -74,6 +76,11 @@ class ScenarioScorersCursorIDPageItem(Protocol):
id: str


@runtime_checkable
class ObjectsCursorIDPageItem(Protocol):
id: str


class SyncBlueprintsCursorIDPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
blueprints: List[_T]
has_more: Optional[bool] = None
Expand Down Expand Up @@ -684,3 +691,71 @@ def next_page_info(self) -> Optional[PageInfo]:
return None

return PageInfo(params={"starting_after": item.id})


class SyncObjectsCursorIDPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
objects: List[_T]
has_more: Optional[bool] = None
total_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
objects = self.objects
if not objects:
return []
return objects

@override
def has_next_page(self) -> bool:
has_more = self.has_more
if has_more is not None and has_more is False:
return False

return super().has_next_page()

@override
def next_page_info(self) -> Optional[PageInfo]:
objects = self.objects
if not objects:
return None

item = cast(Any, objects[-1])
if not isinstance(item, ObjectsCursorIDPageItem) or item.id is None: # pyright: ignore[reportUnnecessaryComparison]
# TODO emit warning log
return None

return PageInfo(params={"starting_after": item.id})


class AsyncObjectsCursorIDPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
objects: List[_T]
has_more: Optional[bool] = None
total_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
objects = self.objects
if not objects:
return []
return objects

@override
def has_next_page(self) -> bool:
has_more = self.has_more
if has_more is not None and has_more is False:
return False

return super().has_next_page()

@override
def next_page_info(self) -> Optional[PageInfo]:
objects = self.objects
if not objects:
return None

item = cast(Any, objects[-1])
if not isinstance(item, ObjectsCursorIDPageItem) or item.id is None: # pyright: ignore[reportUnnecessaryComparison]
# TODO emit warning log
return None

return PageInfo(params={"starting_after": item.id})
14 changes: 14 additions & 0 deletions src/runloop_api_client/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .objects import (
ObjectsResource,
AsyncObjectsResource,
ObjectsResourceWithRawResponse,
AsyncObjectsResourceWithRawResponse,
ObjectsResourceWithStreamingResponse,
AsyncObjectsResourceWithStreamingResponse,
)
from .secrets import (
SecretsResource,
AsyncSecretsResource,
Expand Down Expand Up @@ -74,6 +82,12 @@
"AsyncScenariosResourceWithRawResponse",
"ScenariosResourceWithStreamingResponse",
"AsyncScenariosResourceWithStreamingResponse",
"ObjectsResource",
"AsyncObjectsResource",
"ObjectsResourceWithRawResponse",
"AsyncObjectsResourceWithRawResponse",
"ObjectsResourceWithStreamingResponse",
"AsyncObjectsResourceWithStreamingResponse",
"RepositoriesResource",
"AsyncRepositoriesResource",
"RepositoriesResourceWithRawResponse",
Expand Down
Loading