Skip to main content

solvegate — Python SDK

Official client for the SolveGate API — clear Cloudflare Turnstile + WAF challenges and get a token back. Zero dependencies (stdlib only); wraps auth, the error envelope, 429 backoff, and async polling.

pip install solvegate
import os
from solvegate import SolveGate

sg = SolveGate(os.environ["SOLVEGATE_KEY"])  # sg_live_… or a free sg_test_… sandbox key

# Synchronous — blocks until solved (or raises on timeout):
res = sg.solve(gate="turnstile", sitekey="0x4AAAAAAAAA_target", url="https://app.example.com")
print(res.token, res.solve_ms)

# Asynchronous — return immediately, then poll:
pending = sg.solve(gate="turnstile", sitekey=sitekey, url=url, async_=True)
solved = sg.wait(pending.id)
if solved.status == "solved":
    use(solved.token)

# Retrieve any solve by id:
s = sg.retrieve("slv_8Kd2aF9")

API

Method Description
SolveGate(api_key, base_url=…, timeout=60, max_retries=3) construct a client
sg.solve(gate, sitekey, url, action=None, async_=False, proxy=None, idempotency_key=None) → Solve
sg.retrieve(id) → Solve (never billed)
sg.wait(id, interval=1.0, timeout=60.0) poll an async solve until it leaves pending

Solve has .id .status .gate .token .solve_ms .expires_at .billed. Errors raise SolveGateError with .code / .status / .billed (e.g. balance_empty, rate_limited, solve_timeout). Note async_ (trailing underscore) maps to the API's async field. You're only billed for a successful solve.

Metadata

Release files for solvegate 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solvegate 1.0.0
File Size Uploaded Provenance Actions
solvegate-1.0.0.tar.gz 4.5 kB Without provenance Details for solvegate-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solvegate 1.0.0
File Interpreter ABI Platform Actions
solvegate-1.0.0-py3-none-any.whl Python 3 none any Details for solvegate-1.0.0-py3-none-any.whl

Total release size: 9.5 kB

Release files / solvegate-1.0.0.tar.gz

Download URL solvegate-1.0.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ccd3ca6e1f264f979108b1ab3dc6c160816a9b357fb06f8c71a152ca107e4889
BLAKE2b-256 checksum
How to use checksums
e755f3c98583aabc1131e217fe98d8b86e517a510e51cd4243424483d08cb93d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / solvegate-1.0.0-py3-none-any.whl

Download URL solvegate-1.0.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f54771864696c792039c995b6c0ecacf33e4c844dae522e39dab9ec059b907f
BLAKE2b-256 checksum
How to use checksums
2a2e9b25ad852e16d57ee2aa69083eca6c88028d229f5477ef27dd9b5d1700b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for solvegate 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page