Skip to main content

High-performance CPython HTTP client with browser impersonation.

Project description

Gakido

High-performance CPython HTTP client focused on browser impersonation, anti-bot evasion, and speed.

Features

  • Browser profiles (Chrome/Firefox/Safari/Edge/Tor aliases)
  • JA3/Akamai-style TLS overrides (tls_configuration_options, ExtraFingerprints)
  • HTTP/1.1, HTTP/2, and HTTP/3 (QUIC) support
  • HTTP/3 optimized for Cloudflare and CDN targets
  • Automatic compression (gzip, deflate, brotli) with profile-based Accept-Encoding
  • Sync + async clients, connection pooling
  • Multipart uploads
  • Minimal WebSocket client
  • Optional native HTTP fast-path (gakido_core, HTTP only)
  • 96 browser profiles (24 base + 72 aliases) for Chrome, Firefox, Safari, Edge, Opera, Brave, Vivaldi, Tor
  • Antibot benchmark for testing impersonation against detection systems

Install

pip:

pip install gakido
pip install gakido[h3]     # with HTTP/3 support
pip install gakido[dev]    # development dependencies

uv:

uv add gakido
uv add gakido[h3]          # with HTTP/3 support
uv add gakido[dev]         # development dependencies

Quick start (sync)

from gakido import Client

c = Client(impersonate="chrome_120")  # force_http1 defaults to True
r = c.get("https://example.com")
print(r.status_code, r.text[:200])

Async

import asyncio
from gakido.aio import AsyncClient

async def main():
    async with AsyncClient(impersonate="chrome_120") as c:
        r = await c.get("https://httpbin.org/get")
        print(r.status_code)

asyncio.run(main())

Multipart upload

files = {"file": ("test.txt", b"hello", "text/plain")}
data = {"foo": "bar"}
with Client() as c:
    r = c.post("https://httpbin.org/post", data=data, files=files)
    print(r.json())

TLS overrides (JA3-like)

from gakido import Client, ExtraFingerprints

ja3_str = "771,4866-4867-4865-49196,0-11-10,29,0"
extra_fp = ExtraFingerprints(alpn=["http/1.1"])

c = Client(
    impersonate="chrome_120",
    tls_configuration_options={"ja3_str": ja3_str, "extra_fp": extra_fp},
)
r = c.get("https://tls.browserleaks.com/json")
print(r.json().get("ja3_hash"))

WebSocket

from gakido.websocket import WebSocket

ws = WebSocket.connect("echo.websocket.events", 443, "/", headers=[], tls=True)
ws.send_text("hello")
op, payload = ws.recv()
print(payload.decode(errors="ignore"))
ws.close()

Proxies

gakido supports HTTP, SOCKS5, and SOCKS5H proxies for both sync and async clients.

from gakido import Client, AsyncClient

# Sync client with HTTP or SOCKS5 proxy
c = Client()
r = c.get("http://httpbin.org/ip", proxy="http://127.0.0.1:8080")
r = c.get("http://httpbin.org/ip", proxy="socks5://127.0.0.1:1080")
r = c.get("http://httpbin.org/ip", proxy="socks5h://user:pass@127.0.0.1:1080")  # proxy resolves hostname
print(r.text)

# Async client with proxy pool
async_client = AsyncClient(proxy_pool=[
    "http://proxy1:8080",
    "socks5://proxy2:1080",
    "socks5h://user:pass@proxy3:1080",
])
r = await async_client.get("http://httpbin.org/ip")
print(r.text)

Retry with Exponential Backoff

gakido supports configurable retry with exponential backoff for both sync and async clients.

from gakido import Client, AsyncClient
import time

# Sync client with retry
client = Client(
    max_retries=3,           # Up to 3 retry attempts (4 total attempts)
    retry_base_delay=0.5,    # Start with 0.5s delay
    retry_max_delay=30.0,    # Cap delay at 30s
    retry_jitter=True,       # Add random jitter to avoid thundering herd
)
try:
    resp = client.get("http://flaky.example.com")
except Exception as e:
    print(f"Failed after retries: {e}")

# Async client with retry
async_client = AsyncClient(
    max_retries=2,
    retry_base_delay=1.0,
    retry_jitter=False,  # Predictable delays for testing
)
resp = await async_client.get("http://api.example.com")

# Retryable status codes (by default): 408, 429, 500, 502, 503, 504, 507, 511
# Retryable exceptions (by default): ConnectionError, TimeoutError, OSError

See [Retry Documentation](docs/retry.md) for detailed information about retry options and best practices.

