Skip to content

Commit

Permalink
feat: expose client url and sync client (#4925)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming authored Aug 20, 2024
1 parent e141600 commit e1a40cc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/_bentoml_impl/client/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,17 @@ def __init__(
super().__init__()

@property
def to_async(self) -> t.Any:
def to_async(self) -> AsyncHTTPClient:
return self._async

@property
def to_sync(self) -> SyncHTTPClient:
return self._sync

@property
def client_url(self) -> str:
return str(self._async.client.base_url)

async def is_ready(self, timeout: int | None = None) -> bool:
return await self._async.is_ready(timeout=timeout)

Expand Down

0 comments on commit e1a40cc

Please sign in to comment.