Install & Compatibility
Where this runs
tested against v0.6.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✕ build_error
31MB installed
● package 31MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ from pyqwest import Client
For asynchronous HTTP requests.
SyncClient
✓ from pyqwest import SyncClient
For synchronous HTTP requests.
PyQwestTransport
✓ from pyqwest.httpx import PyQwestTransport
To use PyQwest as a synchronous transport for HTTPX clients.
AsyncPyQwestTransport
✓ from pyqwest.httpx import AsyncPyQwestTransport
To use PyQwest as an asynchronous transport for HTTPX clients.
This quickstart demonstrates basic GET requests using both the asynchronous `Client` and synchronous `SyncClient`.
import asyncio
from pyqwest import Client, SyncClient
async def async_example():
client = Client()
response = await client.get("https://httpbin.org/get")
print(f"Async Response Status: {response.status}")
print(f"Async Response Body Length: {len(await response.content())}")
def sync_example():
client = SyncClient()
response = client.get("https://httpbin.org/get")
print(f"Sync Response Status: {response.status}")
print(f"Sync Response Body Length: {len(response.content())}")
if __name__ == "__main__":
print("Running async example...")
asyncio.run(async_example())
print("\nRunning sync example...")
sync_example()
Debug
Known issues
gotchaPyQwest is a Rust-based library. If pre-built wheels are not available for your specific platform and Python version, you will need the Rust toolchain installed for `pip` to build it from source.fixEnsure Rust is installed (e.g., via `rustup`) before attempting to `pip install pyqwest` if pre-built wheels are not provided for your environment.
affects: All
breakingIf you were previously passing custom `httpx.AsyncClient` or `httpx.Client` sessions directly to clients that now internally use `pyqwest` (e.g., `connect-python` v0.8.0+), you will need to migrate to passing `pyqwest.HTTPTransport` or `pyqwest.SyncHTTPTransport` instances, or a `pyqwest.Client`/`pyqwest.SyncClient` directly.fixConsult the documentation of the integrating library. For `connect-python` specifically, replace `httpx.AsyncClient` with `pyqwest.HTTPTransport` or `pyqwest.Client` as per their migration guide.
affects: 0.1.0 and later when integrating with other libraries that adopt PyQwest as their HTTP transport.
gotchaThe `pyqwest` library is distinct from `pyreqwest`. While both are Python HTTP clients based on the Rust `reqwest` library, they are separate projects with different APIs and development teams. Ensure you are importing and using the correct library.fixVerify your `pip install` commands and import statements to ensure you are consistently using `pyqwest`.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyqwest'
The 'pyqwest' package is not installed in the current Python environment.
AttributeError: module 'pyqwest' has no attribute 'get'
The 'get' method is called directly on the 'pyqwest' module instead of on an instance of 'pyqwest.Client' or 'pyqwest.AsyncClient'.
fiximport pyqwest
client = pyqwest.Client()
response = client.get('http://example.com')
print(response.status_code) AttributeError: 'coroutine' object has no attribute 'status_code'
An asynchronous method (e.g., 'AsyncClient.get()') was called without 'await', resulting in a coroutine object instead of the actual 'Response' object.
fiximport asyncio
import pyqwest
async def main():
async with pyqwest.AsyncClient() as client:
response = await client.get('http://example.com')
print(response.status_code)
if __name__ == '__main__':
asyncio.run(main()) ERROR: Failed building wheel for pyqwest
The Rust toolchain (required to compile the underlying reqwest library) is not installed or configured correctly on the system.
fixcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
pip install pyqwest
ImportError: cannot import name 'client' from 'pyqwest'
The main HTTP client class in pyqwest is named `QwestClient` (with a capital 'Q'), not `client`.
fixfrom pyqwest import QwestClient
Upgrade
Version history
0.6.1latest on PyPI · released Jun 3, 2026
Audit
Dependencies
No dependency data recorded yet.