https://github.com/0x676e67/rnet
An ergonomic Python HTTP Client with TLS fingerprint
https://github.com/0x676e67/rnet
akamai akamai-fingerprint crawler fingerprint http http-client http2 https ja3 ja4 python rust scraper tls tls-client tls-fingerprint web-scraping websocket websocket-client
Last synced: 1 day ago
JSON representation
An ergonomic Python HTTP Client with TLS fingerprint
- Host: GitHub
- URL: https://github.com/0x676e67/rnet
- Owner: 0x676e67
- License: apache-2.0
- Created: 2025-02-10T10:37:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-11T04:42:36.000Z (9 days ago)
- Last Synced: 2026-02-11T08:47:08.693Z (9 days ago)
- Topics: akamai, akamai-fingerprint, crawler, fingerprint, http, http-client, http2, https, ja3, ja4, python, rust, scraper, tls, tls-client, tls-fingerprint, web-scraping, websocket, websocket-client
- Language: Rust
- Homepage: https://python.wreq.org
- Size: 5.42 MB
- Stars: 1,209
- Watchers: 16
- Forks: 93
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-python - rnet - HTTP client with TLS fingerprinting. (π Web & Networking)
README
# rnet
[](https://github.com/0x676e67/rnet/actions/workflows/ci.yml)


[](https://pypi.org/project/rnet/)
[](https://pepy.tech/projects/rnet)
> π 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 advanced and low-level emulation, featuring customizable TLS, JA3/JA4, and HTTP/2 fingerprinting 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 `rnet` installed via pip:
```bash
pip install asyncio rnet --pre --upgrade
```
And then the code:
```python
import asyncio
from rnet import Client, Emulation
async def main():
# Build a client
client = Client(emulation=Emulation.Safari26)
# Use the API you're already familiar with
resp = await client.get("https://tls.peet.ws/api/all")
print(await resp.text())
if __name__ == "__main__":
asyncio.run(main())
```
Additional learning resources include:
- [DeepWiki](https://deepwiki.com/0x676e67/rnet)
- [Documentation](https://rnet.readthedocs.io/)
- [Synchronous Examples](https://github.com/0x676e67/rnet/tree/main/python/examples/blocking)
- [Asynchronous Examples](https://github.com/0x676e67/rnet/tree/main/python/examples)
## 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, `rnet` 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. In most cases, the `User-Agent` version is the only variable. Detailed mapping is available in the [documentation](https://rnet.readthedocs.io/).
## 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
Outperforms `requests`, `httpx`, `aiohttp`, and `curl_cffi`, and you can see the [benchmark](https://github.com/0x676e67/rnet/tree/main/bench) for details β benchmark data is for reference only and actual performance may vary based on your environment and use case.
## 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
**[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
π **[Register](https://dashboard.scrape.do/login)** | π **[Linkedin](https://www.linkedin.com/company/scrape-do/)** | π **[Docs](https://scrape.do/documentation)**
---
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.
π **[Get API Key](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)**
---
**[Thordata](https://www.google.com/url?q=https://www.thordata.com/?ls%3Dgithub%26lk%3Drnet&sa=D&source=editors&ust=1768812458958099&usg=AOvVaw1VwMpnrjCaf7iWbVsM5V0k)**: Get Reliable Global Proxies at an Unbeatable Value.
One-click data collection with enterprise-grade stability and compliance. Join thousands of developers using ThorData for high-scale operations.
**Exclusive Offer**: Sign up for a free Residential Proxy trial and 2,000 FREE SERP API calls!
π **[Linkedin](https://www.linkedin.com/company/thordata/?viewAsMember=true)** | π¬ **[Discord](https://discord.gg/t9qnNKfurd)** | βοΈ **[Telegram](https://t.me/thordataproxy)**
---
Anti-bots evolve quickly, but **[Salamoonder](https://salamoonder.com/)** moves faster, delivering reliable anti-bot tokens with just two API requests β no browser automation or unnecessary complexity required.
**Kasada** β’ **Incapsula** β’ **Datadome** β’ **Akamai** β’ **And many more**
Automatic updates keep your integration simple and low-maintenance, and itβs nearly **50%** cheaper than the competition, giving you faster results at a lower cost.
π **[Register](https://salamoonder.com/auth/register)** | π **[Docs](https://apidocs.salamoonder.com/)** | π¬ **[Telegram](https://t.me/salamoonder_telegram)**
---
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.
π **[Get Your API Key](https://hypersolutions.co?utm_source=github&utm_medium=readme&utm_campaign=rnet)** | π **[Docs](https://docs.justhyped.dev)** | π¬ **[Discord](https://discord.gg/akamai)**
---
[CapSolver](https://www.capsolver.com/?utm_source=github&utm_medium=banner_repo&utm_campaign=rnet) leverages AI-powered Auto Web Unblock to bypass Captchas effortlessly, providing fast, reliable, and cost-effective data access with seamless integration into Colly, Puppeteer, and Playwrightβuse code **`RNET`** for a 6% bonus!