wreq
🚀 Help me work seamlessly with open source sharing by sponsoring me on GitHub
An ergonomic and modular Python HTTP Client for high-fidelity protocol matching, featuring customizable TLS, JA3/JA4, and HTTP/2 signature capabilities, powered by wreq.
Features
- Async and Blocking
Clients - Plain bodies, JSON, urlencoded, multipart
- HTTP Trailer
- Cookie Store
- Redirect Policy
- Original Header
- Rotating Proxies
- Connection Pooling
- Streaming Transfers
- Zero-Copy Transfers
- WebSocket Upgrade
- HTTPS via BoringSSL
- Free-Threaded Safety
- Automatic Decompression
- Certificate Store (CAs & mTLS)
Why wreq?
-
When your HTTP requests succeed in a browser but get blocked in Python due to network fingerprint issues, this tool bridges the gap. wreq allows you to customize your TLS, JA3/JA4, and HTTP/2 fingerprints to mimic real browsers, making it ideal for web scraping, penetration testing, and security research.
-
The standard HTTP Client, such as requests and httpx, have different network fingerprints from browsers. The main differences lie in TLS handshake, HTTP/2 frame characteristics, and JA3/JA4 fingerprints. Browsers use specific encryption suites and extensions in the TLS handshake, while standard HTTP clients may use different default settings, causing servers to recognize and block these requests.
-
wreq uses the BoringSSL library, which is fully sufficient to set TLS fingerprints that match mainstream browsers while maintaining native performance.
-
In addition, the basic functions of wreq are similar to those of the standard HTTP Client, offering a wide range of features such as connection pooling, redirection policies, Cookie storage, and streaming transmission, which can meet various complex HTTP request requirements.
Behavior
- HTTP/2 over TLS
Due to the complexity of TLS encryption and the widespread adoption of HTTP/2, browser fingerprints such as JA3, JA4, and Akamai cannot be reliably emulated using simple fingerprint strings. Instead of parsing and emulating these string-based fingerprints, wreq provides fine-grained control over TLS and HTTP/2 extensions and settings for precise browser behavior emulation.
- Device Emulation
TLS and HTTP/2 fingerprints are often identical across various browser models because these underlying protocols evolve slower than browser release cycles. 100+ browser device emulation profiles are maintained in wreq.
Available OS emulations
- Windows
- macOS
- Linux
- Android
- iOS
Available browser emulations
-
Chrome
Chrome100Chrome101Chrome104Chrome105Chrome106Chrome107Chrome108Chrome109Chrome110Chrome114Chrome116Chrome117Chrome118Chrome119Chrome120Chrome123Chrome124Chrome126Chrome127Chrome128Chrome129Chrome130Chrome131Chrome132Chrome133Chrome134Chrome135Chrome136Chrome137Chrome138Chrome139Chrome140Chrome141Chrome142Chrome143Chrome144Chrome145Chrome146Chrome147 -
Edge
Edge101Edge122Edge127Edge131Edge134Edge135Edge136Edge137Edge138Edge139Edge140Edge141Edge142Edge143Edge144Edge145,Edge146Edge147 -
Firefox
Firefox109Firefox117Firefox128Firefox133Firefox135FirefoxPrivate135FirefoxAndroid135Firefox136FirefoxPrivate136Firefox139Firefox142Firefox143Firefox144Firefox145Firefox146Firefox147Firefox148Firefox149 -
Safari
SafariIos17_2SafariIos17_4_1SafariIos16_5Safari15_3Safari15_5Safari15_6_1Safari16Safari16_5Safari17_0Safari17_2_1Safari17_4_1Safari17_5Safari18SafariIPad18Safari18_2Safari18_3Safari18_3_1SafariIos18_1_1Safari18_5Safari26Safari26_1Safari26_2SafariIos26SafariIos26_2SafariIPad26SafariIpad26_2 -
Opera
Opera116Opera117Opera118Opera119Opera120Opera121Opera122Opera123Opera124Opera125Opera126Opera127Opera128Opera129Opera130 -
OkHttp
OkHttp3_9OkHttp3_11OkHttp3_13OkHttp3_14OkHttp4_9OkHttp4_10OkHttp4_12OkHttp5
License
Licensed under either of Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.