Metadata-Version: 2.4
Name: lucky_tls
Version: 0.33.0
Summary: TLS and HTTPS requests for Python; noncommercial binary use only
License-Expression: LicenseRef-lucky-tls-Noncommercial
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.txt
Requires-Dist: certifi>=2024.2.2
Requires-Dist: h2<5,>=4.3
Requires-Dist: h11<1,>=0.16
Dynamic: license-file
Dynamic: requires-python

# lucky_tls

供 Python 调用的 TLS/HTTPS 请求库，支持同步、异步请求及 Chrome153/156 配置。

**仅限个人和非商业用途，不允许商用。** 采用专有二进制使用许可，不是开源软件；仅授予安装、运行和调用接口的权利，不授予修改、再分发、转售或源码获取权。完整条款随安装包提供，第三方组件适用各自的许可证。

## 安装

发布到 PyPI 后，在具有匹配二进制 wheel 的 Python 环境中执行：

```sh
python -m pip install lucky_tls
```

PyPI 将下划线与连字符归一化，`lucky_tls` 和 `lucky-tls` 指向同一个项目。
仅提供已构建平台的二进制 wheel，不提供源码安装包。没有匹配 wheel 的环境无法直接安装。
首批支持 Windows x64、标准 CPython 3.11、3.12、3.13 和 3.14；不支持 free-threaded Python。

## 使用

```python
from lucky_tls import Session

with Session(profile="chrome156") as session:
    response = session.get("https://example.com/", timeout=10)
    print(response.status_code)
    print(response.text)
```

请求支持 `params`、`json`、`data`、`cookies` 和逐请求 `timeout`；默认跟随重定向，可通过 `allow_redirects=False` 关闭。使用 `AsyncSession` 发起异步请求。默认 profile 为 `chrome153`，可显式选择 `chrome156`。

接口类型提示随 wheel 提供。浏览器配置的字段匹配不代表完整浏览器等价。
