runwayml 3.10.2__tar.gz → 3.11.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 (94) hide show
  1. runwayml-3.11.0/.release-please-manifest.json +3 -0
  2. {runwayml-3.10.2 → runwayml-3.11.0}/CHANGELOG.md +16 -0
  3. {runwayml-3.10.2 → runwayml-3.11.0}/PKG-INFO +1 -1
  4. {runwayml-3.10.2 → runwayml-3.11.0}/pyproject.toml +1 -1
  5. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_types.py +35 -1
  6. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/__init__.py +1 -0
  7. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_transform.py +6 -0
  8. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_typing.py +5 -0
  9. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_version.py +1 -1
  10. {runwayml-3.10.2 → runwayml-3.11.0}/tests/utils.py +9 -1
  11. runwayml-3.10.2/.release-please-manifest.json +0 -3
  12. {runwayml-3.10.2 → runwayml-3.11.0}/.gitignore +0 -0
  13. {runwayml-3.10.2 → runwayml-3.11.0}/CONTRIBUTING.md +0 -0
  14. {runwayml-3.10.2 → runwayml-3.11.0}/LICENSE +0 -0
  15. {runwayml-3.10.2 → runwayml-3.11.0}/README.md +0 -0
  16. {runwayml-3.10.2 → runwayml-3.11.0}/SECURITY.md +0 -0
  17. {runwayml-3.10.2 → runwayml-3.11.0}/api.md +0 -0
  18. {runwayml-3.10.2 → runwayml-3.11.0}/bin/check-release-environment +0 -0
  19. {runwayml-3.10.2 → runwayml-3.11.0}/bin/publish-pypi +0 -0
  20. {runwayml-3.10.2 → runwayml-3.11.0}/examples/.keep +0 -0
  21. {runwayml-3.10.2 → runwayml-3.11.0}/examples/generate_image.py +0 -0
  22. {runwayml-3.10.2 → runwayml-3.11.0}/mypy.ini +0 -0
  23. {runwayml-3.10.2 → runwayml-3.11.0}/noxfile.py +0 -0
  24. {runwayml-3.10.2 → runwayml-3.11.0}/release-please-config.json +0 -0
  25. {runwayml-3.10.2 → runwayml-3.11.0}/requirements-dev.lock +0 -0
  26. {runwayml-3.10.2 → runwayml-3.11.0}/requirements.lock +0 -0
  27. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/__init__.py +0 -0
  28. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_base_client.py +0 -0
  29. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_client.py +0 -0
  30. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_compat.py +0 -0
  31. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_constants.py +0 -0
  32. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_exceptions.py +0 -0
  33. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_files.py +0 -0
  34. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_models.py +0 -0
  35. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_qs.py +0 -0
  36. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_resource.py +0 -0
  37. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_response.py +0 -0
  38. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_streaming.py +0 -0
  39. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_logs.py +0 -0
  40. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_proxy.py +0 -0
  41. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_reflection.py +0 -0
  42. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_resources_proxy.py +0 -0
  43. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_streams.py +0 -0
  44. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_sync.py +0 -0
  45. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/_utils/_utils.py +0 -0
  46. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/lib/.keep +0 -0
  47. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/lib/polling.py +0 -0
  48. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/py.typed +0 -0
  49. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/__init__.py +0 -0
  50. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/character_performance.py +0 -0
  51. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/image_to_video.py +0 -0
  52. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/organization.py +0 -0
  53. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/tasks.py +0 -0
  54. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/text_to_image.py +0 -0
  55. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/video_to_video.py +0 -0
  56. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/resources/video_upscale.py +0 -0
  57. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/__init__.py +0 -0
  58. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/character_performance_create_params.py +0 -0
  59. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/character_performance_create_response.py +0 -0
  60. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/image_to_video_create_params.py +0 -0
  61. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/image_to_video_create_response.py +0 -0
  62. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/organization_retrieve_response.py +0 -0
  63. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/organization_retrieve_usage_params.py +0 -0
  64. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/organization_retrieve_usage_response.py +0 -0
  65. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/task_retrieve_response.py +0 -0
  66. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/text_to_image_create_params.py +0 -0
  67. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/text_to_image_create_response.py +0 -0
  68. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/video_to_video_create_params.py +0 -0
  69. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/video_to_video_create_response.py +0 -0
  70. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/video_upscale_create_params.py +0 -0
  71. {runwayml-3.10.2 → runwayml-3.11.0}/src/runwayml/types/video_upscale_create_response.py +0 -0
  72. {runwayml-3.10.2 → runwayml-3.11.0}/tests/__init__.py +0 -0
  73. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/__init__.py +0 -0
  74. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_character_performance.py +0 -0
  75. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_image_to_video.py +0 -0
  76. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_organization.py +0 -0
  77. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_tasks.py +0 -0
  78. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_text_to_image.py +0 -0
  79. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_video_to_video.py +0 -0
  80. {runwayml-3.10.2 → runwayml-3.11.0}/tests/api_resources/test_video_upscale.py +0 -0
  81. {runwayml-3.10.2 → runwayml-3.11.0}/tests/conftest.py +0 -0
  82. {runwayml-3.10.2 → runwayml-3.11.0}/tests/sample_file.txt +0 -0
  83. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_client.py +0 -0
  84. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_deepcopy.py +0 -0
  85. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_extract_files.py +0 -0
  86. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_files.py +0 -0
  87. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_models.py +0 -0
  88. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_qs.py +0 -0
  89. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_required_args.py +0 -0
  90. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_response.py +0 -0
  91. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_streaming.py +0 -0
  92. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_transform.py +0 -0
  93. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_utils/test_proxy.py +0 -0
  94. {runwayml-3.10.2 → runwayml-3.11.0}/tests/test_utils/test_typing.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.11.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.11.0 (2025-09-03)
