AsyncTransport
Class: warmhub.AsyncTransport
Issues tRPC calls over an httpx.AsyncClient.
Methods
Section titled “Methods”trpc_url
Section titled “trpc_url”trpc_url(path: str)Documentation is not yet available.
request
Section titled “request”request(path: str, payload: object, *, timeout: httpx.Timeout | Unset = UNSET, headers: Mapping[str, str] | Unset = UNSET, extra_query: Mapping[str, str] | Unset = UNSET)POST one tRPC call and return the decoded result.data.
assert_compatible
Section titled “assert_compatible”assert_compatible(*, headers: Mapping[str, str] | Unset = UNSET, extra_query: Mapping[str, str] | Unset = UNSET)Documentation is not yet available.
assert_write_compatible
Section titled “assert_write_compatible”assert_write_compatible()Documentation is not yet available.
request_json
Section titled “request_json”request_json(method: str, path: str, body: object = None, *, timeout: httpx.Timeout | Unset = UNSET, headers: Mapping[str, str] | Unset = UNSET, extra_query: Mapping[str, str] | Unset = UNSET)Issue one REST call and return its decoded JSON body.
Mirrors requestJson. Shares send with the tRPC path, so the REST
surface gets the same auth stamping, the same 401 refresh retry and the
same timeout handling — the alternative was a second request path where
those three could drift silently.
request_health
Section titled “request_health”request_health(*, timeout: httpx.Timeout | Unset = UNSET, headers: Mapping[str, str] | Unset = UNSET, extra_query: Mapping[str, str] | Unset = UNSET)GET /health. Its own verb because its failure path is its own.
See interpret_health_response. Named rather than expressed as a
flag on request_json, because a flag would read as a formatting
choice when it is a different question being asked of the response.
send(plan: RequestPlan, *, timeout: httpx.Timeout | Unset = UNSET, headers: Mapping[str, str] | Unset = UNSET, stream: bool = False)Mirrors fetchWithAuth: stamp auth + identity, retry once on 401.
stream=True returns before the body is read, for the responses whose
whole point is not to be buffered — the NDJSON export. The caller owns
closing it, and must read the body itself before touching .text.
aclose
Section titled “aclose”aclose()Close the pool if we opened it. An injected transport is left alone.
warn_if_leaked
Section titled “warn_if_leaked”warn_if_leaked()Documentation is not yet available.
Properties and attributes
Section titled “Properties and attributes”api_url
Section titled “api_url”api_urlDocumentation is not yet available.
httpDocumentation is not yet available.
owns_http
Section titled “owns_http”owns_httpFalse when the caller injected the transport.
client_flags
Section titled “client_flags”client_flagsNormalized client_flags, stamped on every request.
is_closed
Section titled “is_closed”is_closedDocumentation is not yet available.