Skip to content

Releases: deedy5/primp

v1.2.3

20 Apr 08:22

Choose a tag to compare

What's Changed

  • feat: rename all forked crates to unique package names by @deedy5 in #138
  • fix(primp-python): resolve parallel client initialization deadlock by @deedy5 in #142

Full Changelog: v1.2.2...v1.2.3

v1.2.2

03 Apr 06:58

Choose a tag to compare

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

30 Mar 12:04

Choose a tag to compare

What's Changed

  • feat: native OS root CAs, custom cert impersonation fix, unknown extension tolerance by @deedy5 in #133

Full Changelog: v1.2.0...v1.2.1

v1.2.0

27 Mar 06:33

Choose a tag to compare

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_v2 for 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

11 Mar 06:13

Choose a tag to compare

What's Changed

  • Fix security vulnerabilities

v1.0.0

13 Feb 15:23

Choose a tag to compare

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 AsyncClient with 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

17 Apr 11:30

Choose a tag to compare

What's Changed

  • Implement Client(impersonate="random", impersonate_os="random") by @deedy5 in #106
  • Implement Client.headers_update() by @deedy5 in #107

Full Changelog: v0.14.0...v0.15.0

v0.14.0

23 Feb 21:28

Choose a tag to compare

What's Changed

  • Implement response.stream() by @deedy5 in #99
  • Remove Client.cookies setter and getter by @deedy5 in #100

Full Changelog: v0.13.0...v0.14.0

v0.13.0

20 Feb 10:00

Choose a tag to compare

What's Changed

Full Changelog: v0.12.1...v0.13.0

v0.12.1

11 Feb 12:32

Choose a tag to compare

What's Changed

Full Changelog: v0.12.0...v0.12.1