HTTPX Adapters
pyqwest.httpx.AsyncPyqwestTransport
Bases: AsyncBaseTransport
An HTTPX transport implementation that delegates to pyqwest.
This can be used with any existing code using httpx.AsyncClient, and will enable use of bidirectional streaming and response trailers.
By default, pyqwest.HTTPTransport follows redirects internally. To have
HTTPX handle it instead, for example to set response.history, configure
the pyqwest transport with follow_redirects=False.
HTTPX's per-phase timeouts are approximated, not honored individually: the
underlying transport supports a single operation timeout, which is taken as
the sum of the read and write timeouts. A phase explicitly set to
None means no limit and disables the operation timeout. The connect
timeout is configured on the pyqwest transport instead, and pool is
ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transport
|
Transport
|
The pyqwest transport to delegate requests to. |
required |
pyqwest.httpx.PyqwestTransport
Bases: BaseTransport
An HTTPX transport implementation that delegates to pyqwest.
This can be used with any existing code using httpx.Client, and will enable use of bidirectional streaming and response trailers.
By default, pyqwest.SyncHTTPTransport follows redirects internally. To have
HTTPX handle it instead, for example to set response.history, configure
the pyqwest transport with follow_redirects=False.
HTTPX's per-phase timeouts are approximated, not honored individually: the
underlying transport supports a single operation timeout, which is taken as
the sum of the read and write timeouts. A phase explicitly set to
None means no limit and disables the operation timeout. The connect
timeout is configured on the pyqwest transport instead, and pool is
ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transport
|
SyncTransport
|
The pyqwest transport to delegate requests to. |
required |