HTTP client with JA3/Akamai fingerprint support for realistic browser requests.
Project description
http-fp
HTTP client with JA3/Akamai fingerprint support for realistic browser requests.
Features
- JA3 Fingerprinting: Customizable TLS fingerprints with manual extension permutation
- Akamai Fingerprinting: Browser-aware HTTP/2 fingerprint generation
- Realistic User-Agents: Pre-defined profiles for Chrome, Brave, Edge, and Safari
- Proxy Support: Flexible proxy configuration with environment variable support
- Retry Logic: Configurable exponential backoff retry mechanism
- Session Management: Cookie persistence and session state import/export
- Platform Support: Windows, macOS, iOS, and Android profiles
Installation
pip install http-fp
Quick Start
from http_client import HTTPClient
# Basic usage
client = HTTPClient()
response = client.get("https://httpbin.org/headers")
print(response.json())
Configuration
Proxy Configuration
from http_client import HTTPClient, ProxyConfig
# From environment variables (HTTP_PROXY, HTTPS_PROXY)
client = HTTPClient()
# Manual configuration
proxy = ProxyConfig(url="http://proxy.example.com:8080")
client = HTTPClient(proxy_config=proxy)
# With authentication
proxy = ProxyConfig(
url="http://proxy.example.com:8080",
username="user",
password="pass"
)
client = HTTPClient(proxy_config=proxy)
Browser Fingerprinting
from http_client import HTTPClient
# Force specific platform and browser
client = HTTPClient(
platform="Windows", # Windows, macOS, iOS, Android
browser="chrome", # chrome, brave, edge, safari
browser_version=143,
)
# Randomize fingerprint for each request
client = HTTPClient(randomize_per_request=True)
# Manually randomize fingerprint
client.randomize()
Retry Configuration
from http_client import HTTPClient, RetryConfig
retry_config = RetryConfig(
max_retries=5,
backoff_factor=1.0,
retry_on_status=[429, 500, 502, 503, 504],
)
client = HTTPClient(retry_config=retry_config)
# Or configure after initialization
client.set_retry_config(max_retries=3)
# Use retry methods
response = client.get_with_retry("https://example.com")
Session Management
from http_client import HTTPClient
client = HTTPClient()
# Save cookies
client.session_manager.save_cookies("cookies.json")
# Load cookies
client.session_manager.load_cookies("cookies.json")
# Export full session state
client.session_manager.export_session("session_state.json")
# Import session state
client.session_manager.import_session("session_state.json")
# Clear cookies
client.session_manager.clear_cookies()
# Access cookies
cookies = client.session_manager.get_cookie_dict()
Fingerprint Information
View current fingerprint details:
client = HTTPClient()
info = client.get_fingerprint_info()
print(f"JA3: {info['ja3']}")
print(f"Akamai: {info['akamai']}")
print(f"User-Agent: {info['user_agent']}")
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
http_fp-0.1.0.tar.gz
(18.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
http_fp-0.1.0-py3-none-any.whl
(19.0 kB
view details)
File details
Details for the file http_fp-0.1.0.tar.gz.
File metadata
- Download URL: http_fp-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a4d9f564bcf5e8d40ea0d656888d910eec6cac3fead0adecbbbeb21c7490ebe
|
|
| MD5 |
ba2b78c7a8fdcc17dd58655ad66f4af3
|
|
| BLAKE2b-256 |
8d98c0eb18e064ec43bd452e9d8849c6661a24d407930b3b646ddee78317d072
|
File details
Details for the file http_fp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: http_fp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c069d2e3a76fbf4fdf1de0c908fb30f9ceb54009d00fa7979c94cfbcf025180c
|
|
| MD5 |
3e1ace392c5b7e8c32945adb626533d3
|
|
| BLAKE2b-256 |
e8fe00b5b62cf54017de43e467db9a2bd71471428b0d8ac0acd71768a9d7e7f1
|