Skip to content

Commit 08c829a

Browse files
committed
Update README.md
1 parent 7c873c8 commit 08c829a

1 file changed

Lines changed: 74 additions & 1 deletion

File tree

README.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ Tested on UNIX based OS.
2525

2626
The library is intended for software developers and is used to work with the [Capsolver](https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1) service API.
2727

28+
## Features
29+
- **Sync & Async Support**: Full support for both synchronous (`requests`) and asynchronous (`aiohttp`) operations.
30+
- **Type Safety**: Enums for captcha types and response statuses.
31+
- **Resilience**: Built-in retries using `tenacity`.
32+
- **Performance**: High-speed JSON serialization with `msgspec`.
33+
- **Coverage**: Supports ReCaptcha (V2/V3), Cloudflare, DataDome, GeeTest, MtCaptcha, AWS WAF, Yandex, and ImageToText.
34+
2835
## How to install?
2936

3037
We recommend using the latest version of Python. `python3-capsolver` supports Python 3.7+.
@@ -37,8 +44,74 @@ pip install python3-capsolver
3744

3845
## How to use?
3946

40-
Is described in the [documentation-website](https://andreidrang.github.io/python3-capsolver/).
47+
Detailed documentation is available on the [website](https://andreidrang.github.io/python3-capsolver/).
48+
49+
### Quick Start
50+
51+
#### Synchronous Example (ImageToText)
52+
```python
53+
from python3_capsolver.image_to_text import ImageToText
54+
55+
# 1. Initialize with API Key
56+
solver = ImageToText(api_key="YOUR_API_KEY")
57+
58+
# 2. Solve
59+
result = solver.captcha_handler(
60+
task_payload={
61+
"body": "base64_encoded_image_string"
62+
}
63+
)
64+
65+
# 3. Check result
66+
if result["errorId"] == 0:
67+
print("Solution:", result["solution"])
68+
else:
69+
print("Error:", result["errorCode"])
70+
```
71+
72+
#### Asynchronous Example (ReCaptcha)
73+
```python
74+
import asyncio
75+
from python3_capsolver.recaptcha import ReCaptcha
76+
from python3_capsolver.core.enum import CaptchaTypeEnm
77+
78+
async def main():
79+
# 1. Initialize
80+
solver = ReCaptcha(
81+
api_key="YOUR_API_KEY",
82+
captcha_type=CaptchaTypeEnm.ReCaptchaV2TaskProxyLess
83+
)
84+
85+
# 2. Solve
86+
result = await solver.aio_captcha_handler(
87+
task_payload={
88+
"websiteURL": "https://example.com",
89+
"websiteKey": "SITE_KEY"
90+
}
91+
)
92+
93+
print(result)
94+
95+
if __name__ == "__main__":
96+
asyncio.run(main())
97+
```
4198

99+
## Supported Captcha Types
100+
- **ReCaptcha**: V2 (Task/Enterprise), V3 (Task/Enterprise)
101+
- **HCaptcha**: Task, Enterprise
102+
- **Cloudflare**: Turnstile
103+
- **GeeTest**: V3, V4
104+
- **DataDome**: Slider
105+
- **MtCaptcha**
106+
- **AWS WAF**
107+
- **Yandex SmartCaptcha**
108+
- **ImageToText**: General image CAPTCHAs
109+
110+
## Documentation & Context (For LLMs)
111+
- **Project Structure**: See `AGENTS.md` in root and subdirectories for internal architecture.
112+
- **Entry Points**: `src/python3_capsolver/*.py` contains service-specific classes (e.g., `ReCaptcha`, `HCaptcha`).
113+
- **Core Logic**: `src/python3_capsolver/core/base.py` handles the API communication loop.
114+
- **Enums**: Use `python3_capsolver.core.enum` for type-safe parameters.
42115

43116
## How to test?
44117

0 commit comments

Comments
 (0)