How 2captcha/2captcha-python works
This is a Python client library for submitting CAPTCHA-solving tasks to 2Captcha and returning answers to application code. Developers configure either the synchronous or asynchronous solver, call a CAPTCHA-specific method or use the lower-level submission/result methods, and the client sends requests to the service. The README documents many CAPTCHA types, callback behavior, balance checks, and reporting. The graph groups CAPTCHA-specific wrappers by purpose; unsampled method details and some internal control flow are not inferred.
Main entry points: solver.py Sync solver · async_solver.py Async solver · api.py Sync API client · async_api.py Async API client
Components 10
Solver clients
- Sync solver
twocaptcha/solver.py - Async solver
twocaptcha/async_solver.py
CAPTCHA capabilities
- Sync CAPTCHA methods
twocaptcha/solver.py - Async CAPTCHA methods
twocaptcha/async_solver.py
API transport
- Sync API client
twocaptcha/api.py - Async API client
twocaptcha/async_api.py
Errors
- Solver errors
twocaptcha/exceptions/solver.py - API errors
twocaptcha/exceptions/api.py
Other components
- Application developer
- 2Captcha API
Connections 12
- Application developer → Sync solver: configures and calls
README.md - Application developer → Async solver: configures and calls
README.md - Sync CAPTCHA methods → Sync solver: invoke solve
twocaptcha/solver.py - Async CAPTCHA methods → Async solver: invoke solve
twocaptcha/async_solver.py - Sync solver → Sync API client: submits and polls
twocaptcha/solver.py - Async solver → Async API client: submits and polls
twocaptcha/async_solver.py - Sync API client → 2Captcha API: HTTP requests
twocaptcha/api.py - Async API client → 2Captcha API: HTTP requests
twocaptcha/async_api.py - Sync solver → Solver errors: raises
twocaptcha/solver.py - Async solver → Solver errors: raises
twocaptcha/async_solver.py - Sync API client → API errors: raises
twocaptcha/api.py - Async API client → API errors: raises
twocaptcha/async_api.py