Rnet: Blazing-Fast HTTP Client with TLS Fingerprinting

2.4.2 · active · verified Mon Apr 13

Rnet is a high-performance Python HTTP client built with Rust bindings, specializing in advanced TLS fingerprinting. It accurately emulates the TLS and HTTP/2 signatures of various popular browsers like Chrome, Firefox, Safari, Opera, and OkHttp, enabling it to bypass sophisticated anti-bot detection systems. Rnet provides both asynchronous and synchronous client interfaces and is designed for speed and reliability in web scraping, API testing, and automation tasks. The current stable version is 2.4.2, with active development on 3.x release candidates, indicating a continuous and rapid release cadence.

Warnings

Install

Imports

Quickstart

This asynchronous example demonstrates how to create a client, specify a browser to impersonate for TLS/HTTP2 fingerprinting, and make a basic GET request. It then prints the HTTP status code and the response body. The `Impersonate` enum is used to select the desired browser profile.

import asyncio
from rnet import Client, Impersonate

async def main():
    # Build a client impersonating Firefox 139
    client = Client(impersonate=Impersonate.Firefox139)
    
    # Make a GET request
    resp = await client.get("https://tls.peet.ws/api/all")
    
    # Print the response status and text
    print(f"Status: {resp.status_code}")
    print(await resp.text())

if __name__ == "__main__":
    asyncio.run(main())

view raw JSON →