From 671d858a48e9b4af627d8ee4c13460cd05b55f51 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:50:39 +0000 Subject: [PATCH 1/5] feat(api): manual updates --- .stats.yml | 2 +- README.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index ed1713f..44a4c8c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ 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: a7d6293922d36aa3c3d9d7418f952ece +config_hash: a67332fb3088ad1690fb5fa35a7f8129 diff --git a/README.md b/README.md index 944ff82..978cf28 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ client = Spitch() all_files = [] # Automatically fetches more pages as needed. for file in client.files.list( - limit=10, + limit=50, ): # Do something with file here all_files.append(file) @@ -149,7 +149,7 @@ async def main() -> None: all_files = [] # Iterate through items across all pages, issuing requests as needed. async for file in client.files.list( - limit=10, + limit=50, ): all_files.append(file) print(all_files) @@ -162,7 +162,7 @@ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get ```python first_page = await client.files.list( - limit=10, + limit=50, ) if first_page.has_next_page(): print(f"will fetch next page using these details: {first_page.next_page_info()}") @@ -176,7 +176,7 @@ Or just work directly with the returned data: ```python first_page = await client.files.list( - limit=10, + limit=50, ) print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." From 37b581a20032fe936d4cec742e3fc17bca98f4b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:11:50 +0000 Subject: [PATCH 2/5] feat(api): manual updates --- .stats.yml | 2 +- src/spitch/_constants.py | 4 ++-- tests/test_client.py | 52 ++++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index 44a4c8c..9117b5d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ 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: a67332fb3088ad1690fb5fa35a7f8129 +config_hash: 0273eb13d610e78adedd0fc5541d3dd6 diff --git a/src/spitch/_constants.py b/src/spitch/_constants.py index 6ddf2c7..d75fcb5 100644 --- a/src/spitch/_constants.py +++ b/src/spitch/_constants.py @@ -10,5 +10,5 @@ DEFAULT_MAX_RETRIES = 2 DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) -INITIAL_RETRY_DELAY = 0.5 -MAX_RETRY_DELAY = 8.0 +INITIAL_RETRY_DELAY = 0.3 +MAX_RETRY_DELAY = 10.0 diff --git a/tests/test_client.py b/tests/test_client.py index 8b9b263..fd945a4 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -820,21 +820,21 @@ class Model(BaseModel): "remaining_retries,retry_after,timeout", [ [3, "20", 20], - [3, "0", 0.5], - [3, "-10", 0.5], + [3, "0", 0.35], + [3, "-10", 0.35], [3, "60", 60], - [3, "61", 0.5], + [3, "61", 0.35], [3, "Fri, 29 Sep 2023 16:26:57 GMT", 20], - [3, "Fri, 29 Sep 2023 16:26:37 GMT", 0.5], - [3, "Fri, 29 Sep 2023 16:26:27 GMT", 0.5], + [3, "Fri, 29 Sep 2023 16:26:37 GMT", 0.35], + [3, "Fri, 29 Sep 2023 16:26:27 GMT", 0.35], [3, "Fri, 29 Sep 2023 16:27:37 GMT", 60], - [3, "Fri, 29 Sep 2023 16:27:38 GMT", 0.5], - [3, "99999999999999999999999999999999999", 0.5], - [3, "Zun, 29 Sep 2023 16:26:27 GMT", 0.5], - [3, "", 0.5], - [2, "", 0.5 * 2.0], - [1, "", 0.5 * 4.0], - [-1100, "", 8], # test large number potentially overflowing + [3, "Fri, 29 Sep 2023 16:27:38 GMT", 0.35], + [3, "99999999999999999999999999999999999", 0.35], + [3, "Zun, 29 Sep 2023 16:26:27 GMT", 0.35], + [3, "", 0.35], + [2, "", 0.35 * 2.0], + [1, "", 0.35 * 4.0], + [-1100, "", 10], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) @@ -844,7 +844,7 @@ def test_parse_retry_after_header( headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) calculated = client._calculate_retry_timeout(remaining_retries, options, headers) - assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] + assert calculated == pytest.approx(timeout, 0.35 * 0.875) # pyright: ignore[reportUnknownMemberType] @mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @@ -1722,21 +1722,21 @@ class Model(BaseModel): "remaining_retries,retry_after,timeout", [ [3, "20", 20], - [3, "0", 0.5], - [3, "-10", 0.5], + [3, "0", 0.35], + [3, "-10", 0.35], [3, "60", 60], - [3, "61", 0.5], + [3, "61", 0.35], [3, "Fri, 29 Sep 2023 16:26:57 GMT", 20], - [3, "Fri, 29 Sep 2023 16:26:37 GMT", 0.5], - [3, "Fri, 29 Sep 2023 16:26:27 GMT", 0.5], + [3, "Fri, 29 Sep 2023 16:26:37 GMT", 0.35], + [3, "Fri, 29 Sep 2023 16:26:27 GMT", 0.35], [3, "Fri, 29 Sep 2023 16:27:37 GMT", 60], - [3, "Fri, 29 Sep 2023 16:27:38 GMT", 0.5], - [3, "99999999999999999999999999999999999", 0.5], - [3, "Zun, 29 Sep 2023 16:26:27 GMT", 0.5], - [3, "", 0.5], - [2, "", 0.5 * 2.0], - [1, "", 0.5 * 4.0], - [-1100, "", 8], # test large number potentially overflowing + [3, "Fri, 29 Sep 2023 16:27:38 GMT", 0.35], + [3, "99999999999999999999999999999999999", 0.35], + [3, "Zun, 29 Sep 2023 16:26:27 GMT", 0.35], + [3, "", 0.35], + [2, "", 0.35 * 2.0], + [1, "", 0.35 * 4.0], + [-1100, "", 10], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) @@ -1746,7 +1746,7 @@ async def test_parse_retry_after_header( headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) calculated = async_client._calculate_retry_timeout(remaining_retries, options, headers) - assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] + assert calculated == pytest.approx(timeout, 0.35 * 0.875) # pyright: ignore[reportUnknownMemberType] @mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) From fc4b87a89ee3e9bd71b91261b47e49ef93198543 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:19:48 +0000 Subject: [PATCH 3/5] feat(api): manual updates --- .stats.yml | 2 +- api.md | 8 ++-- src/spitch/resources/files.py | 30 +++++++------- src/spitch/types/__init__.py | 3 +- src/spitch/types/{file.py => file_meta.py} | 4 +- src/spitch/types/files.py | 16 -------- tests/api_resources/test_files.py | 46 ++++++++++++---------- 7 files changed, 48 insertions(+), 61 deletions(-) rename src/spitch/types/{file.py => file_meta.py} (88%) delete mode 100644 src/spitch/types/files.py diff --git a/.stats.yml b/.stats.yml index 9117b5d..4201f08 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ 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: 0273eb13d610e78adedd0fc5541d3dd6 +config_hash: 65d2f8dd9de4ceccfc8bad3e409b446b diff --git a/api.md b/api.md index 8913e54..32a5c3b 100644 --- a/api.md +++ b/api.md @@ -29,14 +29,14 @@ Methods: Types: ```python -from spitch.types import File, FileUsage, Files, FileDeleteResponse +from spitch.types import FileMeta, FileUsage, FileDeleteResponse ``` Methods: -- client.files.list(\*\*params) -> SyncFilesCursor[File] +- client.files.list(\*\*params) -> SyncFilesCursor[FileMeta] - client.files.delete(file_id) -> FileDeleteResponse - client.files.download(file_id, \*\*params) -> object -- client.files.get(file_id) -> File -- client.files.upload(\*\*params) -> File +- 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 1bf894b..cc8cfe1 100644 --- a/src/spitch/resources/files.py +++ b/src/spitch/resources/files.py @@ -18,8 +18,8 @@ async_to_streamed_response_wrapper, ) from ..pagination import SyncFilesCursor, AsyncFilesCursor -from ..types.file import File from .._base_client import AsyncPaginator, make_request_options +from ..types.file_meta import FileMeta from ..types.file_usage import FileUsage from ..types.file_delete_response import FileDeleteResponse @@ -57,7 +57,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncFilesCursor[File]: + ) -> SyncFilesCursor[FileMeta]: """ Get Files @@ -72,7 +72,7 @@ def list( """ return self._get_api_list( "/v1/files", - page=SyncFilesCursor[File], + page=SyncFilesCursor[FileMeta], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -86,7 +86,7 @@ def list( file_list_params.FileListParams, ), ), - model=File, + model=FileMeta, ) def delete( @@ -170,7 +170,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> File: + ) -> FileMeta: """ Get File @@ -190,7 +190,7 @@ def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=File, + cast_to=FileMeta, ) def upload( @@ -203,7 +203,7 @@ def upload( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> File: + ) -> FileMeta: """ Upload a file to your storage. @@ -229,7 +229,7 @@ def upload( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=File, + cast_to=FileMeta, ) def usage( @@ -283,7 +283,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[File, AsyncFilesCursor[File]]: + ) -> AsyncPaginator[FileMeta, AsyncFilesCursor[FileMeta]]: """ Get Files @@ -298,7 +298,7 @@ def list( """ return self._get_api_list( "/v1/files", - page=AsyncFilesCursor[File], + page=AsyncFilesCursor[FileMeta], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -312,7 +312,7 @@ def list( file_list_params.FileListParams, ), ), - model=File, + model=FileMeta, ) async def delete( @@ -396,7 +396,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> File: + ) -> FileMeta: """ Get File @@ -416,7 +416,7 @@ async def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=File, + cast_to=FileMeta, ) async def upload( @@ -429,7 +429,7 @@ async def upload( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> File: + ) -> FileMeta: """ Upload a file to your storage. @@ -455,7 +455,7 @@ async def upload( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=File, + cast_to=FileMeta, ) async def usage( diff --git a/src/spitch/types/__init__.py b/src/spitch/types/__init__.py index 93e1d0f..ec9a954 100644 --- a/src/spitch/types/__init__.py +++ b/src/spitch/types/__init__.py @@ -2,9 +2,8 @@ from __future__ import annotations -from .file import File as File -from .files import Files as Files from .segment import Segment as Segment +from .file_meta import FileMeta as FileMeta from .diacritics import Diacritics as Diacritics from .file_usage import FileUsage as FileUsage from .translation import Translation as Translation diff --git a/src/spitch/types/file.py b/src/spitch/types/file_meta.py similarity index 88% rename from src/spitch/types/file.py rename to src/spitch/types/file_meta.py index 281ed0a..e2b8b29 100644 --- a/src/spitch/types/file.py +++ b/src/spitch/types/file_meta.py @@ -5,10 +5,10 @@ from .._models import BaseModel -__all__ = ["File"] +__all__ = ["FileMeta"] -class File(BaseModel): +class FileMeta(BaseModel): """Metadata info for this file.""" created_at: datetime diff --git a/src/spitch/types/files.py b/src/spitch/types/files.py deleted file mode 100644 index c29ba0d..0000000 --- a/src/spitch/types/files.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .file import File -from .._models import BaseModel - -__all__ = ["Files"] - - -class Files(BaseModel): - """an array of file information.""" - - items: List[File] - - next_cursor: Optional[str] = None diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 7f37b8b..828a3b8 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -9,7 +9,11 @@ from spitch import Spitch, AsyncSpitch from tests.utils import assert_matches_type -from spitch.types import File, FileUsage, FileDeleteResponse +from spitch.types import ( + FileMeta, + FileUsage, + FileDeleteResponse, +) from spitch.pagination import SyncFilesCursor, AsyncFilesCursor base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +25,7 @@ class TestFiles: @parametrize def test_method_list(self, client: Spitch) -> None: file = client.files.list() - assert_matches_type(SyncFilesCursor[File], file, path=["response"]) + assert_matches_type(SyncFilesCursor[FileMeta], file, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Spitch) -> None: @@ -29,7 +33,7 @@ def test_method_list_with_all_params(self, client: Spitch) -> None: cursor="cursor", limit=99, ) - assert_matches_type(SyncFilesCursor[File], file, path=["response"]) + assert_matches_type(SyncFilesCursor[FileMeta], file, path=["response"]) @parametrize def test_raw_response_list(self, client: Spitch) -> None: @@ -38,7 +42,7 @@ def test_raw_response_list(self, client: Spitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncFilesCursor[File], file, path=["response"]) + assert_matches_type(SyncFilesCursor[FileMeta], file, path=["response"]) @parametrize def test_streaming_response_list(self, client: Spitch) -> None: @@ -47,7 +51,7 @@ def test_streaming_response_list(self, client: Spitch) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncFilesCursor[File], file, path=["response"]) + assert_matches_type(SyncFilesCursor[FileMeta], file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -140,7 +144,7 @@ def test_method_get(self, client: Spitch) -> None: file = client.files.get( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize def test_raw_response_get(self, client: Spitch) -> None: @@ -151,7 +155,7 @@ def test_raw_response_get(self, client: Spitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize def test_streaming_response_get(self, client: Spitch) -> None: @@ -162,7 +166,7 @@ def test_streaming_response_get(self, client: Spitch) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -178,7 +182,7 @@ def test_method_upload(self, client: Spitch) -> None: file = client.files.upload( file=b"raw file contents", ) - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize def test_raw_response_upload(self, client: Spitch) -> None: @@ -189,7 +193,7 @@ def test_raw_response_upload(self, client: Spitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize def test_streaming_response_upload(self, client: Spitch) -> None: @@ -200,7 +204,7 @@ def test_streaming_response_upload(self, client: Spitch) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -238,7 +242,7 @@ class TestAsyncFiles: @parametrize async def test_method_list(self, async_client: AsyncSpitch) -> None: file = await async_client.files.list() - assert_matches_type(AsyncFilesCursor[File], file, path=["response"]) + assert_matches_type(AsyncFilesCursor[FileMeta], file, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncSpitch) -> None: @@ -246,7 +250,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncSpitch) -> N cursor="cursor", limit=99, ) - assert_matches_type(AsyncFilesCursor[File], file, path=["response"]) + assert_matches_type(AsyncFilesCursor[FileMeta], file, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncSpitch) -> None: @@ -255,7 +259,7 @@ async def test_raw_response_list(self, async_client: AsyncSpitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncFilesCursor[File], file, path=["response"]) + assert_matches_type(AsyncFilesCursor[FileMeta], file, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncSpitch) -> None: @@ -264,7 +268,7 @@ async def test_streaming_response_list(self, async_client: AsyncSpitch) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncFilesCursor[File], file, path=["response"]) + assert_matches_type(AsyncFilesCursor[FileMeta], file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -357,7 +361,7 @@ async def test_method_get(self, async_client: AsyncSpitch) -> None: file = await async_client.files.get( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncSpitch) -> None: @@ -368,7 +372,7 @@ async def test_raw_response_get(self, async_client: AsyncSpitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncSpitch) -> None: @@ -379,7 +383,7 @@ async def test_streaming_response_get(self, async_client: AsyncSpitch) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -395,7 +399,7 @@ async def test_method_upload(self, async_client: AsyncSpitch) -> None: file = await async_client.files.upload( file=b"raw file contents", ) - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize async def test_raw_response_upload(self, async_client: AsyncSpitch) -> None: @@ -406,7 +410,7 @@ async def test_raw_response_upload(self, async_client: AsyncSpitch) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) @parametrize async def test_streaming_response_upload(self, async_client: AsyncSpitch) -> None: @@ -417,7 +421,7 @@ async def test_streaming_response_upload(self, async_client: AsyncSpitch) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(File, file, path=["response"]) + assert_matches_type(FileMeta, file, path=["response"]) assert cast(Any, response.is_closed) is True From fc95856fb63359296f4c6211b58d2297559a7670 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:26:25 +0000 Subject: [PATCH 4/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, 2 insertions(+), 157 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4201f08..7ec943d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 10 +configured_endpoints: 9 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/babs-technologies%2Fspitch-d909291d8029ce7de8d2ccad8e6d05f1f1d893f2ba68fcf6c1cd7265ab6a8df9.yml openapi_spec_hash: 243f422b356ab7c8c417f87fe9ae2ad6 -config_hash: 65d2f8dd9de4ceccfc8bad3e409b446b +config_hash: 75f0cebdc2bbaa3b412c700aac6d0a13 diff --git a/api.md b/api.md index 32a5c3b..e6d09e9 100644 --- a/api.md +++ b/api.md @@ -37,6 +37,5 @@ 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 cc8cfe1..7fe4fa0 100644 --- a/src/spitch/resources/files.py +++ b/src/spitch/resources/files.py @@ -160,39 +160,6 @@ 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, *, @@ -386,39 +353,6 @@ 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, *, @@ -491,9 +425,6 @@ 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, ) @@ -515,9 +446,6 @@ 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, ) @@ -539,9 +467,6 @@ 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, ) @@ -563,9 +488,6 @@ 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 828a3b8..8f1c2b0 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -139,44 +139,6 @@ 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( @@ -356,44 +318,6 @@ 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 cc1c9560543b557bb1ca69605bff6e851e494477 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:26:45 +0000 Subject: [PATCH 5/5] release: 1.47.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- src/spitch/_version.py | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4b6cc3c..dc9bcb3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.46.0" + ".": "1.47.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dced65b..3134d68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 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) + +### Features + +* **api:** manual updates ([fc95856](https://github.com/spi-tch/spitch-python/commit/fc95856fb63359296f4c6211b58d2297559a7670)) +* **api:** manual updates ([fc4b87a](https://github.com/spi-tch/spitch-python/commit/fc4b87a89ee3e9bd71b91261b47e49ef93198543)) +* **api:** manual updates ([37b581a](https://github.com/spi-tch/spitch-python/commit/37b581a20032fe936d4cec742e3fc17bca98f4b4)) +* **api:** manual updates ([671d858](https://github.com/spi-tch/spitch-python/commit/671d858a48e9b4af627d8ee4c13460cd05b55f51)) + ## 1.46.0 (2026-02-04) Full Changelog: [v1.45.0...v1.46.0](https://github.com/spi-tch/spitch-python/compare/v1.45.0...v1.46.0) diff --git a/pyproject.toml b/pyproject.toml index 6a10cad..4e4f392 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spitch" -version = "1.46.0" +version = "1.47.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 9384528..6751d47 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.46.0" # x-release-please-version +__version__ = "1.47.0" # x-release-please-version