MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / get_async_httpx_client

Method get_async_httpx_client

trainer/src/api_client/client.py:111–123  ·  view source on GitHub ↗

Get the underlying httpx.AsyncClient, constructing a new one if not previously set

(self)

Source from the content-addressed store, hash-verified

109 return self
110
111 def get_async_httpx_client(self) -> httpx.AsyncClient:
112 """Get the underlying httpx.AsyncClient, constructing a new one if not previously set"""
113 if self._async_client is None:
114 self._async_client = httpx.AsyncClient(
115 base_url=self._base_url,
116 cookies=self._cookies,
117 headers=self._headers,
118 timeout=self._timeout,
119 verify=self._verify_ssl,
120 follow_redirects=self._follow_redirects,
121 **self._httpx_args,
122 )
123 return self._async_client
124
125 async def __aenter__(self) -> "Client":
126 """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)"""

Callers 5

__aenter__Method · 0.95
__aexit__Method · 0.95
asyncio_detailedFunction · 0.45
asyncio_detailedFunction · 0.45
asyncio_detailedFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected