From 1d522a92d6fff6c0964d29deb1efbb68beb5f178 Mon Sep 17 00:00:00 2001 From: Renan Ferreira Date: Mon, 25 May 2026 11:49:35 -0300 Subject: [PATCH 1/2] feat(predictions): add packshot overload to subscribe() Sync subscribe() overloads with run() by adding the missing packshot model to both PredictionsResource and AsyncPredictionsResource. --- src/fashn/resources/predictions.py | 48 +++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/src/fashn/resources/predictions.py b/src/fashn/resources/predictions.py index 2ce4fda..f61c851 100644 --- a/src/fashn/resources/predictions.py +++ b/src/fashn/resources/predictions.py @@ -240,6 +240,24 @@ def subscribe( request_timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PredictionSubscribeResponse: ... + @overload + def subscribe( + self, + *, + inputs: prediction_run_params.PackshotRequestInputs, + model_name: Literal["packshot"], + webhook_url: str | Omit = omit, + poll_interval: int | None = None, + timeout: int | None = None, + max_retries: int | None = None, + on_enqueued: EnqueuedCallback | None = None, + on_queue_update: QueueUpdateCallback | None = None, + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + request_timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> PredictionSubscribeResponse: ... + def subscribe( self, *, @@ -253,7 +271,8 @@ def subscribe( | prediction_run_params.BackgroundChangeRequestInputs | prediction_run_params.BackgroundRemoveRequestInputs | prediction_run_params.ImageToVideoRequestInputs - | prediction_run_params.EditRequestInputs, + | prediction_run_params.EditRequestInputs + | prediction_run_params.PackshotRequestInputs, model_name: Literal["tryon-max"] | Literal["tryon-v1.6"] | Literal["product-to-model"] @@ -264,7 +283,8 @@ def subscribe( | Literal["background-change"] | Literal["background-remove"] | Literal["image-to-video"] - | Literal["edit"], + | Literal["edit"] + | Literal["packshot"], webhook_url: str | Omit = omit, poll_interval: int | None = None, timeout: int | None = None, @@ -1321,6 +1341,24 @@ async def subscribe( request_timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PredictionSubscribeResponse: ... + @overload + async def subscribe( + self, + *, + inputs: prediction_run_params.PackshotRequestInputs, + model_name: Literal["packshot"], + webhook_url: str | Omit = omit, + poll_interval: int | None = None, + timeout: int | None = None, + max_retries: int | None = None, + on_enqueued: EnqueuedCallback | None = None, + on_queue_update: QueueUpdateCallback | None = None, + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + request_timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> PredictionSubscribeResponse: ... + async def subscribe( self, *, @@ -1334,7 +1372,8 @@ async def subscribe( | prediction_run_params.BackgroundChangeRequestInputs | prediction_run_params.BackgroundRemoveRequestInputs | prediction_run_params.ImageToVideoRequestInputs - | prediction_run_params.EditRequestInputs, + | prediction_run_params.EditRequestInputs + | prediction_run_params.PackshotRequestInputs, model_name: Literal["tryon-max"] | Literal["tryon-v1.6"] | Literal["product-to-model"] @@ -1345,7 +1384,8 @@ async def subscribe( | Literal["background-change"] | Literal["background-remove"] | Literal["image-to-video"] - | Literal["edit"], + | Literal["edit"] + | Literal["packshot"], webhook_url: str | Omit = omit, poll_interval: int | None = None, timeout: int | None = None, From 8163187eef707a6948f68025d846e7e69e06459b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 14:51:42 +0000 Subject: [PATCH 2/2] release: 0.9.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/fashn/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6538ca9..6d78745 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.0" + ".": "0.9.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1107ecf..9a5cb3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.9.0 (2026-05-25) + +Full Changelog: [v0.8.0...v0.9.0](https://github.com/fashn-AI/fashn-python-sdk/compare/v0.8.0...v0.9.0) + +### Features + +* **predictions:** add packshot overload to subscribe() ([1d522a9](https://github.com/fashn-AI/fashn-python-sdk/commit/1d522a92d6fff6c0964d29deb1efbb68beb5f178)) + ## 0.8.0 (2026-05-25) Full Changelog: [v0.7.0...v0.8.0](https://github.com/fashn-AI/fashn-python-sdk/compare/v0.7.0...v0.8.0) diff --git a/pyproject.toml b/pyproject.toml index e65d1a9..44560ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fashn" -version = "0.8.0" +version = "0.9.0" description = "The official Python library for the fashn API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/fashn/_version.py b/src/fashn/_version.py index 4850ce4..5be31ce 100644 --- a/src/fashn/_version.py +++ b/src/fashn/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "fashn" -__version__ = "0.8.0" # x-release-please-version +__version__ = "0.9.0" # x-release-please-version