diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f385763..b7b9667 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.16.0" + ".": "5.16.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index af7e8a2..d24d405 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1 @@ configured_endpoints: 64 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-72678a32f9ad57c2bed47a9c300c735e91b9f6e0a0583ea9cc549a066e343f82.yml -openapi_spec_hash: 79e4633b48de45cb04aeb086b8b08818 -config_hash: e22d747d6682946b15b39a0d286ed0a8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9edda30..5c448c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.16.1 (2026-08-25) + +Full Changelog: [v5.16.0...v5.16.1](https://github.com/runwayml/sdk-python/compare/v5.16.0...v5.16.1) + +### Bug Fixes + +* **client:** restore waitable wraps and uploads after stlc cutover ([e4d247f](https://github.com/runwayml/sdk-python/commit/e4d247fd81c4c73ca29fc2eb1f442d3259a815f6)) + ## 5.16.0 (2026-08-25) Full Changelog: [v5.15.0...v5.16.0](https://github.com/runwayml/sdk-python/compare/v5.15.0...v5.16.0) diff --git a/README.md b/README.md index 4b05efc..a859770 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,6 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. -from datetime import datetime - ## Pagination List methods in the RunwayML API are paginated. @@ -134,16 +132,14 @@ from runwayml import RunwayML client = RunwayML() -all_webapps = [] +all_routers = [] # Automatically fetches more pages as needed. -for webapp in client.organization.webapp.list_usage( - from_=datetime.fromisoformat("2019-12-27T18:11:19.117"), +for router in client.routers.list( limit=1, - to=datetime.fromisoformat("2019-12-27T18:11:19.117"), ): - # Do something with webapp here - all_webapps.append(webapp) -print(all_webapps) + # Do something with router here + all_routers.append(router) +print(all_routers) ``` Or, asynchronously: @@ -156,15 +152,13 @@ client = AsyncRunwayML() async def main() -> None: - all_webapps = [] + all_routers = [] # Iterate through items across all pages, issuing requests as needed. - async for webapp in client.organization.webapp.list_usage( - from_=datetime.fromisoformat("2019-12-27T18:11:19.117"), + async for router in client.routers.list( limit=1, - to=datetime.fromisoformat("2019-12-27T18:11:19.117"), ): - all_webapps.append(webapp) - print(all_webapps) + all_routers.append(router) + print(all_routers) asyncio.run(main()) @@ -173,10 +167,8 @@ asyncio.run(main()) Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: ```python -first_page = await client.organization.webapp.list_usage( - from_=datetime.fromisoformat("2019-12-27T18:11:19.117"), +first_page = await client.routers.list( limit=1, - to=datetime.fromisoformat("2019-12-27T18:11:19.117"), ) if first_page.has_next_page(): print(f"will fetch next page using these details: {first_page.next_page_info()}") @@ -189,15 +181,13 @@ if first_page.has_next_page(): Or just work directly with the returned data: ```python -first_page = await client.organization.webapp.list_usage( - from_=datetime.fromisoformat("2019-12-27T18:11:19.117"), +first_page = await client.routers.list( limit=1, - to=datetime.fromisoformat("2019-12-27T18:11:19.117"), ) print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." -for webapp in first_page.data: - print(webapp.credits) +for router in first_page.data: + print(router.id) # Remove `await` for non-async usage. ``` diff --git a/pyproject.toml b/pyproject.toml index 4893507..34b4b1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runwayml" -version = "5.16.0" +version = "5.16.1" description = "The official Python library for the runwayml API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/runwayml/_version.py b/src/runwayml/_version.py index ab25cef..e54c4c6 100644 --- a/src/runwayml/_version.py +++ b/src/runwayml/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runwayml" -__version__ = "5.16.0" # x-release-please-version +__version__ = "5.16.1" # x-release-please-version diff --git a/src/runwayml/types/generate/__init__.py b/src/runwayml/types/generate/__init__.py index 721aead..f2c5b6b 100644 --- a/src/runwayml/types/generate/__init__.py +++ b/src/runwayml/types/generate/__init__.py @@ -7,4 +7,6 @@ from .video_create_params import VideoCreateParams as VideoCreateParams from .audio_create_response import AudioCreateResponse as AudioCreateResponse from .image_create_response import ImageCreateResponse as ImageCreateResponse +from .reference_audio_param import ReferenceAudioParam as ReferenceAudioParam +from .reference_voice_param import ReferenceVoiceParam as ReferenceVoiceParam from .video_create_response import VideoCreateResponse as VideoCreateResponse diff --git a/tests/api_resources/test_image_to_video.py b/tests/api_resources/test_image_to_video.py index d0e4186..10e561d 100644 --- a/tests/api_resources/test_image_to_video.py +++ b/tests/api_resources/test_image_to_video.py @@ -578,6 +578,51 @@ def test_streaming_response_create_overload_11(self, client: RunwayML) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_create_overload_12(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_12(self, client: RunwayML) -> None: + image_to_video = client.image_to_video.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + duration=1, + prompt_text="x", + resolution="480p", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_12(self, client: RunwayML) -> None: + response = client.image_to_video.with_raw_response.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_12(self, client: RunwayML) -> None: + with client.image_to_video.with_streaming_response.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + class TestAsyncImageToVideo: parametrize = pytest.mark.parametrize( @@ -1144,3 +1189,48 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncRu assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_12(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_12(self, async_client: AsyncRunwayML) -> None: + image_to_video = await async_client.image_to_video.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + duration=1, + prompt_text="x", + resolution="480p", + ) + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_12(self, async_client: AsyncRunwayML) -> None: + response = await async_client.image_to_video.with_raw_response.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_12(self, async_client: AsyncRunwayML) -> None: + async with async_client.image_to_video.with_streaming_response.create( + model="grok_imagine_1_5", + prompt_image="https://example.com/image.jpg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + image_to_video = await response.parse() + assert_matches_type(ImageToVideoCreateResponse, image_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_text_to_video.py b/tests/api_resources/test_text_to_video.py index 05a6d86..3747b64 100644 --- a/tests/api_resources/test_text_to_video.py +++ b/tests/api_resources/test_text_to_video.py @@ -544,6 +544,58 @@ def test_streaming_response_create_overload_10(self, client: RunwayML) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_create_overload_11(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="grok_imagine_1_5", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_11(self, client: RunwayML) -> None: + text_to_video = client.text_to_video.create( + model="grok_imagine_1_5", + prompt_text="x", + duration=1, + ratio="1:1", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/audio.mp3", + } + ], + references=[{"uri": "https://example.com/image.jpg"}], + resolution="480p", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_raw_response_create_overload_11(self, client: RunwayML) -> None: + response = client.text_to_video.with_raw_response.create( + model="grok_imagine_1_5", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_11(self, client: RunwayML) -> None: + with client.text_to_video.with_streaming_response.create( + model="grok_imagine_1_5", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True + class TestAsyncTextToVideo: parametrize = pytest.mark.parametrize( @@ -1076,3 +1128,55 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncRu assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_11(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="grok_imagine_1_5", + prompt_text="x", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_11(self, async_client: AsyncRunwayML) -> None: + text_to_video = await async_client.text_to_video.create( + model="grok_imagine_1_5", + prompt_text="x", + duration=1, + ratio="1:1", + reference_audio=[ + { + "type": "audio", + "uri": "https://example.com/audio.mp3", + } + ], + references=[{"uri": "https://example.com/image.jpg"}], + resolution="480p", + ) + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_11(self, async_client: AsyncRunwayML) -> None: + response = await async_client.text_to_video.with_raw_response.create( + model="grok_imagine_1_5", + prompt_text="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_11(self, async_client: AsyncRunwayML) -> None: + async with async_client.text_to_video.with_streaming_response.create( + model="grok_imagine_1_5", + prompt_text="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + text_to_video = await response.parse() + assert_matches_type(TextToVideoCreateResponse, text_to_video, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_workflows.py b/tests/api_resources/test_workflows.py index 43f9487..02b8eb4 100644 --- a/tests/api_resources/test_workflows.py +++ b/tests/api_resources/test_workflows.py @@ -92,7 +92,7 @@ def test_method_run_with_all_params(self, client: RunwayML) -> None: workflow = client.workflows.run( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", node_outputs={ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e": { + "foo": { "foo": { "type": "primitive", "value": "string", @@ -214,7 +214,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncRunwayML) -> workflow = await async_client.workflows.run( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", node_outputs={ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e": { + "foo": { "foo": { "type": "primitive", "value": "string",