Repository navigation
Add Python SDK (draft) - #1
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
…y-After floor, decode error, User-Agent - Retry a 409 conflict on keyed POSTs only; never idempotency-key-reused. - Do not retry certificate, unknown-host or malformed-request errors. - Retry-After floor at the retry base, with jitter; longer than the cap is surfaced. - Typed decode error (with status) for a 2xx body that is not JSON. - User-Agent carries version and URL; an empty custom one keeps the default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
clarivo-dev
marked this pull request as ready for review
October 27, 2026 20:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First import of the Python SDK (pre-release,
Private :: Do Not Uploadclassifier, nothing is published).scripts/generate.py; CI fails on drift).Retry-After, oneIdempotency-Keyper call reused by retries, RFC 9457 typed errors, cursor pagination,warm_runs.wait().repror errors.Tested: 29 tests, mypy strict.
Ported review findings
Ported from the Go SDK review: a keyed POST retries a 409
conflict(neveridempotency-key-reused); certificate/TLS verification, unknown-host and malformed-request errors are not retried;Retry-Afteris floored at the retry base with up to +25% jitter (above the cap it is still raised); a 2xx body that is not JSON raisesSiteWarmDecodeError(status); theUser-Agentcarries version and URL and an empty one keeps the default. Tests:tests/test_lows.py(59 pass, mypy strict clean).Deviations: the version is
0.1.0(what the package declares), so the UA issitewarm-python/0.1.0 (+https://github.com/sitewarm/sdk-python). The base path already keeps percent-encoding (urlsplit().path), so only a regression test was added. DNS "not found" meansEAI_NONAME/EAI_NODATA; a temporary failure (EAI_AGAIN) is still retried. Ids stay opaque; key validation and error sentinels are out of scope.🤖 Generated with Claude Code