Metadata-Version: 2.4
Name: gatsbie
Version: 1.0.5
Summary: Official Python SDK for the Gatsbie Captcha API
Project-URL: Homepage, https://gatsbie.io
Project-URL: Documentation, https://docs.gatsbie.io
Project-URL: Repository, https://github.com/jaygatsbie/sdk-python
Author-email: Gatsbie <support@gatsbie.io>
License-Expression: MIT
Keywords: akamai,captcha,cloudflare,datadome,recaptcha,turnstile
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Gatsbie Python SDK

Official Python SDK for the [Gatsbie Captcha API](https://gatsbie.io).

## Installation

```bash
pip install gatsbie
```

## Quick Start

```python
import gatsbie

client = gatsbie.Client("gats_your_api_key")

# Solve a Turnstile challenge
response = client.solve_turnstile(
    gatsbie.TurnstileRequest(
        proxy="http://user:pass@proxy:8080",
        target_url="https://example.com",
        site_key="0x4AAAAAAABS7TtLxsNa7Z2e",
    )
)

print(response.solution.token)
```

## Supported Captcha Types

- **Datadome** - Device check and slider
- **reCAPTCHA v3** - Including enterprise
- **Akamai** - Bot management
- **Vercel** - Bot protection
- **Shape** - Antibot
- **Cloudflare Turnstile** - Turnstile challenges
- **Cloudflare WAF** - WAF challenges
- **PerimeterX** - Invisible challenges

## Error Handling

```python
try:
    response = client.solve_turnstile(request)
except gatsbie.APIError as e:
    if e.is_auth_error():
        print("Check your API key")
    elif e.is_insufficient_credits():
        print("Add more credits")
    elif e.is_solve_failed():
        print("Solve failed, try again")
```

## License

MIT
