Skip to content

About

Advanced HTTP Library

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Python-TLS-Client

Python-TLS-Client is an advanced HTTP library based on requests and tls-client.

Installation

pip install tls-client

Examples

The syntax is inspired by requests, so its very similar and there are only very few things that are different.

Example - Preset:

import tls_client

# `client_identifier` picks the browser profile to impersonate, e.g. chrome_152, firefox_148, safari_ios_26_0 or
# okhttp4_android_13. Every supported name is listed in tls_client/settings.py; unknown names raise a ValueError.

session = tls_client.Session(
    client_identifier="chrome_152",
    random_tls_extension_order=True
)

res = session.get(
    "https://www.example.com/",
    headers={
        "key1": "value1",
    },
    proxy="http://user:password@host:port"
)

More examples:

Acknowledgements

Big shout out to Bogdanfinn for open sourcing his tls-client in Golang. Also I wanted to keep the syntax as similar as possible to requests, as most people use it and are familiar with it!

About

Advanced HTTP Library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages