Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Python >= 3.10 Downloads CI

🪞 PRIMP 🐍

HTTP client that can impersonate web browsers

📦 Installation

pip install -U primp

🔧 Building from Source

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

import primp

client = primp.Client(impersonate="chrome_146")
resp = client.get("https://tls.peet.ws/api/all")
print(resp.text)

Async API

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 directory.

📊 Benchmark

🎭 Browser profiles

Browser Profiles
Chrome chrome_144, chrome_145, chrome_146, chrome
Safari safari_18.5, safari_26, safari_26.3, safari
Edge edge_144, edge_145, edge_146, edge
Firefox firefox_140, firefox_146, firefox_147, firefox_148, firefox
Opera opera_126, opera_127, opera_128, opera_129, opera
Random random

OS: android, ios, linux, macos, windows, random

📖 Documentation


Disclaimer

This tool is for educational purposes only. Use it at your own risk.