Metadata-Version: 2.4 Name: primp Version: 1.1.3 Classifier: Programming Language :: Rust Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3.14 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires-Dist: certifi ; extra == 'dev' Requires-Dist: pytest>=8.1.1 ; extra == 'dev' Requires-Dist: pytest-asyncio>=0.25.3 ; extra == 'dev' Requires-Dist: typing-extensions ; python_full_version < '3.12' and extra == 'dev' Requires-Dist: mypy>=1.14.1 ; extra == 'dev' Requires-Dist: ruff>=0.9.2 ; extra == 'dev' Provides-Extra: dev Summary: HTTP client that can impersonate web browsers Keywords: python,request,impersonate Author: deedy5 License: MIT License Requires-Python: >=3.10 Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM Project-URL: repository, https://github.com/deedy5/primp  [](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 # Build python library using cargo cargo build -r -p primp-python # Build python library using maturin cd crates/primp-python python -m venv .venv && source .venv/bin/activate # Linux/macOS pip install maturin && maturin develop -r ``` ## 🚀 Quick Start ### Sync API ```python import primp # Create client with browser impersonation client = primp.Client(impersonate="chrome_145") # Make requests resp = client.get("https://tls.peet.ws/api/all") print(resp.status_code) # 200 print(resp.text) # Response body print(resp.json()) # Parsed JSON ``` ### Async API ```python import asyncio import primp async def main(): async with primp.AsyncClient(impersonate="chrome_145") as client: resp = await client.get("https://tls.peet.ws/api/all") print(resp.text) asyncio.run(main()) ``` ## 📊 Benchmark  ## 🎭 Browser Impersonation
| | Browser | Profiles | |:--------|:---------| | 🌐 **Chrome** | `chrome_144`, `chrome_145` | | 🧭 **Safari** | `safari_18.5`, `safari_26` | | 🔷 **Edge** | `edge_144`, `edge_145` | | 🦊 **Firefox** | `firefox_140`, `firefox_146` | | ⭕ **Opera** | `opera_126`, `opera_127` | | 🎲 **Random** | `random` | | | OS | Value | |:---|:------| | 🤖 Android | `android` | | 🍎 iOS | `ios` | | 🐧 Linux | `linux` | | 🍏 macOS | `macos` | | 🪟 Windows | `windows` | | 🎲 Random | `random` | |