From 7ff92d62b3cde84cd531cd772b18c1dbde760e03 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:36:28 +0000 Subject: [PATCH 1/5] feat(api): manual updates --- .stats.yml | 4 +- api.md | 1 + src/spitch/resources/files.py | 78 +++++++++++++++++++++++++++++++ tests/api_resources/test_files.py | 76 ++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ec943d..4201f08 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 9 +configured_endpoints: 10 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/babs-technologies%2Fspitch-d909291d8029ce7de8d2ccad8e6d05f1f1d893f2ba68fcf6c1cd7265ab6a8df9.yml openapi_spec_hash: 243f422b356ab7c8c417f87fe9ae2ad6 -config_hash: 75f0cebdc2bbaa3b412c700aac6d0a13 +config_hash: 65d2f8dd9de4ceccfc8bad3e409b446b diff --git a/api.md b/api.md index e6d09e9..32a5c3b 100644 --- a/api.md +++ b/api.md @@ -37,5 +37,6 @@ Methods: - client.files.list(\*\*params) -> SyncFilesCursor[FileMeta] - client.files.delete(file_id) -> FileDeleteResponse - client.files.download(file_id, \*\*params) -> object +- client.files.get(file_id) -> FileMeta - client.files.upload(\*\*params) -> FileMeta - client.files.usage() -> FileUsage diff --git a/src/spitch/resources/files.py b/src/spitch/resources/files.py index 7fe4fa0..cc8cfe1 100644 --- a/src/spitch/resources/files.py +++ b/src/spitch/resources/files.py @@ -160,6 +160,39 @@ def download( cast_to=object, ) + def get( + self, + file_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FileMeta: + """ + Get File + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not file_id: + raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") + return self._get( + f"/v1/files/{file_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileMeta, + ) + def upload( self, *, @@ -353,6 +386,39 @@ async def download( cast_to=object, ) + async def get( + self, + file_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FileMeta: + """ + Get File + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not file_id: + raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") + return await self._get( + f"/v1/files/{file_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileMeta, + ) + async def upload( self, *, @@ -425,6 +491,9 @@ def __init__(self, files: FilesResource) -> None: self.download = to_raw_response_wrapper( files.download, ) + self.get = to_raw_response_wrapper( + files.get, + ) self.upload = to_raw_response_wrapper( files.upload, ) @@ -446,6 +515,9 @@ def __init__(self, files: AsyncFilesResource) -> None: self.download = async_to_raw_response_wrapper( files.download, ) + self.get = async_to_raw_response_wrapper( + files.get, + ) self.upload = async_to_raw_response_wrapper( files.upload, ) @@ -467,6 +539,9 @@ def __init__(self, files: FilesResource) -> None: self.download = to_streamed_response_wrapper( files.download, ) + self.get = to_streamed_response_wrapper( + files.get, + ) self.upload = to_streamed_response_wrapper( files.upload, ) @@ -488,6 +563,9 @@ def __init__(self, files: AsyncFilesResource) -> None: self.download = async_to_streamed_response_wrapper( files.download, ) + self.get = async_to_streamed_response_wrapper( + files.get, + ) self.upload = async_to_streamed_response_wrapper( files.upload, ) diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 8f1c2b0..828a3b8 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -139,6 +139,44 @@ def test_path_params_download(self, client: Spitch) -> None: file_id="", ) + @parametrize + def test_method_get(self, client: Spitch) -> None: + file = client.files.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(FileMeta, file, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Spitch) -> None: + response = client.files.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file = response.parse() + assert_matches_type(FileMeta, file, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Spitch) -> None: + with client.files.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file = response.parse() + assert_matches_type(FileMeta, file, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Spitch) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): + client.files.with_raw_response.get( + "", + ) + @parametrize def test_method_upload(self, client: Spitch) -> None: file = client.files.upload( @@ -318,6 +356,44 @@ async def test_path_params_download(self, async_client: AsyncSpitch) -> None: file_id="", ) + @parametrize + async def test_method_get(self, async_client: AsyncSpitch) -> None: + file = await async_client.files.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(FileMeta, file, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncSpitch) -> None: + response = await async_client.files.with_raw_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file = await response.parse() + assert_matches_type(FileMeta, file, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncSpitch) -> None: + async with async_client.files.with_streaming_response.get( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file = await response.parse() + assert_matches_type(FileMeta, file, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncSpitch) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): + await async_client.files.with_raw_response.get( + "", + ) + @parametrize async def test_method_upload(self, async_client: AsyncSpitch) -> None: file = await async_client.files.upload( From a27288bf0e466f1fd9f2f966f66a148625b9beaf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 05:07:19 +0000 Subject: [PATCH 2/5] chore(internal): bump dependencies --- requirements-dev.lock | 20 ++++++++++---------- requirements.lock | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 9badb5b..6c2daee 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,14 +12,14 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via spitch aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via spitch argcomplete==3.6.3 @@ -31,7 +31,7 @@ attrs==25.4.0 # via nox backports-asyncio-runner==1.2.0 # via pytest-asyncio -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx colorlog==6.10.1 @@ -61,7 +61,7 @@ httpx==0.27.2 # via httpx-aiohttp # via respx # via spitch -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via spitch humanize==4.13.0 # via nox @@ -69,7 +69,7 @@ idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==8.7.0 +importlib-metadata==8.7.1 iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 @@ -82,14 +82,14 @@ multidict==6.7.0 mypy==1.17.0 mypy-extensions==1.1.0 # via mypy -nodeenv==1.9.1 +nodeenv==1.10.0 # via pyright nox==2025.11.12 packaging==25.0 # via dependency-groups # via nox # via pytest -pathspec==0.12.1 +pathspec==1.0.3 # via mypy platformdirs==4.4.0 # via virtualenv @@ -115,13 +115,13 @@ python-dateutil==2.9.0.post0 # via time-machine respx==0.22.0 rich==14.2.0 -ruff==0.14.7 +ruff==0.14.13 six==1.17.0 # via python-dateutil sniffio==1.3.1 # via spitch time-machine==2.19.0 -tomli==2.3.0 +tomli==2.4.0 # via dependency-groups # via mypy # via nox @@ -141,7 +141,7 @@ typing-extensions==4.15.0 # via virtualenv typing-inspection==0.4.2 # via pydantic -virtualenv==20.35.4 +virtualenv==20.36.1 # via nox yarl==1.22.0 # via aiohttp diff --git a/requirements.lock b/requirements.lock index 7d1ca08..5822994 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,21 +12,21 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via spitch aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via spitch async-timeout==5.0.1 # via aiohttp attrs==25.4.0 # via aiohttp -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx distro==1.9.0 @@ -43,7 +43,7 @@ httpcore==1.0.9 httpx==0.27.2 # via httpx-aiohttp # via spitch -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via spitch idna==3.11 # via anyio From 6402c25a860192407ea13491b22ccf4caa2525eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 06:36:32 +0000 Subject: [PATCH 3/5] chore(internal): fix lint error on Python 3.14 --- src/spitch/_utils/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spitch/_utils/_compat.py b/src/spitch/_utils/_compat.py index dd70323..2c70b29 100644 --- a/src/spitch/_utils/_compat.py +++ b/src/spitch/_utils/_compat.py @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool: else: import types - return tp is Union or tp is types.UnionType + return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap] def is_typeddict(tp: Type[Any]) -> bool: From 16fa7adc0c7c69fd905648b7daa4b1ac657bac1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 04:40:59 +0000 Subject: [PATCH 4/5] chore: format all `api.md` files --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e4f392..d3f2f15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" +"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'" "format:ruff" = "ruff format" "lint" = { chain = [ From f4c51612c6c4e3676ad16d52b886562e3f1996e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 04:41:16 +0000 Subject: [PATCH 5/5] release: 1.48.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ pyproject.toml | 2 +- src/spitch/_version.py | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dc9bcb3..3f47f4b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.47.0" + ".": "1.48.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3134d68..3f6f2f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.48.0 (2026-02-13) + +Full Changelog: [v1.47.0...v1.48.0](https://github.com/spi-tch/spitch-python/compare/v1.47.0...v1.48.0) + +### Features + +* **api:** manual updates ([7ff92d6](https://github.com/spi-tch/spitch-python/commit/7ff92d62b3cde84cd531cd772b18c1dbde760e03)) + + +### Chores + +* format all `api.md` files ([16fa7ad](https://github.com/spi-tch/spitch-python/commit/16fa7adc0c7c69fd905648b7daa4b1ac657bac1e)) +* **internal:** bump dependencies ([a27288b](https://github.com/spi-tch/spitch-python/commit/a27288bf0e466f1fd9f2f966f66a148625b9beaf)) +* **internal:** fix lint error on Python 3.14 ([6402c25](https://github.com/spi-tch/spitch-python/commit/6402c25a860192407ea13491b22ccf4caa2525eb)) + ## 1.47.0 (2026-02-04) Full Changelog: [v1.46.0...v1.47.0](https://github.com/spi-tch/spitch-python/compare/v1.46.0...v1.47.0) diff --git a/pyproject.toml b/pyproject.toml index d3f2f15..205d787 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spitch" -version = "1.47.0" +version = "1.48.0" description = "The official Python library for the Spitch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/spitch/_version.py b/src/spitch/_version.py index 6751d47..3c5534a 100644 --- a/src/spitch/_version.py +++ b/src/spitch/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "spitch" -__version__ = "1.47.0" # x-release-please-version +__version__ = "1.48.0" # x-release-please-version