Skip to content

Commit fa051d3

Browse files
committed
fix(sdk): expose axon list pagination params in OO SDK
1 parent 177f39a commit fa051d3

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

src/runloop_api_client/sdk/_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
InputContext,
66
ScenarioView,
77
AgentListParams,
8+
AxonListParams,
89
AxonCreateParams,
910
DevboxListParams,
1011
ObjectListParams,
@@ -190,6 +191,10 @@ class SDKAgentListParams(AgentListParams, BaseRequestOptions):
190191
pass
191192

192193

194+
class SDKAxonListParams(AxonListParams, BaseRequestOptions):
195+
pass
196+
197+
193198
class SDKAxonCreateParams(AxonCreateParams, LongRequestOptions):
194199
pass
195200

src/runloop_api_client/sdk/async_.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
BaseRequestOptions,
1515
LongRequestOptions,
1616
SDKAgentListParams,
17+
SDKAxonListParams,
1718
SDKAxonCreateParams,
1819
SDKDevboxListParams,
1920
SDKObjectListParams,
@@ -544,9 +545,14 @@ def from_id(self, axon_id: str) -> AsyncAxon:
544545
"""Get an AsyncAxon instance for an existing axon ID."""
545546
return AsyncAxon(self._client, axon_id)
546547

547-
async def list(self, **options: Unpack[BaseRequestOptions]) -> list[AsyncAxon]:
548-
"""[Beta] List all active axons."""
549-
result = await self._client.axons.list(**options)
548+
async def list(self, **params: Unpack[SDKAxonListParams]) -> list[AsyncAxon]:
549+
"""[Beta] List all active axons.
550+
551+
:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAxonListParams` for available parameters
552+
:return: Collection of axon wrappers
553+
:rtype: list[AsyncAxon]
554+
"""
555+
result = await self._client.axons.list(**params)
550556
return [AsyncAxon(self._client, axon.id) for axon in result.axons]
551557

552558

src/runloop_api_client/sdk/sync.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
BaseRequestOptions,
1616
LongRequestOptions,
1717
SDKAgentListParams,
18+
SDKAxonListParams,
1819
SDKAxonCreateParams,
1920
SDKDevboxListParams,
2021
SDKObjectListParams,
@@ -539,9 +540,14 @@ def from_id(self, axon_id: str) -> Axon:
539540
"""Get an Axon instance for an existing axon ID."""
540541
return Axon(self._client, axon_id)
541542

542-
def list(self, **options: Unpack[BaseRequestOptions]) -> list[Axon]:
543-
"""[Beta] List all active axons."""
544-
result = self._client.axons.list(**options)
543+
def list(self, **params: Unpack[SDKAxonListParams]) -> list[Axon]:
544+
"""[Beta] List all active axons.
545+
546+
:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAxonListParams` for available parameters
547+
:return: Collection of axon wrappers
548+
:rtype: list[Axon]
549+
"""
550+
result = self._client.axons.list(**params)
545551
return [Axon(self._client, axon.id) for axon in result.axons]
546552

547553

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)