4
+
5
+ Full Changelog: [v3.10.3...v3.11.0](https://github.com/runwayml/sdk-python/compare/v3.10.3...v3.11.0)
6
+
7
+ ### Features
8
+
9
+ * **types:** replace List[str] with SequenceNotStr in params ([a55b44c](https://github.com/runwayml/sdk-python/commit/a55b44c27da0e2cbcfaefa753e6b2a1a351df126))
10
+
11
+ ## 3.10.3 (2025-08-30)
12
+
13
+ Full Changelog: [v3.10.2...v3.10.3](https://github.com/runwayml/sdk-python/compare/v3.10.2...v3.10.3)
14
+
15
+ ### Chores
16
+
17
+ * **internal:** add Sequence related utils ([520aeec](https://github.com/runwayml/sdk-python/commit/520aeecbeaf7f2891066ae4d7c880f7aa27d0522))
18
+
3
19
  ## 3.10.2 (2025-08-27)
4
20
 
5
21
  Full Changelog: [v3.10.1...v3.10.2](https://github.com/runwayml/sdk-python/compare/v3.10.1...v3.10.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.10.2
3
+ Version: 3.11.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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.10.2"
3
+ version = "3.11.0"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -13,10 +13,21 @@ from typing import (
13
13
  Mapping,
14
14
  TypeVar,
15
15
  Callable,
16
+ Iterator,
16
17
  Optional,
17
18
  Sequence,
18
19
  )
19
- from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable
20
+ from typing_extensions import (
21
+ Set,
22
+ Literal,
23
+ Protocol,
24
+ TypeAlias,
25
+ TypedDict,
26
+ SupportsIndex,
27
+ overload,
28
+ override,
29
+ runtime_checkable,
30
+ )
20
31
 
21
32
  import httpx
22
33
  import pydantic
@@ -217,3 +228,26 @@ class _GenericAlias(Protocol):
217
228
  class HttpxSendArgs(TypedDict, total=False):
218
229
  auth: httpx.Auth
219
230
  follow_redirects: bool
231
+
232
+
233
+ _T_co = TypeVar("_T_co", covariant=True)
234
+
235
+
236
+ if TYPE_CHECKING:
237
+ # This works because str.__contains__ does not accept object (either in typeshed or at runtime)
238
+ # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
239
+ class SequenceNotStr(Protocol[_T_co]):
240
+ @overload
241
+ def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
242
+ @overload
243
+ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
244
+ def __contains__(self, value: object, /) -> bool: ...
245
+ def __len__(self) -> int: ...
246
+ def __iter__(self) -> Iterator[_T_co]: ...
247
+ def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
248
+ def count(self, value: Any, /) -> int: ...
249
+ def __reversed__(self) -> Iterator[_T_co]: ...
250
+ else:
251
+ # just point this to a normal `Sequence` at runtime to avoid having to special case
252
+ # deserializing our custom sequence type
253
+ SequenceNotStr = Sequence
@@ -38,6 +38,7 @@ from ._typing import (
38
38
  extract_type_arg as extract_type_arg,
39
39
  is_iterable_type as is_iterable_type,
40
40
  is_required_type as is_required_type,
41
+ is_sequence_type as is_sequence_type,
41
42
  is_annotated_type as is_annotated_type,
42
43
  is_type_alias_type as is_type_alias_type,
43
44
  strip_annotated_type as strip_annotated_type,
@@ -16,6 +16,7 @@ from ._utils import (
16
16
  lru_cache,
17
17
  is_mapping,
18
18
  is_iterable,
19
+ is_sequence,
19
20
  )
20
21
  from .._files import is_base64_file_input
21
22
  from ._typing import (
@@ -24,6 +25,7 @@ from ._typing import (
24
25
  extract_type_arg,
25
26
  is_iterable_type,
26
27
  is_required_type,
28
+ is_sequence_type,
27
29
  is_annotated_type,
28
30
  strip_annotated_type,
29
31
  )
@@ -184,6 +186,8 @@ def _transform_recursive(
184
186
  (is_list_type(stripped_type) and is_list(data))
185
187
  # Iterable[T]
186
188
  or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
189
+ # Sequence[T]
190
+ or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str))
187
191
  ):
188
192
  # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
189
193
  # intended as an iterable, so we don't transform it.
@@ -346,6 +350,8 @@ async def _async_transform_recursive(
346
350
  (is_list_type(stripped_type) and is_list(data))
347
351
  # Iterable[T]
348
352
  or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
353
+ # Sequence[T]
354
+ or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str))
349
355
  ):
350
356
  # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
351
357
  # intended as an iterable, so we don't transform it.
@@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool:
26
26
  return (get_origin(typ) or typ) == list
27
27
 
28
28
 
29
+ def is_sequence_type(typ: type) -> bool:
30
+ origin = get_origin(typ) or typ
31
+ return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence
32
+
33
+
29
34
  def is_iterable_type(typ: type) -> bool:
30
35
  """If the given type is `typing.Iterable[T]`"""
31
36
  origin = get_origin(typ) or typ
@@ -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.10.2" # x-release-please-version
4
+ __version__ = "3.11.0" # x-release-please-version
@@ -4,7 +4,7 @@ import os
4
4
  import inspect
5
5
  import traceback
6
6
  import contextlib
7
- from typing import Any, TypeVar, Iterator, cast
7
+ from typing import Any, TypeVar, Iterator, Sequence, cast
8
8
  from datetime import date, datetime
9
9
  from typing_extensions import Literal, get_args, get_origin, assert_type
10
10
 
@@ -15,6 +15,7 @@ from runwayml._utils import (
15
15
  is_list_type,
16
16
  is_union_type,
17
17
  extract_type_arg,
18
+ is_sequence_type,
18
19
  is_annotated_type,
19
20
  is_type_alias_type,
20
21
  )
@@ -71,6 +72,13 @@ def assert_matches_type(
71
72
  if is_list_type(type_):
72
73
  return _assert_list_type(type_, value)
73
74
 
75
+ if is_sequence_type(type_):
76
+ assert isinstance(value, Sequence)
77
+ inner_type = get_args(type_)[0]
78
+ for entry in value: # type: ignore
79
+ assert_type(inner_type, entry) # type: ignore
80
+ return
81
+
74
82
  if origin == str:
75
83
  assert isinstance(value, str)
76
84
  elif origin == int:
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.10.2"
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