HTTP/3 (QUIC) for Cloudflare/CDN

import asyncio
from gakido import AsyncClient, is_http3_available

async def main():
    print(f"HTTP/3 available: {is_http3_available()}")

    async with AsyncClient(
        impersonate="chrome_120",
        http3=True,           # Enable HTTP/3
        http3_fallback=True,  # Fall back to H1/H2 if H3 fails
    ) as c:
        r = await c.get("https://cloudflare.com/cdn-cgi/trace")
        print(f"HTTP/{r.http_version}: {r.status_code}")

asyncio.run(main())

Notes

  • force_http1=True by default for compatibility; set force_http1=False to allow ALPN h2.
  • http3=True enables HTTP/3 (QUIC) for compatible targets (requires pip install gakido[h3]).
  • auto_decompress=True by default: uses profile's Accept-Encoding (gzip, deflate, br) and auto-decompresses responses.
  • Set auto_decompress=False to disable compression and receive raw responses.
  • Native core (gakido_core) is HTTP-only; HTTPS still uses the Python path.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gakido-0.1.1.tar.gz (84.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gakido-0.1.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (79.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (60.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

gakido-0.1.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (79.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (60.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

gakido-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (76.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gakido-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (60.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file gakido-0.1.1.tar.gz.

File metadata

  • Download URL: gakido-0.1.1.tar.gz
  • Upload date:
  • Size: 84.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gakido-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d7420bef7bd36c3879b029f84dbf4f7ee0b46e03a958e7cd0a08ab85530b5f66
MD5 22e4fd11f2ab38f1281f77e384cdea92
BLAKE2b-256 270463ca5b3502f0320bcd75870d01582f1d556346aa93d64744a3bbb789c151

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1520ac63e6766bfc5904864b0d84291b80ffcd3aa212bef09d18eea00bbe2a6b
MD5 64cd137bca20eb9d7f3f3ccf688416ff
BLAKE2b-256 a9b1a1d42d56dcc77f93a8e9f9854042a18e81ae525c27e8161902debcdc4908

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 428a69a6ef9995f78256bf0b31d599c748bee6a3c0d40798ab2e6adf59d2f599
MD5 b6d2fdaccd6d7e7aeca720536b033747
BLAKE2b-256 bd58f8c60557b89dd0d6dbdc885eb726145220e0b9bab8346178e15dda8847d6

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 600f4370a9bf581784279ecf73114b633c82baba2760802722313d20c47f42e9
MD5 1a21c416c0f2d83e8c5c0034908c5fd9
BLAKE2b-256 fdac2a9fba697e6d323e1c4cadc2b1cec5871c51896308d2cf29c40dac793f1e

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07b14b5659b96c6afb485a4cb371cd1e0ccab10946fc3e439ea78af1571b96fd
MD5 c0ee4789ff7a01910654dde6a3a3861a
BLAKE2b-256 daad77dbfea8129ed8819206e1d70bd47945feb46a55e6a8dd0b66c8ac51fc88

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 69be7aeb56955beb796daa36489a5f7dde09098f335a156a5cbe4c07132032b1
MD5 0fbc8e62366f0243c4f49da350aa411d
BLAKE2b-256 38cfd05317785c75bb53acf129a6e80c6bfca2c8c40cb81840a8236d096a0cd4

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfe793f9c5d23ccdcc6b0fc6c0aab78cf4301ab7ad0e39798cfc100e05b65dd9
MD5 9b4cea4cb95e4840039aaca484875acb
BLAKE2b-256 1722b8bccc56f9841539c02d2d9a190b4b4e1b39e946c386880072556380841d

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6aaa63fa365d93911863bbda1c734696cc2e92059f4445a39588655a63abaa6d
MD5 992ad379d5d56af1ffbe1f69a4bc64bb
BLAKE2b-256 98b5724151e01dab6b81f79e6c844976f453ece59882592e2d4d37b7be1dbe61

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4de9d5b7f5692ef92c904fb02e2129660690e24ad991610177f3c5eb59864551
MD5 d80b4b160a2b695bf357d010be166d05
BLAKE2b-256 54473dcf8a5373a4adb997c04b2278e06a4189d8fd2ed73d8d41533416a3ec74

See more details on using hashes here.

File details

Details for the file gakido-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gakido-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86e5f569b013e31e4f7b319f0de9abbee487d97c88e321cae64d1b536844ad54
MD5 187f347005bff7bc8bcf300c84b5a390
BLAKE2b-256 07eeb9146290742af4c088390f6d593ccc6ca65d9f15504afa28b1bae80c3d8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page