pyreqwest - Powerful and fast 100% Rust based HTTP client
Posted by Mantu89@reddit | Python | View on Reddit | 1 comments
What My Project Does
pyreqwest is a high-performance HTTP client for Python that wraps highly used Rust crates (like reqwest) and exposes an ergonomic, fully type-annotated Python API. Async and sync clients, automatic decompression/decoding, middlewares, streaming, pooling, mocking, and more.
Target Audience
Developers pushing high concurrency and throughput (backend services, scraping, data ingestion).
Test heavy projects needing clean HTTP mocking or ASGI-app integrations for testing.
Projects requiring different types of HTTP usage (eg sync/async). This supports large amount of different use-cases. No need to use many different Python HTTP dependencies.
Comparison
See here
vs httpx: hugely faster, more robust HTTP/2 support (httpx is in a neglected state and suffering from huge perf issues)
vs urllib: much faster, HTTP/2 support, more ergonomic with type-safety
vs aiohttp: faster, HTTP/2 support, better ergonomics and testing capabilities
vs writing Rust yourself: Zero boilerplate; Pythonic type-safe builder APIs
Not ideal if you need a pure Python solution where you can step through internal HTTP logic or get deep stack traces. Also < 3.11 / alternative interpreters are not supported.
Features
- Async + sync clients (shared design)
- Fully implemented in Rust, including JSON, headers, cookies, URL handling
- HTTP/1.1 and HTTP/2 (HTTP/3 when upstream stabilizes)
- Connection pooling, streaming request/response bodies
- Automatic decompression (zstd, gzip, brotli, deflate) & charset detection
- Middleware system + pluggable JSON serializer
- Mocking utilities (including ASGI app hookup)
- Redirects, proxies, timeouts, auth (Basic, Bearer), cookie store
- Multipart forms
- No
unsafe
, no C extensions, free threading - Fully type hinted
Happy to get feedback, benchmarks, or edge case reports. Install with: uv add pyreqwest
(or your preferred tool).
forgotpw3@reddit
This is dope. I'm gonna try it. Can we do lower level stuff like mess with the TCP connector (like in aiohttp?)