Registry / http-networking / rnet
library2.4.2pypypi✓ verified 24d ago

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.

pip install rnet
INSTALL
IMPORT
SIG · RNET
R
rnet
http-networkingpythonv2.4.2
Install
2.1s avg
Import
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 26MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from rnet import Client
Main asynchronous client for making requests.
BlockingClient
from rnet import BlockingClient
Synchronous client for simpler use cases.
Impersonate
from rnet import Impersonate
from rnet import Emulation
For `v2.x`, use `Impersonate` for browser emulation profiles. In `v3.x` release candidates, this enum was renamed to `Emulation`.

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())
Debug
Known issues
breakingThe `Impersonate` enum, used to specify browser profiles for TLS fingerprinting, has been renamed to `Emulation` in `v3.x` release candidates. Code written for `v2.x` using `Impersonate` will break when upgrading to `v3.x`.
fix
Update `from rnet import Impersonate` to `from rnet import Emulation` and change usage from `Impersonate.BrowserVersion` to `Emulation.BrowserVersion`.
affects: >=3.0.0-rc.X
gotchaVersion `3.0.0` of `rnet` is currently in a release candidate (RC) phase. While the API is stabilizing, minor changes may still occur before the final `3.0.0` stable release. Users should be aware of potential breaking changes when upgrading between RCs or to the final stable version.
fix
For production systems, consider pinning to a `2.x` version until `3.0.0` is officially stable, or thoroughly test `3.x` RCs in your environment.
affects: 3.0.0-rc.X
gotchaBuilding `rnet` from source (e.g., if pre-compiled wheels are not available for your specific platform/Python version) requires a Rust toolchain and a properly set up BoringSSL build environment. This can be complex to configure compared to a standard `pip install`.
fix
Prefer installing `rnet` via `pip` to utilize pre-built wheels. If building from source is necessary, refer to the official GitHub repository for detailed instructions on setting up the Rust and BoringSSL build environments.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'rnet'
The 'rnet' package is not installed in the current Python environment or the Python interpreter cannot find it.
fix
Run `pip install rnet` in your terminal to install the library.
error: can't find Rust compiler
The 'rnet' library requires a Rust compiler (rustc) and Cargo to be installed and available in your system's PATH for building its Rust extensions from source, which typically happens when a pre-compiled wheel is not available for your specific platform and Python version.
fix
Install Rust by following the instructions on the official Rust website (rustup.rs) or via your system's package manager, then try `pip install rnet` again.
TypeError: Client.get() missing 1 required positional argument: 'url'
The `get()` method (and similar request methods like `post()`, `put()`, etc.) on the rnet `Client` or `AClient` object requires at least a URL string as its first argument.
fix
Provide the URL when calling the request method, e.g., `client.get("https://example.com")`.
AttributeError: 'coroutine' object has no attribute 'status_code'
This error occurs when using the asynchronous `rnet.AClient` and forgetting to `await` the result of a network operation (like `get()`, `post()`), meaning you are trying to access attributes on the coroutine object itself, not the actual response object.
fix
Ensure you `await` the asynchronous client calls, e.g., `response = await client.get("https://example.com")`.
Upgrade
Version history
2.4.2latest on PyPI · released Aug 2, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
Resources
rnet — pip install rnet · libregistry