Skip to content

Sdk review updates - #18

Merged
dzmitry-duboyski merged 24 commits into
mainfrom
sdk-review-updates
Nov 3, 2026
Merged

dzmitry-duboyski merged 24 commits into
mainfrom
sdk-review-updates

Conversation

@dariyaanis

@dariyaanis dariyaanis commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR applies the SDK review updates as a series of focused commits:

  • point the package metadata documentation link to the SDK README;
  • validate required task parameters locally before sending an API request;
  • clarify CAPTCHA types that do not have a separate proxy task variant;
  • document why the intentionally empty py.typed marker is required;
  • split proxy and proxyless examples into separate sync and async files;
  • add a security policy with private vulnerability reporting instructions;
  • bump the package version from 1.0.4 to 1.0.5.

The existing public API documentation was also reviewed. Public clients, methods, task classes, and exceptions already provide Python docstrings, type annotations, parameter descriptions, return values, raised exceptions, and usage examples.

Validation

  • python -m pytest -q -p no:cacheprovider - 86 passed
  • python -m ruff check . - passed
  • python -m build - sdist and wheel built successfully
  • python -m twine check --strict dist/* - passed

Release

After this PR is merged and the main workflow passes, tag the merge commit as v1.0.5 and push the tag. The existing publish workflow will verify the version, publish the package to PyPI, and create the GitHub release.

dariyaanis and others added 24 commits October 28, 2026 15:34
- reject whitespace-only client_key in both clients
- document ValidationError in solve() and create_task() docstrings and README
- mark every task parameter as Required or Optional in docstrings
- replace em dash in proxy support table with a plain dash
- update README references to renamed example files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.github/workflows/tests.yml
#	examples/README.md
- document YandexSmartCaptchaImageTask in the shared docstring format
- add Yandex SmartCaptcha Image to the supported types table
- clarify version-specific GeeTest parameters in docstrings
- restore comments in async reCAPTCHA v2 examples
- replace em dashes in README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `async with AsyncCaptchaClient(...)` so each example closes its
HTTP connection pool, as recommended in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the same basic, advanced, and language pool scenarios as the sync
example, with comments for each task parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single network error or HTTP timeout on getTaskResult used to abort
solve() and lose an already created, paid task. Retry such failures on
the next poll, up to `poll_retries` (default 3) consecutive times.
API errors and createTask are not retried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Errors from solve() polling and get_task_result() now carry `task_id`,
so a timed-out task can still be checked with get_task_result() and the
ID can be logged or sent to support. The polling timeout message also
names the task. `task_id` is None for errors raised before a task exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run pip-audit on the runtime dependencies, bandit on the package source,
and CodeQL security queries on every pull request, on pushes to main,
and weekly so newly published advisories are caught without code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
requests 2.28-2.30 can leak the Proxy-Authorization header on redirects
(CVE-2023-32681), which matters for proxy tasks, and later 2.32.x
releases fix further advisories. Require requests>=2.32.4, the newest
line that still supports Python 3.9, and httpx>=0.27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository already has CodeQL default setup enabled, and GitHub
rejects SARIF uploads from advanced workflows while it is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dzmitry-duboyski
dzmitry-duboyski merged commit a8ed1d3 into main Nov 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants