Skip to content

v2.1.0: live try-on, error handling fixes, contract tests and CI - #1

Merged
0xBitBuster merged 2 commits into
mainfrom
feat/live-tryon-api
Nov 26, 2026
Merged

0xBitBuster merged 2 commits into
mainfrom
feat/live-tryon-api

Conversation

@0xBitBuster

Copy link
Copy Markdown
Contributor

Summary

Version 2.1.0: live try-on server methods, correct API error handling, a shared contract test suite with CI, and a User-Agent header.

Added

  • Live (real-time webcam) try-on, server side: prepare_live_garment, start_live_session, get_live_session, stop_live_session, get_live_config. The shopper's browser streams with the tryiton-live package using the start-session response; the API key never reaches the browser.
  • User-Agent: tryiton-python/2.1.0 on every request.
  • TypedDict response types (tryiton.types) and a py.typed marker; values are still plain dicts at runtime.
  • Contract tests that run the same request, response and error cases as every other TryItOn SDK, plus a GitHub Actions workflow.
  • CHANGELOG.md; README sections for live try-on and development.

Fixed

  • API errors now carry the API's error.name and error.message. Before, the error envelope was read incorrectly, so errors reported "HTTP 4xx" with a missing or wrong name.
  • wait_for_result raised AttributeError on a failed job; it now raises TryItOnError with the job's reason (error_name="ProcessingError").
  • Job ids are URL-escaped in get_status.
  • __version__ was stale (0.1.0); it now matches the package version.

Testing

pytest: 42 tests pass; mypy --strict clean. Run locally on Python 3.8, 3.12 and 3.13; CI covers 3.8 to 3.13.

🤖 Generated with Claude Code

0xBitBuster and others added 2 commits November 26, 2026 15:35
- Live try-on server methods: prepare garment, start/get/stop session, config
- API errors carry the envelope's error.name / error.message (they were
  "HTTP 4xx" with a wrong or missing name)
- TypedDict response types and py.typed; mypy --strict clean
- wait_for_result no longer crashes on a failed job (AttributeError); job ids escaped
- User-Agent: tryiton-python/2.1.0 on every request
- Shared contract test suite (fixtures from tryiton/backend/api-contract) + GitHub Actions CI
- CHANGELOG.md; README live try-on and development sections
- Includes earlier uncommitted comment edits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest (26.04) has no setup-python build for 3.9 any more, same as 3.8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xBitBuster
0xBitBuster merged commit aaf95a1 into main Nov 26, 2026
12 checks passed
@0xBitBuster
0xBitBuster deleted the feat/live-tryon-api branch November 26, 2026 15:32
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