wrapper-tls-requests


Namewrapper-tls-requests JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/thewebscraping/tls-requests
SummaryA powerful and lightweight Python library for making secure and reliable HTTP/TLS Fingerprint requests.
upload_time2025-02-15 04:38:33
maintainerNone
docs_urlNone
authorTu Pham
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements chardet requests tqdm idna
Travis-CI No Travis.
coveralls test coverage
            # TLS Requests

[![GitHub License](https://img.shields.io/github/license/thewebscraping/tls-requests)](https://github.com/thewebscraping/tls-requests/blob/main/LICENSE)
[![CI](https://github.com/thewebscraping/tls-requests/actions/workflows/ci.yml/badge.svg)](https://github.com/thewebscraping/tls-requests/actions/workflows/ci.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/wrapper-tls-requests)](https://pypi.org/project/wrapper-tls-requests/)
![Python Version](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue?style=flat)
![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)

[![](https://img.shields.io/badge/Pytest-Linux%20%7C%20MacOS%20%7C%20Windows-blue?style=flat&logo=pytest&logoColor=white)](https://github.com/thewebscraping/tls-requests)
[![Documentation](https://img.shields.io/badge/Mkdocs-Documentation-blue?style=flat&logo=MaterialForMkDocs&logoColor=white)](https://thewebscraping.github.io/tls-requests/)

TLS Requests is a powerful Python library for secure HTTP requests, offering browser-like TLS fingerprinting, anti-bot page bypass, and high performance.

* * *

**Installation**
----------------

To install the library, you can choose between two methods:

#### **1\. Install via PyPI:**

```shell
pip install wrapper-tls-requests
```

#### **2\. Install via GitHub Repository:**

```shell
pip install git+https://github.com/thewebscraping/tls-requests.git
```

**Quick Start**
---------------

Start using TLS Requests with just a few lines of code:

```pycon
>>> import tls_requests
>>> r = tls_requests.get("https://httpbin.org/get")
>>> r
<Response [200 OK]>
>>> r.status_code
200
```

**Introduction**
----------------

**TLS Requests** is a cutting-edge HTTP client for Python, offering a feature-rich,
highly configurable alternative to the popular [`requests`](https://github.com/psf/requests) library.

Built on top of [`tls-client`](https://github.com/bogdanfinn/tls-client),
it combines ease of use with advanced functionality for secure networking.

**Acknowledgment**: A big thank you to all contributors for their support!

### **Key Benefits**

*   **Bypass TLS Fingerprinting:** Mimic browser-like behaviors to navigate sophisticated anti-bot systems.
*   **Customizable TLS Clients:** Select specific TLS fingerprints to meet your needs.
*   **Ideal for Developers:** Build scrapers, API clients, or other custom networking tools effortlessly.


**Why Use TLS Requests?**
-------------------------

Modern websites increasingly use **TLS Fingerprinting** and anti-bot tools like Cloudflare Bot Fight Mode to block web crawlers.

**TLS Requests** bypass these obstacles by mimicking browser-like TLS behaviors,
making it easy to scrape data or interact with websites that use sophisticated anti-bot measures.

### Unlocking Cloudflare Bot Fight Mode
![coingecko.png](https://raw.githubusercontent.com/thewebscraping/tls-requests/refs/heads/main/docs/static/coingecko.png)

**Example Code:**

```pycon
>>> import tls_requests
>>> r = tls_requests.get('https://www.coingecko.com/')
>>> r
<Response [200]>
```

**Key Features**
----------------

### **Enhanced Capabilities**

*   **Browser-like TLS Fingerprinting**: Enables secure and reliable browser-mimicking connections.
*   **High-Performance Backend**: Built on a Go-based HTTP backend for speed and efficiency.
*   **Synchronous & Asynchronous Support**: Seamlessly switch between synchronous and asynchronous requests.
*   **Protocol Support**: Fully compatible with HTTP/1.1 and HTTP/2.
*   **Strict Timeouts**: Reliable timeout management for precise control over request durations.

### **Additional Features**

*   **Internationalized Domain & URL Support**: Handles non-ASCII URLs effortlessly.
*   **Cookie Management**: Ensures session-based cookie persistence.
*   **Authentication**: Native support for Basic and Function authentication.
*   **Content Decoding**: Automatic handling of gzip and brotli-encoded responses.
*   **Hooks**: Perfect for logging, monitoring, tracing, or pre/post-processing requests and responses.
*   **Unicode Support**: Effortlessly process Unicode response bodies.
*   **File Uploads**: Simplified multipart file upload support.
*   **Proxy Configuration**: Supports Socks5, HTTP, and HTTPS proxies for enhanced privacy.


**Documentation**
-----------------

Explore the full capabilities of TLS Requests in the documentation:

*   **[Quickstart Guide](https://thewebscraping.github.io/tls-requests/quickstart/)**: A beginner-friendly guide.
*   **[Advanced Topics](https://thewebscraping.github.io/tls-requests/advanced/client/)**: Learn to leverage specialized features.
*   **[Async Support](https://thewebscraping.github.io/tls-requests/advanced/async_client/)**: Handle high-concurrency scenarios.
*   **Custom TLS Configurations**:
    *   **[Wrapper TLS Client](https://thewebscraping.github.io/tls-requests/tls/)**
    *   **[TLS Client Profiles](https://thewebscraping.github.io/tls-requests/tls/profiles/)**
    *   **[Custom TLS Configurations](https://thewebscraping.github.io/tls-requests/tls/configuration/)**


Read the documentation: [**thewebscraping.github.io/tls-requests/**](https://thewebscraping.github.io/tls-requests/)

**Report Issues**
-----------------

Found a bug? Please [open an issue](https://github.com/thewebscraping/tls-requests/issues/).

By reporting an issue you help improve the project.

**Credits**
-----------------

Special thanks to [bogdanfinn](https://github.com/bogdanfinn/) for creating the awesome [tls-client](https://github.com/bogdanfinn/tls-client).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thewebscraping/tls-requests",
    "name": "wrapper-tls-requests",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Tu Pham",
    "author_email": "thetwofarm@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/72/7a/c6f64cb86bd32b3285d260d53133c57704d56009cd2362c9838e6aac4e27/wrapper_tls_requests-1.1.1.tar.gz",
    "platform": null,
    "description": "# TLS Requests\n\n[![GitHub License](https://img.shields.io/github/license/thewebscraping/tls-requests)](https://github.com/thewebscraping/tls-requests/blob/main/LICENSE)\n[![CI](https://github.com/thewebscraping/tls-requests/actions/workflows/ci.yml/badge.svg)](https://github.com/thewebscraping/tls-requests/actions/workflows/ci.yml)\n[![PyPI - Version](https://img.shields.io/pypi/v/wrapper-tls-requests)](https://pypi.org/project/wrapper-tls-requests/)\n![Python Version](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue?style=flat)\n![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)\n\n[![](https://img.shields.io/badge/Pytest-Linux%20%7C%20MacOS%20%7C%20Windows-blue?style=flat&logo=pytest&logoColor=white)](https://github.com/thewebscraping/tls-requests)\n[![Documentation](https://img.shields.io/badge/Mkdocs-Documentation-blue?style=flat&logo=MaterialForMkDocs&logoColor=white)](https://thewebscraping.github.io/tls-requests/)\n\nTLS Requests is a powerful Python library for secure HTTP requests, offering browser-like TLS fingerprinting, anti-bot page bypass, and high performance.\n\n* * *\n\n**Installation**\n----------------\n\nTo install the library, you can choose between two methods:\n\n#### **1\\. Install via PyPI:**\n\n```shell\npip install wrapper-tls-requests\n```\n\n#### **2\\. Install via GitHub Repository:**\n\n```shell\npip install git+https://github.com/thewebscraping/tls-requests.git\n```\n\n**Quick Start**\n---------------\n\nStart using TLS Requests with just a few lines of code:\n\n```pycon\n>>> import tls_requests\n>>> r = tls_requests.get(\"https://httpbin.org/get\")\n>>> r\n<Response [200 OK]>\n>>> r.status_code\n200\n```\n\n**Introduction**\n----------------\n\n**TLS Requests** is a cutting-edge HTTP client for Python, offering a feature-rich,\nhighly configurable alternative to the popular [`requests`](https://github.com/psf/requests) library.\n\nBuilt on top of [`tls-client`](https://github.com/bogdanfinn/tls-client),\nit combines ease of use with advanced functionality for secure networking.\n\n**Acknowledgment**: A big thank you to all contributors for their support!\n\n### **Key Benefits**\n\n*   **Bypass TLS Fingerprinting:** Mimic browser-like behaviors to navigate sophisticated anti-bot systems.\n*   **Customizable TLS Clients:** Select specific TLS fingerprints to meet your needs.\n*   **Ideal for Developers:** Build scrapers, API clients, or other custom networking tools effortlessly.\n\n\n**Why Use TLS Requests?**\n-------------------------\n\nModern websites increasingly use **TLS Fingerprinting** and anti-bot tools like Cloudflare Bot Fight Mode to block web crawlers.\n\n**TLS Requests** bypass these obstacles by mimicking browser-like TLS behaviors,\nmaking it easy to scrape data or interact with websites that use sophisticated anti-bot measures.\n\n### Unlocking Cloudflare Bot Fight Mode\n![coingecko.png](https://raw.githubusercontent.com/thewebscraping/tls-requests/refs/heads/main/docs/static/coingecko.png)\n\n**Example Code:**\n\n```pycon\n>>> import tls_requests\n>>> r = tls_requests.get('https://www.coingecko.com/')\n>>> r\n<Response [200]>\n```\n\n**Key Features**\n----------------\n\n### **Enhanced Capabilities**\n\n*   **Browser-like TLS Fingerprinting**: Enables secure and reliable browser-mimicking connections.\n*   **High-Performance Backend**: Built on a Go-based HTTP backend for speed and efficiency.\n*   **Synchronous & Asynchronous Support**: Seamlessly switch between synchronous and asynchronous requests.\n*   **Protocol Support**: Fully compatible with HTTP/1.1 and HTTP/2.\n*   **Strict Timeouts**: Reliable timeout management for precise control over request durations.\n\n### **Additional Features**\n\n*   **Internationalized Domain & URL Support**: Handles non-ASCII URLs effortlessly.\n*   **Cookie Management**: Ensures session-based cookie persistence.\n*   **Authentication**: Native support for Basic and Function authentication.\n*   **Content Decoding**: Automatic handling of gzip and brotli-encoded responses.\n*   **Hooks**: Perfect for logging, monitoring, tracing, or pre/post-processing requests and responses.\n*   **Unicode Support**: Effortlessly process Unicode response bodies.\n*   **File Uploads**: Simplified multipart file upload support.\n*   **Proxy Configuration**: Supports Socks5, HTTP, and HTTPS proxies for enhanced privacy.\n\n\n**Documentation**\n-----------------\n\nExplore the full capabilities of TLS Requests in the documentation:\n\n*   **[Quickstart Guide](https://thewebscraping.github.io/tls-requests/quickstart/)**: A beginner-friendly guide.\n*   **[Advanced Topics](https://thewebscraping.github.io/tls-requests/advanced/client/)**: Learn to leverage specialized features.\n*   **[Async Support](https://thewebscraping.github.io/tls-requests/advanced/async_client/)**: Handle high-concurrency scenarios.\n*   **Custom TLS Configurations**:\n    *   **[Wrapper TLS Client](https://thewebscraping.github.io/tls-requests/tls/)**\n    *   **[TLS Client Profiles](https://thewebscraping.github.io/tls-requests/tls/profiles/)**\n    *   **[Custom TLS Configurations](https://thewebscraping.github.io/tls-requests/tls/configuration/)**\n\n\nRead the documentation: [**thewebscraping.github.io/tls-requests/**](https://thewebscraping.github.io/tls-requests/)\n\n**Report Issues**\n-----------------\n\nFound a bug? Please [open an issue](https://github.com/thewebscraping/tls-requests/issues/).\n\nBy reporting an issue you help improve the project.\n\n**Credits**\n-----------------\n\nSpecial thanks to [bogdanfinn](https://github.com/bogdanfinn/) for creating the awesome [tls-client](https://github.com/bogdanfinn/tls-client).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A powerful and lightweight Python library for making secure and reliable HTTP/TLS Fingerprint requests.",
    "version": "1.1.1",
    "project_urls": {
        "Changelog": "https://github.com/thewebscraping/tls-requests/blob/main/CHANGELOG.md",
        "Documentation": "https://thewebscraping.github.io/tls-requests/",
        "Homepage": "https://github.com/thewebscraping/tls-requests",
        "Source": "https://github.com/thewebscraping/tls-requests"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "326bc6fafdb51310d81261671bec09f8c0f552ef3711dbf64a73edf9a4bf1ba2",
                "md5": "75e9a741598c3e81b77d3be462ef2203",
                "sha256": "25c4b5040fae404478c966c348597f377c1a7aa1eac63eee87739f88ad899e97"
            },
            "downloads": -1,
            "filename": "wrapper_tls_requests-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75e9a741598c3e81b77d3be462ef2203",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 49255,
            "upload_time": "2025-02-15T04:38:30",
            "upload_time_iso_8601": "2025-02-15T04:38:30.476456Z",
            "url": "https://files.pythonhosted.org/packages/32/6b/c6fafdb51310d81261671bec09f8c0f552ef3711dbf64a73edf9a4bf1ba2/wrapper_tls_requests-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "727ac6f64cb86bd32b3285d260d53133c57704d56009cd2362c9838e6aac4e27",
                "md5": "0c354f4807dd2cf44731b4f43051bd53",
                "sha256": "f599e304a2f8959865c279244534fb4b70089e30e124335521e97412253ba888"
            },
            "downloads": -1,
            "filename": "wrapper_tls_requests-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0c354f4807dd2cf44731b4f43051bd53",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 43373,
            "upload_time": "2025-02-15T04:38:33",
            "upload_time_iso_8601": "2025-02-15T04:38:33.323159Z",
            "url": "https://files.pythonhosted.org/packages/72/7a/c6f64cb86bd32b3285d260d53133c57704d56009cd2362c9838e6aac4e27/wrapper_tls_requests-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 04:38:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thewebscraping",
    "github_project": "tls-requests",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "chardet",
            "specs": [
                [
                    "~=",
                    "5.2.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "~=",
                    "4.67.1"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "~=",
                    "3.10"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "wrapper-tls-requests"
}
        
Elapsed time: 0.37507s