# wreq
[](https://github.com/0x676e67/wreq-python/actions/workflows/ci.yml)


[](https://pypi.org/project/wreq/)
[![Discord chat][discord-badge]][discord-url]
[discord-badge]: https://img.shields.io/discord/1486741856397164788.svg?logo=discord
[discord-url]: https://discord.gg/rfbvyFkgq3
> 🚀 Help me work seamlessly with open source sharing by [sponsoring me on GitHub](https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md)
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](https://github.com/0x676e67/wreq).
## Features
- Async and Blocking `Client`s
- 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)
## Example
The following example uses the `asyncio` runtime with `wreq` installed via pip:
```bash
pip install wreq
```
And then the code:
```python
import asyncio
from wreq import Client, Emulation
async def main():
async with Client(emulation=Emulation.Chrome154) as c:
async with c.get("https://pingly.us.kg/api/all") as r:
r.raise_for_status()
print(await r.text())
if __name__ == "__main__":
asyncio.run(main())
```
Additional learning resources include:
- [Examples](https://github.com/0x676e67/wreq-python/tree/main/examples)
- [DeepWiki](https://deepwiki.com/0x676e67/wreq-python)
- [Documentation](https://python.wreq.org)
## Behavior
1. **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.
2. **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](https://python.wreq.org/en/latest/api/emulation/#wreq.emulation.Profile)** are maintained in **wreq**.
## Building
1. Platforms
- Linux(**glibc**/**musl**): `x86_64`, `aarch64`, `armv7`, `i686`
- macOS: `x86_64`,`aarch64`
- Windows: `x86_64`,`i686`,`aarch64`
- Android: `aarch64`, `x86_64`
2. Development
Install the BoringSSL build environment by referring to [boringssl](https://github.com/google/boringssl/blob/main/BUILDING.md).
```bash
# on ubuntu or debian
sudo apt install -y build-essential cmake perl pkg-config libclang-dev musl-tools git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
pip install uv maturin
uv venv
source .venv/bin/activate
# development
maturin develop --uv
# build wheels
maturin build --release
```
## Benchmark
Our [benchmark suite](https://github.com/0x676e67/wreq-python/tree/main/bench) compares Python HTTP clients over HTTPS HTTP/1.1 and HTTP/2. It tests complete and streamed uploads, reading every response to the end. The results include client versions and machine details so you can check the conditions behind each measurement. Performance varies by workload and environment.
## Services
Help sustain the ongoing development of this open-source project by reaching out for [commercial support](mailto:gngppz@gmail.com). Receive private guidance, expert reviews, or direct access to the maintainer, with personalized technical assistance tailored to your needs.
## License
Licensed under either of Apache License, Version 2.0 ([LICENSE](./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) license, shall be licensed as above, without any additional terms or conditions.
## Sponsors
**35M+ residential IPs with 99.9% success rates**
UK-based **[Byteful](https://byteful.com/?utm_source=github_python&utm_medium=github-sponsor&utm_campaign=wreq_github_sponsorship)** provides ethically sourced residential, mobile, static residential (ISP), and datacenter proxies. Its API-first scraping, data collection, and AI automation tools handle tens of billions of monthly requests.
With free geo-targeting and ~0.5s response times, Byteful helps you collect data at scale. Use code **`WREQ10`** for **10% off residential proxies**.
**[Dashboard](https://dashboard.byteful.com/)** | **[Docs](https://documentation.byteful.com/)** | **[Discord](https://discord.com/invite/ping-proxies-584021352940568578)**
---
**Unlimited residential traffic, billed by bandwidth**
**[LundProxy](https://www.lundproxy.com?utm_source=github&utm_medium=sponsorship&utm_campaign=wreq_python&utm_content=description)** provides unlimited residential traffic and concurrent connections on 50 Mbps to 1 Gbps plans, billed by download bandwidth with no monthly GB allowance. Use standard HTTP(S) or SOCKS5 clients without a proprietary SDK for price monitoring, public web data collection, and AI datasets.
**100M+ residential IPs** • **190+ countries** • **Country targeting** • **Rotating and sticky sessions**
**[Free 50 Mbps, 2-hour trial](https://t.me/lundproxy?text=Hi%20LundProxy%2C%20I%20found%20you%20on%20wreq-python%20GitHub%20and%20would%20like%20the%20free%2050%20Mbps%2C%202-hour%20Unlimited%20Residential%20trial).** Subject to support approval; no payment method required.
**[Dashboard](https://www.lundproxy.com/app/login.html)** | **[Pricing](https://www.lundproxy.com/pricing.html?utm_source=github&utm_medium=sponsorship&utm_campaign=wreq_python&utm_content=pricing)** | **[Docs](https://www.lundproxy.com/developers/?utm_source=github&utm_medium=sponsorship&utm_campaign=wreq_python&utm_content=docs)**
---
**[NodeMaven](https://go.nodemaven.com/wreqpythonGHaugust)** is the most efficient proxy provider for web scraping and automation, with the highest-quality IPs on the market.
**[Why NodeMaven?](https://go.nodemaven.com/wreqpythonGHaugust)**
**ZIP Targeting** • **99.9% Uptime** • **IP Filtering (Every Proxy Has a Fraud Score Below 97%)** • **No KYC**
Unique free tools include the **Proxy Bandwidth Checker**, **Meta Tag Checker**, **IP Lookup**, and more.
**Special discounts for wreq-python users:** `WREQ35` gives 35% off mobile and residential proxies • `WREQ40` gives 40% off ISP (static) proxies
**[Dashboard](https://dashboard.nodemaven.com/accounts/login/)** | **[Docs](https://docs.nodemaven.com/en/)** | **[LinkedIn](https://www.linkedin.com/company/nodemaven/)**
---
**[Scrape.do](https://scrape.do/?utm_source=github&utm_medium=rnet)** is the ultimate toolkit for collecting public data at scale. Unmatched speed, unbeatable prices, unblocked access.
One line of code. Instant data access
**Automatic Proxy Rotation** • **Bypass Anti-bot Solutions** • **Seamless Web Scraping**
**[Dashboard](https://dashboard.scrape.do/login)** | **[Docs](https://scrape.do/documentation)** | **[Linkedin](https://www.linkedin.com/company/scrape-do/)**
---
Captcha solving can be slow and unreliable, but **[EzCaptcha](https://www.ez-captcha.com/?r=github-rnet)** delivers fast, reliable solving through a simple API — supporting a wide range of captcha types with no complex integration required.
**ReCaptcha** • **FunCaptcha** • **CloudFlare** • **Akamai** • **AkamaiSbsd** • **HCaptcha**
Designed for developers, it offers high accuracy, low price, low latency, and easy integration, helping you automate verification while keeping traffic secure and user flows smooth.
**[Dashboard](https://www.ez-captcha.com/?r=github-rnet)** | **[Docs](https://ezcaptcha.atlassian.net/wiki/spaces/IS/pages/7045121/EzCaptcha+API+Docs+English)** | **[Telegram](https://t.me/+NrVmPhlb9ZFkZGY5)**
---
TLS fingerprinting alone isn't enough for modern bot protection. **[Hyper Solutions](https://hypersolutions.co?utm_source=github&utm_medium=readme&utm_campaign=rnet)** provides the missing piece - API endpoints that generate valid antibot tokens for:
**Akamai** • **DataDome** • **Kasada** • **Incapsula**
No browser automation. Just simple API calls that return the exact cookies and headers these systems require.
**[Dashboard](https://hypersolutions.co?utm_source=github&utm_medium=readme&utm_campaign=rnet)** | **[Docs](https://docs.justhyped.dev)** | **[Discord](https://discord.gg/akamai)**