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

Method get_httpx_client

trainer/src/api_client/client.py:80–92  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

78 return self
79
80 def get_httpx_client(self) -> httpx.Client:
81 """Get the underlying httpx.Client, constructing a new one if not previously set"""
82 if self._client is None:
83 self._client = httpx.Client(
84 base_url=self._base_url,
85 cookies=self._cookies,
86 headers=self._headers,
87 timeout=self._timeout,
88 verify=self._verify_ssl,
89 follow_redirects=self._follow_redirects,
90 **self._httpx_args,
91 )
92 return self._client
93
94 def __enter__(self) -> "Client":
95 """Enter a context manager for self.client—you cannot enter twice (see httpx docs)"""

Callers 5

__enter__Method · 0.95
__exit__Method · 0.95
sync_detailedFunction · 0.45
sync_detailedFunction · 0.45
sync_detailedFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected