Metadata-Version: 2.3
Name: captchaly
Version: 1.1.1
Summary: Python SDK for Captchaly.com, a CAPTCHA solver for large-scale automation and scraping.
Author: Captchaly
Author-email: Captchaly <admin@captchaly.com>
License: Copyright 2026 Captchaly
         
         Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Requires-Dist: httpx[brotli,http2]>=0.28.1
Requires-Dist: synchronicity>=0.12.5
Requires-Python: >=3.14
Project-URL: Homepage, https://captchaly.com
Project-URL: Repository, https://github.com/captchaly/captchaly-python
Description-Content-Type: text/markdown

[![Test](https://github.com/captchaly/captchaly-python/actions/workflows/test.yaml/badge.svg)](https://github.com/captchaly/captchaly-python/actions/workflows/test.yaml)

# Captchaly Python SDK

Official Python SDK for [Captchaly.com](https://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](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

```bash
pip install captchaly
```

## Authentication

Provide your API key in either of these ways:

1. Pass it to the client constructor
```python
from captchaly import CaptchalyClient

CaptchalyClient("your_api_key")
```
2. Set the environment variable `CAPTCHALY_APIKEY` and the client will read it automatically.


## Quick Start

### Synchronous usage

```python
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.

```python
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](LICENSE) for details.
