Adapters¶
Adapter packages import their SDK, so their API docs cannot be auto-rendered in an extras-free build. Their public surfaces are small and intentionally uniform; this page is the complete list.
Per-adapter exports¶
Every adapter package exports its adapter class, its per-call channel, and its dual-family error trio (each inherits both the clientwright error and the SDK's native family):
| Package | Per-call channel | Errors |
|---|---|---|
clientwright.adapters.httpx |
ROUTE_EXTENSION, IDEMPOTENT_EXTENSION (request extensions) |
HttpxCircuitOpenError, HttpxDeadlineExceededError, HttpxTooManyRedirectsError |
clientwright.adapters.httpx2 |
same names as httpx | same class names as httpx, inheriting httpx2's family |
clientwright.adapters.aiohttp |
call_options(route=..., idempotent=...) |
AiohttpCircuitOpenError, AiohttpDeadlineExceededError, AiohttpTooManyRedirectsError |
clientwright.adapters.requests |
call_options(...) |
RequestsCircuitOpenError, RequestsDeadlineExceededError, RequestsTooManyRedirectsError |
clientwright.adapters.urllib3 |
call_options(...) |
Urllib3CircuitOpenError, Urllib3DeadlineExceededError, Urllib3TooManyRedirectsError |
The three call_options are the same object — the shared ambient channel
documented in Core → Per-call options.
Capability records¶
Each adapter's capabilities module is zero-dependency and importable without
the SDK — that is what feeds clientwright.capabilities_matrix():
Observability backends¶
Observability backends behind extras; the core records via protocols only.
Attribute access is lazy so this package imports cleanly with no extras installed; touching a backend without its extra raises the backend's own install-hint ImportError.
OpenTelemetryTracer
¶
TracerProtocol backend over opentelemetry-api.
Source code in clientwright/adapters/observability/_tracing/otel.py
PrometheusClientMetrics
¶
ClientMetricsProtocol backend over prometheus-client.
Source code in clientwright/adapters/observability/_metrics/prometheus.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
The two backends live behind extras and are exposed lazily at the package root:
from clientwright.adapters.observability import (
OpenTelemetryTracer, # clientwright[tracing]
PrometheusClientMetrics, # clientwright[metrics]
)
PrometheusClientMetrics(registry=..., prefix=...) implements
ClientMetricsProtocol over prometheus_client, with the frozen names from
clientwright.core.telemetry.names. OpenTelemetryTracer(tracer_provider=...)
implements TracerProtocol, emitting one CLIENT span per logical call and
propagating context from it.