{"id":6193,"library":"pyqwest","title":"PyQwest","description":"PyQwest is a modern Python HTTP client built on the high-performance Rust library `reqwest`. It offers support for advanced HTTP features, including bidirectional streaming, HTTP/2, and HTTP/3. It provides both asynchronous and synchronous client interfaces and aims for a fully-typed, Pythonic API. The current version is 0.4.1. Releases are made on an as-needed basis, often to incorporate updates from the underlying `reqwest` library or to add new features.","status":"active","version":"0.4.1","language":"en","source_language":"en","source_url":"https://github.com/curioswitch/pyqwest","tags":["http client","async","sync","rust","networking","reqwest","http/2","http/3"],"install":[{"cmd":"pip install pyqwest","lang":"bash","label":"Install PyQwest"}],"dependencies":[],"imports":[{"note":"For asynchronous HTTP requests.","symbol":"Client","correct":"from pyqwest import Client"},{"note":"For synchronous HTTP requests.","symbol":"SyncClient","correct":"from pyqwest import SyncClient"},{"note":"To use PyQwest as a synchronous transport for HTTPX clients.","symbol":"PyQwestTransport","correct":"from pyqwest.httpx import PyQwestTransport"},{"note":"To use PyQwest as an asynchronous transport for HTTPX clients.","symbol":"AsyncPyQwestTransport","correct":"from pyqwest.httpx import AsyncPyQwestTransport"}],"quickstart":{"code":"import asyncio\nfrom pyqwest import Client, SyncClient\n\nasync def async_example():\n    client = Client()\n    response = await client.get(\"https://httpbin.org/get\")\n    print(f\"Async Response Status: {response.status}\")\n    print(f\"Async Response Body Length: {len(await response.content())}\")\n\ndef sync_example():\n    client = SyncClient()\n    response = client.get(\"https://httpbin.org/get\")\n    print(f\"Sync Response Status: {response.status}\")\n    print(f\"Sync Response Body Length: {len(response.content())}\")\n\nif __name__ == \"__main__\":\n    print(\"Running async example...\")\n    asyncio.run(async_example())\n    print(\"\\nRunning sync example...\")\n    sync_example()","lang":"python","description":"This quickstart demonstrates basic GET requests using both the asynchronous `Client` and synchronous `SyncClient`."},"warnings":[{"fix":"Ensure Rust is installed (e.g., via `rustup`) before attempting to `pip install pyqwest` if pre-built wheels are not provided for your environment.","message":"PyQwest 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Consult the documentation of the integrating library. For `connect-python` specifically, replace `httpx.AsyncClient` with `pyqwest.HTTPTransport` or `pyqwest.Client` as per their migration guide.","message":"If 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.","severity":"breaking","affected_versions":"0.1.0 and later when integrating with other libraries that adopt PyQwest as their HTTP transport."},{"fix":"Verify your `pip install` commands and import statements to ensure you are consistently using `pyqwest`.","message":"The `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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}