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.
Metadata
Release files for captchaly 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| captchaly-1.2.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| captchaly-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / captchaly-1.2.0.tar.gz
| Download URL | captchaly-1.2.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21f424e94e0adf49832749a342c626910152917d5fe52aa5cdbab3f82797788a
|
|
BLAKE2b-256 checksum How to use checksums |
96a0e37e4c0833a6a12db1bde085c2443fb62fd8158f3e5291db13dd4f5a914f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / captchaly-1.2.0-py3-none-any.whl
| Download URL | captchaly-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18e598d08d14e012366c892a9ad9465bff7d02d169674c91b29e9cee5c7b1112
|
|
BLAKE2b-256 checksum How to use checksums |
40a401abc7fe4ce805b3117c2cd31591a6fe73b3e4de3ffb4ae3d1ae7b3186e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|