Skip to content

Add synchronous VisorClient (step 11)#8

Merged
whitewalls86 merged 1 commit into
masterfrom
step-11-sync-client
Jun 13, 2026
Merged

Add synchronous VisorClient (step 11)#8
whitewalls86 merged 1 commit into
masterfrom
step-11-sync-client

Conversation

@whitewalls86

Copy link
Copy Markdown
Owner

Summary

  • Implements VisorClient in src/visor/_client.py, backed by the existing SyncVisorTransport — independent of the async client, no wrapping
  • Mirrors all 8 AsyncVisorClient methods synchronously: filter_listings, get_listing, lookup_vin, filter_facets, search_dealers, get_dealer, dealer_inventory, get_usage
  • Exports VisorClient from the package root (visor.__init__) and adds it to __all__

Test plan

  • tests/test_client_sync.py — 32 new tests covering: constructor (explicit key, env var, missing key, env override), auth header propagation, all 8 methods (correct path, param serialization, return type), error dispatch for all status codes (400–500), RateLimitError.retry_after, transport error wrapping as VisorTransportError, context manager closes underlying httpx client, and export assertion
  • Full pytest suite passes (224 tests)
  • ruff check src/ tests/ clean
  • mypy src/ clean

🤖 Generated with Claude Code

Implements VisorClient backed by SyncVisorTransport with full parity to
AsyncVisorClient: all 8 methods, context manager, and export from package
root. Adds 32 focused sync client tests covering all methods, error
dispatch, and transport close behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@whitewalls86
whitewalls86 merged commit e5bfe1a into master Jun 13, 2026
2 checks passed
@whitewalls86
whitewalls86 deleted the step-11-sync-client branch June 13, 2026 04:10
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.

1 participant