Python SDK for Captchaly.com, a CAPTCHA solver for large-scale automation and scraping.
Project description
Captchaly Python SDK
Official Python SDK for Captchaly.com.
Captchaly is the most advanced captcha solving service for enterprises. Providing large-scale automation and data scraping. Allow AI agents to bypass captchas and access the web without human intervention. Try for free at https://captchaly.com.
Features
- Support both sync and async usage.
- Fully typed.
- Automatic retry.
Requirements
This SDK is tested with Python 3.14. It may work with earlier versions, but it is not guaranteed.
Installation
pip install captchaly
Authentication
Provide your API key in either of these ways:
- Pass it to the client constructor
from captchaly import CaptchalyClient
CaptchalyClient("your_api_key")
- Set the environment variable
CAPTCHALY_APIKEYand the client will read it automatically.
Quick Start
Synchronous usage
from captchaly import CaptchalyClient
url = "demo.captchaly.com"
sitekey = "6Le0FEMtAAAAAK9IgmSqaJfPb3E-9fI9xMp1nDfk"
with CaptchalyClient("your_api_key") as client:
account = client.account()
print(account.email, account.balance)
recaptcha = client.recaptcha_v2(url, sitekey)
print(recaptcha.token)
Asynchronous usage
In async code, use async keywords (await, async with, async for, ...) and call the .aio(...) variant of each method.
import asyncio
from captchaly import CaptchalyClient
url = "demo.captchaly.com"
sitekey = "0x4AAAAAAA4nzhwwpeesSPI2"
async def main():
async with CaptchalyClient("your_api_key") as client:
account = await client.account.aio()
print(account.email, account.balance)
turnstile = await client.turnstile.aio(url, sitekey)
print(turnstile.token)
TODO / Roadmap
- Playwright integration
- Puppeteer integration
Contributing
This repository does not normally accept merge requests. You are welcome to open issues and requests for new features.
License
MIT License. See LICENSE for details.
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
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
File details
Details for the file captchaly-1.1.1.tar.gz.
File metadata
- Download URL: captchaly-1.1.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3d1178dc0379dc3f5fd8b7046800fcfaa080731186a4cdb74fc3790393bb08a
|
|
| MD5 |
c6d54b29fa70905d2fb319eb97f8d62c
|
|
| BLAKE2b-256 |
818778d13a73ab69444ae11c2733b043be8c490b03d01200d2710b8e256e9958
|
File details
Details for the file captchaly-1.1.1-py3-none-any.whl.
File metadata
- Download URL: captchaly-1.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0e4b86791e322535b97a52f4fea6fe3da592f4be4c77d01e2dd75f1faf29bd
|
|
| MD5 |
d521ec82993dbc5e2f5afaf7ed8f9803
|
|
| BLAKE2b-256 |
e5c1ff6938a2d5cddccd89ed7070cae5443534c5f197fa48909c89a26bd8c515
|