runwayml 3.1.0__tar.gz → 3.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. runwayml-3.3.0/.release-please-manifest.json +3 -0
  2. {runwayml-3.1.0 → runwayml-3.3.0}/CHANGELOG.md +32 -0
  3. {runwayml-3.1.0 → runwayml-3.3.0}/CONTRIBUTING.md +1 -2
  4. {runwayml-3.1.0 → runwayml-3.3.0}/PKG-INFO +2 -3
  5. {runwayml-3.1.0 → runwayml-3.3.0}/README.md +1 -2
  6. {runwayml-3.1.0 → runwayml-3.3.0}/SECURITY.md +2 -2
  7. {runwayml-3.1.0 → runwayml-3.3.0}/pyproject.toml +1 -1
  8. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_base_client.py +6 -0
  9. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_models.py +2 -0
  10. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_types.py +2 -0
  11. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_version.py +1 -1
  12. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/resources/text_to_image.py +12 -0
  13. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/text_to_image_create_params.py +6 -0
  14. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_client.py +54 -0
  15. runwayml-3.1.0/.release-please-manifest.json +0 -3
  16. {runwayml-3.1.0 → runwayml-3.3.0}/.gitignore +0 -0
  17. {runwayml-3.1.0 → runwayml-3.3.0}/LICENSE +0 -0
  18. {runwayml-3.1.0 → runwayml-3.3.0}/api.md +0 -0
  19. {runwayml-3.1.0 → runwayml-3.3.0}/bin/check-release-environment +0 -0
  20. {runwayml-3.1.0 → runwayml-3.3.0}/bin/publish-pypi +0 -0
  21. {runwayml-3.1.0 → runwayml-3.3.0}/examples/.keep +0 -0
  22. {runwayml-3.1.0 → runwayml-3.3.0}/mypy.ini +0 -0
  23. {runwayml-3.1.0 → runwayml-3.3.0}/noxfile.py +0 -0
  24. {runwayml-3.1.0 → runwayml-3.3.0}/release-please-config.json +0 -0
  25. {runwayml-3.1.0 → runwayml-3.3.0}/requirements-dev.lock +0 -0
  26. {runwayml-3.1.0 → runwayml-3.3.0}/requirements.lock +0 -0
  27. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/__init__.py +0 -0
  28. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_client.py +0 -0
  29. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_compat.py +0 -0
  30. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_constants.py +0 -0
  31. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_exceptions.py +0 -0
  32. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_files.py +0 -0
  33. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_qs.py +0 -0
  34. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_resource.py +0 -0
  35. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_response.py +0 -0
  36. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_streaming.py +0 -0
  37. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/__init__.py +0 -0
  38. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_logs.py +0 -0
  39. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_proxy.py +0 -0
  40. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_reflection.py +0 -0
  41. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_resources_proxy.py +0 -0
  42. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_streams.py +0 -0
  43. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_sync.py +0 -0
  44. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_transform.py +0 -0
  45. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_typing.py +0 -0
  46. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/_utils/_utils.py +0 -0
  47. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/lib/.keep +0 -0
  48. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/py.typed +0 -0
  49. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/resources/__init__.py +0 -0
  50. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/resources/image_to_video.py +0 -0
  51. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/resources/organization.py +0 -0
  52. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/resources/tasks.py +0 -0
  53. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/__init__.py +0 -0
  54. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/image_to_video_create_params.py +0 -0
  55. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/image_to_video_create_response.py +0 -0
  56. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/organization_retrieve_response.py +0 -0
  57. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/task_retrieve_response.py +0 -0
  58. {runwayml-3.1.0 → runwayml-3.3.0}/src/runwayml/types/text_to_image_create_response.py +0 -0
  59. {runwayml-3.1.0 → runwayml-3.3.0}/tests/__init__.py +0 -0
  60. {runwayml-3.1.0 → runwayml-3.3.0}/tests/api_resources/__init__.py +0 -0
  61. {runwayml-3.1.0 → runwayml-3.3.0}/tests/api_resources/test_image_to_video.py +0 -0
  62. {runwayml-3.1.0 → runwayml-3.3.0}/tests/api_resources/test_organization.py +0 -0
  63. {runwayml-3.1.0 → runwayml-3.3.0}/tests/api_resources/test_tasks.py +0 -0
  64. {runwayml-3.1.0 → runwayml-3.3.0}/tests/api_resources/test_text_to_image.py +0 -0
  65. {runwayml-3.1.0 → runwayml-3.3.0}/tests/conftest.py +0 -0
  66. {runwayml-3.1.0 → runwayml-3.3.0}/tests/sample_file.txt +0 -0
  67. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_deepcopy.py +0 -0
  68. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_extract_files.py +0 -0
  69. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_files.py +0 -0
  70. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_models.py +0 -0
  71. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_qs.py +0 -0
  72. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_required_args.py +0 -0
  73. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_response.py +0 -0
  74. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_streaming.py +0 -0
  75. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_transform.py +0 -0
  76. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_utils/test_proxy.py +0 -0
  77. {runwayml-3.1.0 → runwayml-3.3.0}/tests/test_utils/test_typing.py +0 -0
  78. {runwayml-3.1.0 → runwayml-3.3.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.3.0"
3
+ }
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.3.0 (2025-06-04)
4
+
5
+ Full Changelog: [v3.2.0...v3.3.0](https://github.com/runwayml/sdk-python/compare/v3.2.0...v3.3.0)
6
+
7
+ ### Features
8
+
9
+ * **client:** add follow_redirects request option ([742ca3b](https://github.com/runwayml/sdk-python/commit/742ca3bbd1f38ce28ef26ddee06d4c86cd2a6ff0))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **docs:** fix confusing example in README ([54904f7](https://github.com/runwayml/sdk-python/commit/54904f7ed5557b5b3972fc25d52ffc873d91be7e))
15
+
16
+
17
+ ### Chores
18
+
19
+ * **docs:** remove reference to rye shell ([e207562](https://github.com/runwayml/sdk-python/commit/e207562118ec1583e90639bbfc6cea00f4bed138))
20
+ * **docs:** remove unnecessary param examples ([d1ca063](https://github.com/runwayml/sdk-python/commit/d1ca06303f764543beda582da567ad182f25cf86))
21
+
22
+ ## 3.2.0 (2025-05-29)
23
+
24
+ Full Changelog: [v3.1.0...v3.2.0](https://github.com/runwayml/sdk-python/compare/v3.1.0...v3.2.0)
25
+
26
+ ### Features
27
+
28
+ * **api:** Add 720p t2i ratios ([b722686](https://github.com/runwayml/sdk-python/commit/b722686c0e4fa03768ce61380c77fe04c93cfc90))
29
+
30
+
31
+ ### Chores
32
+
33
+ * **docs:** grammar improvements ([fbf2481](https://github.com/runwayml/sdk-python/commit/fbf2481cd6da85fb5ce2e6fea66cf8f1233a8e2e))
34
+
3
35
  ## 3.1.0 (2025-05-16)
4
36
 
5
37
  Full Changelog: [v3.0.6...v3.1.0](https://github.com/runwayml/sdk-python/compare/v3.0.6...v3.1.0)
@@ -17,8 +17,7 @@ $ rye sync --all-features
17
17
  You can then run scripts using `rye run python script.py` or by activating the virtual environment:
18
18
 
19
19
  ```sh
20
- $ rye shell
21
- # or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20
+ # Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
22
21
  $ source .venv/bin/activate
23
22
 
24
23
  # now you can omit the `rye run` prefix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.1.0
3
+ Version: 3.3.0
4
4
  Summary: The official Python library for the runwayml API
5
5
  Project-URL: Homepage, https://github.com/runwayml/sdk-python
6
6
  Project-URL: Repository, https://github.com/runwayml/sdk-python
@@ -127,9 +127,8 @@ text_to_image = client.text_to_image.create(
127
127
  model="gen4_image",
128
128
  prompt_text="promptText",
129
129
  ratio="1920:1080",
130
- content_moderation={"public_figure_threshold": "auto"},
131
130
  )
132
- print(text_to_image.content_moderation)
131
+ print(text_to_image.id)
133
132
  ```
134
133
 
135
134
  ## Handling errors
@@ -96,9 +96,8 @@ text_to_image = client.text_to_image.create(
96
96
  model="gen4_image",
97
97
  prompt_text="promptText",
98
98
  ratio="1920:1080",
99
- content_moderation={"public_figure_threshold": "auto"},
100
99
  )
101
- print(text_to_image.content_moderation)
100
+ print(text_to_image.id)
102
101
  ```
103
102
 
104
103
  ## Handling errors
@@ -16,11 +16,11 @@ before making any information public.
16
16
  ## Reporting Non-SDK Related Security Issues
17
17
 
18
18
  If you encounter security issues that are not directly related to SDKs but pertain to the services
19
- or products provided by RunwayML please follow the respective company's security reporting guidelines.
19
+ or products provided by RunwayML, please follow the respective company's security reporting guidelines.
20
20
 
21
21
  ### RunwayML Terms and Policies
22
22
 
23
- Please contact dev-feedback@runwayml.com for any questions or concerns regarding security of our services.
23
+ Please contact dev-feedback@runwayml.com for any questions or concerns regarding the security of our services.
24
24
 
25
25
  ---
26
26
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.1.0"
3
+ version = "3.3.0"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
960
960
  if self.custom_auth is not None:
961
961
  kwargs["auth"] = self.custom_auth
962
962
 
963
+ if options.follow_redirects is not None:
964
+ kwargs["follow_redirects"] = options.follow_redirects
965
+
963
966
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964
967
 
965
968
  response = None
@@ -1460,6 +1463,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1460
1463
  if self.custom_auth is not None:
1461
1464
  kwargs["auth"] = self.custom_auth
1462
1465
 
1466
+ if options.follow_redirects is not None:
1467
+ kwargs["follow_redirects"] = options.follow_redirects
1468
+
1463
1469
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
1464
1470
 
1465
1471
  response = None
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737
737
  idempotency_key: str
738
738
  json_data: Body
739
739
  extra_json: AnyMapping
740
+ follow_redirects: bool
740
741
 
741
742
 
742
743
  @final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750
751
  files: Union[HttpxRequestFiles, None] = None
751
752
  idempotency_key: Union[str, None] = None
752
753
  post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754
+ follow_redirects: Union[bool, None] = None
753
755
 
754
756
  # It should be noted that we cannot use `json` here as that would override
755
757
  # a BaseModel method in an incompatible fashion.
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100
100
  params: Query
101
101
  extra_json: AnyMapping
102
102
  idempotency_key: str
103
+ follow_redirects: bool
103
104
 
104
105
 
105
106
  # Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215
216
 
216
217
  class HttpxSendArgs(TypedDict, total=False):
217
218
  auth: httpx.Auth
219
+ follow_redirects: bool
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "runwayml"
4
- __version__ = "3.1.0" # x-release-please-version
4
+ __version__ = "3.3.0" # x-release-please-version
@@ -60,6 +60,12 @@ class TextToImageResource(SyncAPIResource):
60
60
  "1080:1440",
61
61
  "1808:768",
62
62
  "2112:912",
63
+ "1280:720",
64
+ "720:1280",
65
+ "720:720",
66
+ "960:720",
67
+ "720:960",
68
+ "1680:720",
63
69
  ],
64
70
  content_moderation: text_to_image_create_params.ContentModeration | NotGiven = NOT_GIVEN,
65
71
  reference_images: Iterable[text_to_image_create_params.ReferenceImage] | NotGiven = NOT_GIVEN,
@@ -155,6 +161,12 @@ class AsyncTextToImageResource(AsyncAPIResource):
155
161
  "1080:1440",
156
162
  "1808:768",
157
163
  "2112:912",
164
+ "1280:720",
165
+ "720:1280",
166
+ "720:720",
167
+ "960:720",
168
+ "720:960",
169
+ "1680:720",
158
170
  ],
159
171
  content_moderation: text_to_image_create_params.ContentModeration | NotGiven = NOT_GIVEN,
160
172
  reference_images: Iterable[text_to_image_create_params.ReferenceImage] | NotGiven = NOT_GIVEN,
@@ -32,6 +32,12 @@ class TextToImageCreateParams(TypedDict, total=False):
32
32
  "1080:1440",
33
33
  "1808:768",
34
34
  "2112:912",
35
+ "1280:720",
36
+ "720:1280",
37
+ "720:720",
38
+ "960:720",
39
+ "720:960",
40
+ "1680:720",
35
41
  ]
36
42
  ]
37
43
  """The resolution of the output image(s)."""
@@ -852,6 +852,33 @@ class TestRunwayML:
852
852
 
853
853
  assert response.http_request.headers.get("x-stainless-retry-count") == "42"
854
854
 
855
+ @pytest.mark.respx(base_url=base_url)
856
+ def test_follow_redirects(self, respx_mock: MockRouter) -> None:
857
+ # Test that the default follow_redirects=True allows following redirects
858
+ respx_mock.post("/redirect").mock(
859
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
860
+ )
861
+ respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
862
+
863
+ response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
864
+ assert response.status_code == 200
865
+ assert response.json() == {"status": "ok"}
866
+
867
+ @pytest.mark.respx(base_url=base_url)
868
+ def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
869
+ # Test that follow_redirects=False prevents following redirects
870
+ respx_mock.post("/redirect").mock(
871
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
872
+ )
873
+
874
+ with pytest.raises(APIStatusError) as exc_info:
875
+ self.client.post(
876
+ "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
877
+ )
878
+
879
+ assert exc_info.value.response.status_code == 302
880
+ assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
881
+
855
882
 
856
883
  class TestAsyncRunwayML:
857
884
  client = AsyncRunwayML(base_url=base_url, api_key=api_key, _strict_response_validation=True)
@@ -1709,3 +1736,30 @@ class TestAsyncRunwayML:
1709
1736
  raise AssertionError("calling get_platform using asyncify resulted in a hung process")
1710
1737
 
1711
1738
  time.sleep(0.1)
1739
+
1740
+ @pytest.mark.respx(base_url=base_url)
1741
+ async def test_follow_redirects(self, respx_mock: MockRouter) -> None:
1742
+ # Test that the default follow_redirects=True allows following redirects
1743
+ respx_mock.post("/redirect").mock(
1744
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
1745
+ )
1746
+ respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
1747
+
1748
+ response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
1749
+ assert response.status_code == 200
1750
+ assert response.json() == {"status": "ok"}
1751
+
1752
+ @pytest.mark.respx(base_url=base_url)
1753
+ async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
1754
+ # Test that follow_redirects=False prevents following redirects
1755
+ respx_mock.post("/redirect").mock(
1756
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
1757
+ )
1758
+
1759
+ with pytest.raises(APIStatusError) as exc_info:
1760
+ await self.client.post(
1761
+ "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
1762
+ )
1763
+
1764
+ assert exc_info.value.response.status_code == 302
1765
+ assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.1.0"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes