primp
توضیحات
HTTP client that can impersonate web browsers
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | primp-2.0.1 |
| نام | primp |
| نسخه کتابخانه | 2.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | deedy5 |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/primp/ |
| مجوز | MIT License |
 [](https://github.com/deedy5/primp/releases) [](https://pypi.org/project/primp) [](https://pepy.tech/project/primp) [](https://github.com/deedy5/primp/actions/workflows/ci.yml)
# 🪞 PRIMP 🐍
> HTTP client that can impersonate web browsers
## 📦 Installation
```bash
pip install -U primp
```
## 🔧 Building from Source
```bash
git clone https://github.com/deedy5/primp.git && cd primp/crates/primp-python
python -m venv .venv && source .venv/bin/activate
pip install maturin && maturin develop -r
```
## 🚀 Quick Start
### Sync API
```python
import primp
client = primp.Client(impersonate="chrome_146")
resp = client.get("https://tls.peet.ws/api/all")
print(resp.text)
```
### Async API
```python
import asyncio
import primp
async def main():
async with primp.AsyncClient(impersonate="chrome_146") as client:
resp = await client.get("https://tls.peet.ws/api/all")
print(resp.text)
asyncio.run(main())
```
### More examples
> See the [examples](examples/) directory.
## 📊 Benchmark

## 🎭 Browser profiles
| Browser | Profiles |
|:--------|:---------|
| Chrome | `chrome_144`, `chrome_145`, `chrome_146`, `chrome_147`, `chrome_148`, `chrome_149`, `chrome_150`, `chrome_151`, `chrome_152`, `chrome_153`, `chrome` |
| Safari | `safari_18.5`, `safari_26`, `safari_26.3`, `safari_26.4`, `safari` |
| Edge | `edge_144`, `edge_145`, `edge_146`, `edge_147`, `edge_148`, `edge_149`, `edge_150`, `edge_151`, `edge_152`, `edge_153`, `edge` |
| Firefox | `firefox_140`, `firefox_146`, `firefox_147`, `firefox_148`, `firefox_149`, `firefox_150`, `firefox_151`, `firefox` |
| Opera | `opera_126`, `opera_127`, `opera_128`, `opera_129`, `opera_130`, `opera_131`, `opera_132`, `opera_133`, `opera_134`, `opera_135`, `opera` |
| Random | `random` |
**OS:** `android`, `ios`, `linux`, `macos`, `windows`, `random`
## 📖 Documentation
- [Browser Impersonation](docs/impersonate.md) — profiles, OS, TLS/HTTP2 fingerprinting
- [Client](docs/client.md) — constructor, methods, authentication
- [AsyncClient](docs/async_client.md) — async API, concurrency
- [Response](docs/response.md) — properties, streaming
- [Exceptions](docs/exceptions.md) — error handling
____
### Disclaimer
This tool is for educational purposes only. Use it at your own risk.
نیازمندی
| مقدار | نام |
|---|---|
| xtr | certifi; |
| xtr | pytest>=8.1.1; |
| xtr | pytest-asyncio>=0.25.3; |
| ython_full_versio | typing-extensions; |
| xtr | mypy>=1.14.1; |
| xtr | ruff>=0.9.2; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl primp-2.0.1:
pip install primp.whl
نصب پکیج tar.gz primp-2.0.1:
pip install primp.tar.gz