Skip to content

Commit 47e208d

Browse files
sid-rlstainless-app[bot]
authored andcommitted
fix(sdk): expose axon list params (#773)
1 parent 14806e1 commit 47e208d

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

src/runloop_api_client/sdk/_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from ..types import (
55
InputContext,
66
ScenarioView,
7+
AxonListParams,
78
AgentListParams,
89
AxonCreateParams,
910
DevboxListParams,
@@ -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
@@ -11,6 +11,7 @@
1111
import httpx
1212

1313
from ._types import (
14+
SDKAxonListParams,
1415
BaseRequestOptions,
1516
LongRequestOptions,
1617
SDKAgentListParams,
@@ -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
@@ -12,6 +12,7 @@
1212
from .axon import Axon
1313
from .agent import Agent
1414
from ._types import (
15+
SDKAxonListParams,
1516
BaseRequestOptions,
1617
LongRequestOptions,
1718
SDKAgentListParams,
@@ -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

0 commit comments

Comments
 (0)