Releases: deedy5/primp
v1.2.3
v1.2.2
What's Changed
- fix(tls): GREASE improvements, Firefox/Chrome key_share fixes, ECH payload fix by @deedy5 in #135
- style+test: modernize Python type stubs & expand test coverage by @deedy5 in #136
- feat[py]: add timeouts, base_url, cookies, follow_redirects; unify Response types by @deedy5 in #137
Full Changelog: v1.2.1...v1.2.2
v1.2.1
v1.2.0
What's new in v1.2.0
-
Impersonation:
ChromeV146,EdgeV146,OperaV128/V129,SafariV26.3,FirefoxV147/V148. Random selection support (Impersonate::Chrome,::Random, etc). -
HTTP/2 fingerprinting: Custom header ordering, initial stream ID config, simplified priority settings.
-
TLS: Fixed Firefox cipher suite order, added
status_request_v2for Safari, expanded Firefox named groups. -
Python bindings:
__version__export, improved cookie/URL handling. -
Cleanup: Removed large amount of unused tests and fixtures.
-
MSRV: 1.84, license MIT, workspace resolver 3.
v1.1.3
v1.0.0
Release v1.0.0
🏗️ Custom Crates Stack
Built on custom forked crates providing full control over browser impersonation and TLS fingerprinting:
| Crate | Description | Key Components |
|---|---|---|
| primp-reqwest | HTTP client with impersonation support | Client builder, request/response handling, multipart, proxy configuration |
| primp-h2 | HTTP/2 protocol implementation | Frame handling, HPACK encoding, stream management, flow control |
| primp-hyper | HTTP client/server library | HTTP/1.1 & HTTP/2 support, body handling, connection pooling |
| primp-hyper-util | Hyper utilities | Legacy client, pool management, Tokio runtime integration |
| primp-rustls | TLS implementation with fingerprinting | TLS 1.2/1.3, certificate verification, JA3/JA4 fingerprinting |
🎭 Impersonate Profiles
Browser Profiles
| Browser | Profiles | Default |
|---|---|---|
| 🌐 Chrome | chrome_144, chrome_145 |
chrome_144 |
| 🧭 Safari | safari_18.5, safari_26 |
safari_26 |
| 🔷 Edge | edge_144, edge_145 |
edge_144 |
| 🦊 Firefox | firefox_140, firefox_146 |
firefox_146 |
| ⭕ Opera | opera_126, opera_127 |
opera_126 |
| 🎲 Random | random |
- |
OS Impersonation
| OS | Value | User-Agent Impact |
|---|---|---|
| 🤖 Android | android |
Mobile Android user-agent |
| 🍎 iOS | ios |
Mobile iOS user-agent |
| 🐧 Linux | linux |
Desktop Linux user-agent |
| 🍏 macOS | macos |
Desktop macOS user-agent |
| 🪟 Windows | windows |
Desktop Windows user-agent |
| 🎲 Random | random |
Randomly selected OS |
Usage Example
import primp
# Browser impersonation
client = primp.Client(impersonate="chrome_145", impersonate_os="windows")
# Random browser/OS
client = primp.Client(impersonate="random", impersonate_os="random")⚠️ Exception Hierarchy
Comprehensive exception hierarchy mirroring Python's requests library for familiar error handling:
RequestException (base class)
├── HTTPError # HTTP 4xx/5xx status codes
├── ConnectionError # Connection-related failures
│ ├── ConnectTimeout # Connection establishment timeout
│ ├── SSLError # SSL/TLS certificate errors
│ └── ProxyError # Proxy connection errors
├── Timeout # Timeout-related failures
│ └── ReadTimeout # Data read timeout
├── RequestError # Request building/sending errors
│ ├── InvalidURL # URL format errors
│ └── InvalidHeader # Header format errors
├── BodyError # Body-related errors
│ ├── StreamConsumedError # Stream already consumed
│ └── ChunkedEncodingError # Chunked encoding errors
├── DecodeError # Decoding errors
│ └── ContentDecodingError # Content decode errors (gzip, brotli, etc.)
├── JSONError # JSON-related errors
│ ├── InvalidJSONError # Invalid JSON in request body
│ └── JSONDecodeError # JSON decode failure in response
└── TooManyRedirects # Redirect limit exceeded
🚀 Key Features
- Async Support - Native
AsyncClientwith async/await, context managers, and concurrent requests - HTML Conversion - Convert responses to Markdown, plain text, or rich text
- Response Streaming - Memory-efficient chunk streaming and line iteration
- Cookie Management - Persistent cookie store with automatic handling
- Proxy Support - HTTP, HTTPS, SOCKS5 proxies with authentication and system proxy detection
- SSL/TLS Options - Custom CA certificates, verification controls, HTTPS-only mode
📦 Requirements
Python Support
| Version | Standard | Free-threaded |
|---|---|---|
| Python 3.10 | ✅ | - |
| Python 3.11 | ✅ | - |
| Python 3.12 | ✅ | - |
| Python 3.13 | ✅ | - |
| Python 3.14 | ✅ | ✅ |
Platform Support
Linux (glibc/manylinux)
| Architecture | Runner | Notes |
|---|---|---|
| x86_64 | ubuntu-22.04 | Primary platform |
| x86 | ubuntu-22.04 | 32-bit support |
| aarch64 | ubuntu-22.04-arm | ARM64 servers |
| armv7 | ubuntu-22.04 | ARM embedded/IoT |
| s390x | ubuntu-22.04 | IBM mainframes |
| ppc64le | ubuntu-22.04 | PowerPC servers |
Linux (musllinux)
| Architecture | Runner | Notes |
|---|---|---|
| x86_64 | ubuntu-22.04 | Alpine compatible |
| x86 | ubuntu-22.04 | 32-bit Alpine |
| aarch64 | ubuntu-22.04 | ARM64 Alpine |
| armv7 | ubuntu-22.04 | ARM Alpine |
Windows
| Architecture | Runner | Notes |
|---|---|---|
| x64 | windows-latest | Primary platform |
| x86 | windows-latest | 32-bit support |
| aarch64 | windows-11-arm | ARM64 Windows |
macOS
| Architecture | Runner | Notes |
|---|---|---|
| x86_64 | macos-15-intel | Intel Macs |
| aarch64 | macos-latest | Apple Silicon (M1/M2/M3) |
📚 Documentation
Documentation Files
| File | Description |
|---|---|
docs/README.md |
Documentation index |
docs/client.md |
Sync Client usage guide |
docs/async_client.md |
AsyncClient usage guide |
docs/response.md |
Response object reference |
docs/exceptions.md |
Exception handling guide |
Example Scripts
| Example | Description |
|---|---|
examples/basic_usage.py |
GET, POST, params, headers |
examples/async_usage.py |
Async client, concurrent requests |
examples/authentication.py |
Basic auth, bearer tokens |
examples/proxy.py |
HTTP/SOCKS5 proxies |
examples/cookies.py |
Cookie management |
examples/streaming.py |
Response streaming |
examples/post_requests.py |
POST/PUT/PATCH/DELETE |
examples/error_handling.py |
Exception handling |
examples/html_conversion.py |
HTML to text conversion |
🔧 Installation
pip install -U primp📄 License
MIT License
v0.15.0
v0.14.0
v0.13.0
What's Changed
- Improve response logic by @deedy5 in #95
- Cookies logic improve by @deedy5 in #96
- feat: add chrome_133, firefox_135
Full Changelog: v0.12.1...v0.13.0
v0.12.1
What's Changed
- Typing: improve by @deedy5 in #92
- Benchmark(async): add aiohttp by @deedy5 in #94
- tests: simplify asyncclient tests
- cargo update
Full Changelog: v0.12.0...v0.12.1