Skip to content

Commit 77ef431

Browse files
committed
fixing the deployment_history
1 parent 7ca5f0b commit 77ef431

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

src/agentex/_client.py

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
from typing_extensions import Self, Literal, override
88

99
import httpx
10+
from yarl import cache_clear
1011

11-
from agentex.resources import DeploymentHistoryResource
12+
from agentex.resources import (
13+
AsyncDeploymentHistoryResource,
14+
AsyncDeploymentHistoryResourceWithRawResponse,
15+
DeploymentHistoryResource,
16+
)
1217

1318
from . import _exceptions
1419
from ._qs import Querystring
@@ -33,7 +38,7 @@
3338
)
3439

3540
if TYPE_CHECKING:
36-
from .resources import spans, tasks, agents, events, states, tracker, messages
41+
from .resources import spans, tasks, agents, events, states, tracker, messages, deployment_history
3742
from .resources.spans import SpansResource, AsyncSpansResource
3843
from .resources.tasks import TasksResource, AsyncTasksResource
3944
from .resources.agents import AgentsResource, AsyncAgentsResource
@@ -417,6 +422,12 @@ def tracker(self) -> AsyncTrackerResource:
417422

418423
return AsyncTrackerResource(self)
419424

425+
@cached_property
426+
def deployment_history(self) -> AsyncDeploymentHistoryResource:
427+
from .resources.deployment_history import AsyncDeploymentHistoryResource
428+
429+
return AsyncDeploymentHistoryResource(self)
430+
420431
@cached_property
421432
def with_raw_response(self) -> AsyncAgentexWithRawResponse:
422433
return AsyncAgentexWithRawResponse(self)
@@ -582,6 +593,12 @@ def tracker(self) -> tracker.TrackerResourceWithRawResponse:
582593

583594
return TrackerResourceWithRawResponse(self._client.tracker)
584595

596+
@cached_property
597+
def deployment_history(self) -> deployment_history.DeploymentHistoryResourceWithRawResponse:
598+
from .resources.deployment_history import DeploymentHistoryResourceWithRawResponse
599+
600+
return DeploymentHistoryResourceWithRawResponse(self._client.deployment_history)
601+
585602

586603
class AsyncAgentexWithRawResponse:
587604
_client: AsyncAgentex
@@ -631,6 +648,12 @@ def tracker(self) -> tracker.AsyncTrackerResourceWithRawResponse:
631648

632649
return AsyncTrackerResourceWithRawResponse(self._client.tracker)
633650

651+
@cached_property
652+
def deployment_history(self) -> deployment_history.AsyncDeploymentHistoryResourceWithRawResponse:
653+
from .resources.deployment_history import AsyncDeploymentHistoryResourceWithRawResponse
654+
655+
return AsyncDeploymentHistoryResourceWithRawResponse(self._client.deployment_history)
656+
634657

635658
class AgentexWithStreamedResponse:
636659
_client: Agentex
@@ -680,6 +703,12 @@ def tracker(self) -> tracker.TrackerResourceWithStreamingResponse:
680703

681704
return TrackerResourceWithStreamingResponse(self._client.tracker)
682705

706+
@cached_property
707+
def deployment_history(self) -> deployment_history.DeploymentHistoryResourceWithStreamingResponse:
708+
from .resources.deployment_history import DeploymentHistoryResourceWithStreamingResponse
709+
710+
return DeploymentHistoryResourceWithStreamingResponse(self._client.deployment_history)
711+
683712

684713
class AsyncAgentexWithStreamedResponse:
685714
_client: AsyncAgentex
@@ -729,6 +758,12 @@ def tracker(self) -> tracker.AsyncTrackerResourceWithStreamingResponse:
729758

730759
return AsyncTrackerResourceWithStreamingResponse(self._client.tracker)
731760

761+
@cached_property
762+
def deployment_history(self) -> deployment_history.AsyncDeploymentHistoryResourceWithStreamingResponse:
763+
from .resources.deployment_history import AsyncDeploymentHistoryResourceWithStreamingResponse
764+
765+
return AsyncDeploymentHistoryResourceWithStreamingResponse(self._client.deployment_history)
766+
732767

733768
Client = Agentex
734769

0 commit comments

Comments
 (0)