runwayml 2.2.1__tar.gz → 2.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.
- runwayml-2.3.0/.release-please-manifest.json +3 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/CHANGELOG.md +26 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/PKG-INFO +1 -1
- {runwayml-2.2.1 → runwayml-2.3.0}/pyproject.toml +1 -1
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_base_client.py +1 -1
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_sync.py +17 -2
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_version.py +1 -1
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_client.py +30 -16
- runwayml-2.2.1/.release-please-manifest.json +0 -3
- {runwayml-2.2.1 → runwayml-2.3.0}/.gitignore +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/CONTRIBUTING.md +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/LICENSE +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/README.md +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/SECURITY.md +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/api.md +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/bin/check-release-environment +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/bin/publish-pypi +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/examples/.keep +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/mypy.ini +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/noxfile.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/release-please-config.json +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/requirements-dev.lock +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/requirements.lock +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_client.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_compat.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_constants.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_exceptions.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_files.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_models.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_qs.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_resource.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_response.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_streaming.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_types.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_logs.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_proxy.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_reflection.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_streams.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_transform.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_typing.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/_utils/_utils.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/lib/.keep +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/py.typed +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/resources/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/resources/image_to_video.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/resources/tasks.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/types/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/types/image_to_video_create_params.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/types/image_to_video_create_response.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/src/runwayml/types/task_retrieve_response.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/api_resources/__init__.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/api_resources/test_image_to_video.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/api_resources/test_tasks.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/conftest.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/sample_file.txt +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_deepcopy.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_extract_files.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_files.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_models.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_qs.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_required_args.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_response.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_streaming.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_transform.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_utils/test_proxy.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/test_utils/test_typing.py +0 -0
- {runwayml-2.2.1 → runwayml-2.3.0}/tests/utils.py +0 -0
@@ -1,5 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.3.0 (2025-02-21)
|
4
|
+
|
5
|
+
Full Changelog: [v2.2.2...v2.3.0](https://github.com/runwayml/sdk-python/compare/v2.2.2...v2.3.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **client:** allow passing `NotGiven` for body ([#98](https://github.com/runwayml/sdk-python/issues/98)) ([fda401a](https://github.com/runwayml/sdk-python/commit/fda401a98a454b01de764269afb32492a38494d6))
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* **client:** mark some request bodies as optional ([fda401a](https://github.com/runwayml/sdk-python/commit/fda401a98a454b01de764269afb32492a38494d6))
|
15
|
+
|
16
|
+
## 2.2.2 (2025-02-14)
|
17
|
+
|
18
|
+
Full Changelog: [v2.2.1...v2.2.2](https://github.com/runwayml/sdk-python/compare/v2.2.1...v2.2.2)
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* asyncify on non-asyncio runtimes ([#96](https://github.com/runwayml/sdk-python/issues/96)) ([c478bc7](https://github.com/runwayml/sdk-python/commit/c478bc7b5115c637a31cb7a0a60a35265500120a))
|
23
|
+
|
24
|
+
|
25
|
+
### Chores
|
26
|
+
|
27
|
+
* **internal:** update client tests ([#94](https://github.com/runwayml/sdk-python/issues/94)) ([d8892cd](https://github.com/runwayml/sdk-python/commit/d8892cd6e439347c04fb7ba1e97abb421803f379))
|
28
|
+
|
3
29
|
## 2.2.1 (2025-02-07)
|
4
30
|
|
5
31
|
Full Changelog: [v2.2.0...v2.2.1](https://github.com/runwayml/sdk-python/compare/v2.2.0...v2.2.1)
|
@@ -518,7 +518,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
518
518
|
# so that passing a `TypedDict` doesn't cause an error.
|
519
519
|
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
|
520
520
|
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
|
521
|
-
json=json_data,
|
521
|
+
json=json_data if is_given(json_data) else None,
|
522
522
|
files=files,
|
523
523
|
**kwargs,
|
524
524
|
)
|
@@ -7,16 +7,20 @@ import contextvars
|
|
7
7
|
from typing import Any, TypeVar, Callable, Awaitable
|
8
8
|
from typing_extensions import ParamSpec
|
9
9
|
|
10
|
+
import anyio
|
11
|
+
import sniffio
|
12
|
+
import anyio.to_thread
|
13
|
+
|
10
14
|
T_Retval = TypeVar("T_Retval")
|
11
15
|
T_ParamSpec = ParamSpec("T_ParamSpec")
|
12
16
|
|
13
17
|
|
14
18
|
if sys.version_info >= (3, 9):
|
15
|
-
|
19
|
+
_asyncio_to_thread = asyncio.to_thread
|
16
20
|
else:
|
17
21
|
# backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
|
18
22
|
# for Python 3.8 support
|
19
|
-
async def
|
23
|
+
async def _asyncio_to_thread(
|
20
24
|
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
21
25
|
) -> Any:
|
22
26
|
"""Asynchronously run function *func* in a separate thread.
|
@@ -34,6 +38,17 @@ else:
|
|
34
38
|
return await loop.run_in_executor(None, func_call)
|
35
39
|
|
36
40
|
|
41
|
+
async def to_thread(
|
42
|
+
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
43
|
+
) -> T_Retval:
|
44
|
+
if sniffio.current_async_library() == "asyncio":
|
45
|
+
return await _asyncio_to_thread(func, *args, **kwargs)
|
46
|
+
|
47
|
+
return await anyio.to_thread.run_sync(
|
48
|
+
functools.partial(func, *args, **kwargs),
|
49
|
+
)
|
50
|
+
|
51
|
+
|
37
52
|
# inspired by `asyncer`, https://github.com/tiangolo/asyncer
|
38
53
|
def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
|
39
54
|
"""
|
@@ -23,6 +23,7 @@ from pydantic import ValidationError
|
|
23
23
|
|
24
24
|
from runwayml import RunwayML, AsyncRunwayML, APIResponseValidationError
|
25
25
|
from runwayml._types import Omit
|
26
|
+
from runwayml._utils import maybe_transform
|
26
27
|
from runwayml._models import BaseModel, FinalRequestOptions
|
27
28
|
from runwayml._constants import RAW_RESPONSE_HEADER
|
28
29
|
from runwayml._exceptions import RunwayMLError, APIStatusError, APITimeoutError, APIResponseValidationError
|
@@ -32,6 +33,7 @@ from runwayml._base_client import (
|
|
32
33
|
BaseClient,
|
33
34
|
make_request_options,
|
34
35
|
)
|
36
|
+
from runwayml.types.image_to_video_create_params import ImageToVideoCreateParams
|
35
37
|
|
36
38
|
from .utils import update_env
|
37
39
|
|
@@ -719,10 +721,13 @@ class TestRunwayML:
|
|
719
721
|
"/v1/image_to_video",
|
720
722
|
body=cast(
|
721
723
|
object,
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
724
|
+
maybe_transform(
|
725
|
+
dict(
|
726
|
+
model="gen3a_turbo",
|
727
|
+
prompt_image="https://example.com/assets/bunny.jpg",
|
728
|
+
prompt_text="The bunny is eating a carrot",
|
729
|
+
),
|
730
|
+
ImageToVideoCreateParams,
|
726
731
|
),
|
727
732
|
),
|
728
733
|
cast_to=httpx.Response,
|
@@ -741,10 +746,13 @@ class TestRunwayML:
|
|
741
746
|
"/v1/image_to_video",
|
742
747
|
body=cast(
|
743
748
|
object,
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
749
|
+
maybe_transform(
|
750
|
+
dict(
|
751
|
+
model="gen3a_turbo",
|
752
|
+
prompt_image="https://example.com/assets/bunny.jpg",
|
753
|
+
prompt_text="The bunny is eating a carrot",
|
754
|
+
),
|
755
|
+
ImageToVideoCreateParams,
|
748
756
|
),
|
749
757
|
),
|
750
758
|
cast_to=httpx.Response,
|
@@ -1515,10 +1523,13 @@ class TestAsyncRunwayML:
|
|
1515
1523
|
"/v1/image_to_video",
|
1516
1524
|
body=cast(
|
1517
1525
|
object,
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1526
|
+
maybe_transform(
|
1527
|
+
dict(
|
1528
|
+
model="gen3a_turbo",
|
1529
|
+
prompt_image="https://example.com/assets/bunny.jpg",
|
1530
|
+
prompt_text="The bunny is eating a carrot",
|
1531
|
+
),
|
1532
|
+
ImageToVideoCreateParams,
|
1522
1533
|
),
|
1523
1534
|
),
|
1524
1535
|
cast_to=httpx.Response,
|
@@ -1537,10 +1548,13 @@ class TestAsyncRunwayML:
|
|
1537
1548
|
"/v1/image_to_video",
|
1538
1549
|
body=cast(
|
1539
1550
|
object,
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1551
|
+
maybe_transform(
|
1552
|
+
dict(
|
1553
|
+
model="gen3a_turbo",
|
1554
|
+
prompt_image="https://example.com/assets/bunny.jpg",
|
1555
|
+
prompt_text="The bunny is eating a carrot",
|
1556
|
+
),
|
1557
|
+
ImageToVideoCreateParams,
|
1544
1558
|
),
|
1545
1559
|
),
|
1546
1560
|
cast_to=httpx.Response,
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|