Registry / http-networking / wrapper-tls-requests

wrapper-tls-requests

JSON →
library1.2.5pypypi✓ verified 84d ago

A powerful and lightweight Python library for making secure and reliable HTTP/TLS fingerprint requests, version 1.2.5. It wraps tls-client to mimic browser TLS fingerprints. Releases are frequent, with multiple updates per month.

pip install wrapper-tls-requests
INSTALL
IMPORT
SIG · WRAPPER-TLS-REQUES
W
wrapper-tls-requests
http-networkingpythonv1.2.5
Install
2.3s avg
Import
737ms
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.5 · 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.784s · 20.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.3s · import 0.690s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

TLSClient
from tls_requests import TLSClient
from tls_requests import TLSSession
Before v1.1.0, the main class was TLSSession; renamed for consistency.
TLSResponse
from tls_requests import TLSResponse

Initialize a TLSClient and make a GET request with a custom User-Agent to mimic a browser.

from tls_requests import TLSClient client = TLSClient() response = client.get('https://httpbin.org/get', headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}) print(response.text)
Debug
Known issues
deprecatedThe module name 'wrapper_tls_requests' is deprecated; use 'tls_requests'.
fix
Run `pip uninstall wrapper-tls-requests && pip install wrapper-tls-requests` and update imports to `from tls_requests import ...`.
affects: v1.2.0+
gotchaTLSClient is not thread-safe; sharing a client across threads may cause race conditions.
fix
Create a new TLSClient instance per thread or use threading.Lock.
affects: all
breakingIn v1.2.0, the default TLS fingerprint changed, breaking responses that depend on the old fingerprint.
fix
Specify the desired fingerprint explicitly: TLSClient(tls_client_id='chrome_120') or use the 'TLSClient.from_session' method to replicate a known session.
affects: v1.2.0 and later
gotchaHTTP proxy support requires explicit configuration; environment variables (HTTP_PROXY, HTTPS_PROXY) are not automatically honored.
fix
Pass proxies dict to client.get(proxies={'http': 'http://proxy:8080', 'https': 'http://proxy:8080'}) or set client.proxies.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'TLSClient' from 'tls_requests'
The old import path used 'wrapper_tls_requests' or the class was named 'TLSSession' in older versions.
fix
Install latest version and use `from tls_requests import TLSClient`. If using an older version, check documentation for correct class.
tls_requests.exceptions.TLSClientInitializationError: Failed to initialize TLS client. Ensure tls-client binary is available.
The underlying tls-client binary is missing or corrupted.
fix
Run `pip install wrapper-tls-requests` again to reinstall the binary, or manually download from https://github.com/thewebscraping/tls-client-binary.
AttributeError: 'TLSClient' object has no attribute 'session'
Incorrect usage: the client does not have a session attribute; use the client directly.
fix
Replace `client.session.get(...)` with `client.get(...)`.
Upgrade
Version history
1.2.5latest on PyPI · released Feb 23, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
62 hits · last 30 days
node
56
OpenAI (training)
1
Resources
wrapper-tls-requests — pip install wrapper-tls-requests · libregistry