runapi-muse-video 0.3.0__py3-none-any.whl

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.
@@ -0,0 +1,6 @@
1
+ """RunAPI Muse Video SDK."""
2
+
3
+ from .client import MuseVideoClient
4
+ from .resources import ImageToVideo, TextToVideo
5
+
6
+ __all__ = ["MuseVideoClient", "TextToVideo", "ImageToVideo"]
@@ -0,0 +1,16 @@
1
+ """Muse Video client."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any, Optional
6
+ from runapi.core import ProviderClient
7
+ from .resources import ImageToVideo, TextToVideo
8
+
9
+
10
+ class MuseVideoClient(ProviderClient):
11
+ """Text-to-video and image-to-video API client."""
12
+
13
+ def __init__(self, api_key: Optional[str] = None, **options: Any) -> None:
14
+ super().__init__(api_key, **options)
15
+ self.text_to_video = TextToVideo(self._http)
16
+ self.image_to_video = ImageToVideo(self._http)
File without changes
@@ -0,0 +1,6 @@
1
+ """Muse Video resources."""
2
+
3
+ from .image_to_video import ImageToVideo
4
+ from .text_to_video import TextToVideo
5
+
6
+ __all__ = ["TextToVideo", "ImageToVideo"]
@@ -0,0 +1,21 @@
1
+ """Image-to-video resource."""
2
+
3
+ from __future__ import annotations
4
+ from typing import Any, Optional
5
+ from runapi.core import Resource, RequestOptions
6
+
7
+
8
+ class ImageToVideo(Resource):
9
+ """Animate a source image with a text prompt."""
10
+
11
+ ENDPOINT = "/api/v1/muse_video/image_to_video"
12
+
13
+ def create(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
14
+ return self._request("post", self.ENDPOINT, body=self._compact_params(params), options=options)
15
+
16
+ def get(self, id: str, options: Optional[RequestOptions] = None) -> Any:
17
+ return self._request("get", f"{self.ENDPOINT}/{id}", options=options)
18
+
19
+ def run(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
20
+ task = self.create(options=options, **params)
21
+ return self._poll_until_complete(lambda: self.get(task.id, options=options))
@@ -0,0 +1,21 @@
1
+ """Text-to-video resource."""
2
+
3
+ from __future__ import annotations
4
+ from typing import Any, Optional
5
+ from runapi.core import Resource, RequestOptions
6
+
7
+
8
+ class TextToVideo(Resource):
9
+ """Generate a video from a text prompt."""
10
+
11
+ ENDPOINT = "/api/v1/muse_video/text_to_video"
12
+
13
+ def create(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
14
+ return self._request("post", self.ENDPOINT, body=self._compact_params(params), options=options)
15
+
16
+ def get(self, id: str, options: Optional[RequestOptions] = None) -> Any:
17
+ return self._request("get", f"{self.ENDPOINT}/{id}", options=options)
18
+
19
+ def run(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
20
+ task = self.create(options=options, **params)
21
+ return self._poll_until_complete(lambda: self.get(task.id, options=options))
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.5
2
+ Name: runapi-muse-video
3
+ Version: 0.3.0
4
+ Summary: RunAPI Muse Video SDK for text-to-video and single-image-to-video workflows in JavaScript, Python, Ruby, Go, and Java
5
+ Project-URL: Homepage, https://runapi.ai/models/muse-video
6
+ Project-URL: Documentation, https://runapi.ai/docs/resources/sdks
7
+ Project-URL: Source, https://github.com/runapi-ai/muse-video-sdk
8
+ Project-URL: Issues, https://github.com/runapi-ai/muse-video-sdk/issues
9
+ Project-URL: Changelog, https://github.com/runapi-ai/muse-video-sdk/blob/main/CHANGELOG.md
10
+ Project-URL: Release Notes, https://github.com/runapi-ai/muse-video-sdk/releases/tag/python%2Fv0.3.0
11
+ Author-email: RunAPI <contact@runapi.ai>
12
+ License-Expression: Apache-2.0
13
+ Keywords: api,golang,gradle,image-to-video,java,maven,muse-video,python,ruby,runapi,runapi-ai,sdk,text-to-video,typescript,video-generation
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: runapi-core~=0.12.0
16
+ Description-Content-Type: text/markdown
17
+
18
+ # RunAPI Muse Video Python SDK
19
+
20
+ Generate videos from text prompts or a source image with the RunAPI API.
@@ -0,0 +1,9 @@
1
+ runapi/muse_video/__init__.py,sha256=xuF433GgqqDoSs0sUPRLzM9kVD-e7jbas23NAV8vs64,177
2
+ runapi/muse_video/client.py,sha256=RVKcNTHG195BCAbbG-POdZYkYo3qM7p3v-AiHcciIn8,512
3
+ runapi/muse_video/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ runapi/muse_video/resources/__init__.py,sha256=Gq4jUR15L7mRN91sah_oF4QWO0XRXCkWFVYXeV8WoYY,152
5
+ runapi/muse_video/resources/image_to_video.py,sha256=u-hA81CjMW_rYruFEJBuMApH6T4zDaObOqTUJZRaZyA,856
6
+ runapi/muse_video/resources/text_to_video.py,sha256=xUVX_9_bfs1jQMMx5w5jNkqae-iWgJ47MTppDf7vktA,847
7
+ runapi_muse_video-0.3.0.dist-info/METADATA,sha256=eXaGUFtjs5HcMUUj0hpeXcptcs_0JDJql8lL7phGykI,1059
8
+ runapi_muse_video-0.3.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
9
+ runapi_muse_video-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any