Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/runwayml/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from . import resources, _exceptions
from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Expand All @@ -24,6 +24,7 @@
get_async_library,
)
from ._version import __version__
from .resources import tasks, image_to_video
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import RunwayMLError, APIStatusError
from ._base_client import (
Expand All @@ -37,7 +38,6 @@
"Transport",
"ProxiesTypes",
"RequestOptions",
"resources",
"RunwayML",
"AsyncRunwayML",
"Client",
Expand All @@ -46,8 +46,8 @@


class RunwayML(SyncAPIClient):
tasks: resources.TasksResource
image_to_video: resources.ImageToVideoResource
tasks: tasks.TasksResource
image_to_video: image_to_video.ImageToVideoResource
with_raw_response: RunwayMLWithRawResponse
with_streaming_response: RunwayMLWithStreamedResponse

Expand Down Expand Up @@ -111,8 +111,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.tasks = resources.TasksResource(self)
self.image_to_video = resources.ImageToVideoResource(self)
self.tasks = tasks.TasksResource(self)
self.image_to_video = image_to_video.ImageToVideoResource(self)
self.with_raw_response = RunwayMLWithRawResponse(self)
self.with_streaming_response = RunwayMLWithStreamedResponse(self)

Expand Down Expand Up @@ -225,8 +225,8 @@ def _make_status_error(


class AsyncRunwayML(AsyncAPIClient):
tasks: resources.AsyncTasksResource
image_to_video: resources.AsyncImageToVideoResource
tasks: tasks.AsyncTasksResource
image_to_video: image_to_video.AsyncImageToVideoResource
with_raw_response: AsyncRunwayMLWithRawResponse
with_streaming_response: AsyncRunwayMLWithStreamedResponse

Expand Down Expand Up @@ -290,8 +290,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.tasks = resources.AsyncTasksResource(self)
self.image_to_video = resources.AsyncImageToVideoResource(self)
self.tasks = tasks.AsyncTasksResource(self)
self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
self.with_raw_response = AsyncRunwayMLWithRawResponse(self)
self.with_streaming_response = AsyncRunwayMLWithStreamedResponse(self)

Expand Down Expand Up @@ -405,26 +405,26 @@ def _make_status_error(

class RunwayMLWithRawResponse:
def __init__(self, client: RunwayML) -> None:
self.tasks = resources.TasksResourceWithRawResponse(client.tasks)
self.image_to_video = resources.ImageToVideoResourceWithRawResponse(client.image_to_video)
self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)


class AsyncRunwayMLWithRawResponse:
def __init__(self, client: AsyncRunwayML) -> None:
self.tasks = resources.AsyncTasksResourceWithRawResponse(client.tasks)
self.image_to_video = resources.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)


class RunwayMLWithStreamedResponse:
def __init__(self, client: RunwayML) -> None:
self.tasks = resources.TasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = resources.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)


class AsyncRunwayMLWithStreamedResponse:
def __init__(self, client: AsyncRunwayML) -> None:
self.tasks = resources.AsyncTasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = resources.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)


Client = RunwayML
Expand Down