Metadata-Version: 2.4
Name: solvethree-sdk
Version: 0.1.0
Summary: Typed Python client for the solvethree task API
Author-email: solvethree <support@solvethree.com>
License-Expression: MIT
Project-URL: Homepage, https://solvethree.com/integrations
Project-URL: Documentation, https://solvethree.com/docs
Keywords: solvethree,recaptcha,kasada,tmpt
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# solvethree Python SDK

Official typed, synchronous Python 3.10+ client for reCAPTCHA Enterprise v3, Kasada and Ticketmaster TMPT. Uses the Python standard library with no runtime dependencies. Contact: support@solvethree.com.

```sh
python -m pip install https://solvethree.com/downloads/solvethree_sdk-0.1.0-py3-none-any.whl
```

This release is distributed directly by solvethree.com. PyPI registry publication is pending. Release hashes: https://solvethree.com/downloads/manifest.json.

```python
import os
from solvethree import Solvethree, SolvethreeError, TaskFailedError

client = Solvethree(os.environ['SOLVETHREE_API_KEY'])
task = client.create_task({
    'site': 'example.com',  # replace with your configured site
    'action': 'login',
    'proxy': os.environ['SOLVETHREE_PROXY'],
    'requestId': 'one-logical-task-001',
}, wait_ms=0)
result = client.get_task(task['id'], wait_ms=15000)
# pending/solving: bounded polling; failed: stop and inspect errorCode.
# ready: use solution privately, preserving userAgent/secChUa and proxy.
```

reCAPTCHA requires an active workspace site profile. Task creation does not configure one. `client.solve(task, timeout=180, poll_interval=1)` performs one creation and bounded polling. It returns a ready result or raises `TaskFailedError`/`SolvethreeError`; recovery IDs are available as `request_id` and `task_id`. `ApiError` provides `status` and `retry_after` (seconds).

No automatic POST retries. Keep `requestId` stable for a logical task and use identical inputs to recover a creation timeout. An omitted ID is generated and included in creation errors. Polling honors numeric Retry-After for transient failures within the deadline. Redirects are refused.

For `proxyCandidates`, `successful_proxy(original_task, ready_result)` maps the one-based `solution['egressAttempts']` to the original array. It returns `None` if the index is missing or invalid; stop rather than guessing. For a single proxy it returns that original proxy. Preserve the selected egress and returned browser identity when submitting a solution.

Kasada: `type='KasadaTask'`, exact HTTPS `www.ticketmaster.com` URL, one proxy input; output `solution['headers']`. TMPT: `type='TicketmasterTmptTask'`, exact supported URL and `action='Event'` or `'Login'`, one proxy input; output `solution['token']` is the raw tmpt cookie. Do not mix outputs or browser identities.

No native reCAPTCHA v2, hCaptcha or Turnstile support. Readiness is not target acceptance or a guaranteed score. Failed solves are refunded. Keep keys, tokens, cookies and proxy credentials out of logs and client-side code.

Full contract and examples: https://solvethree.com/docs.md. Pricing: https://solvethree.com/pricing.
