From 9e58627ba08e98933c8d0ffe6e5558523891c2c7 Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Mon, 1 Dec 2025 13:03:39 -0500 Subject: [PATCH 1/4] Add SDK version headers to WebSocket connection --- runware/__init__.py | 2 +- runware/server.py | 7 ++++++- runware/version.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 runware/version.py diff --git a/runware/__init__.py b/runware/__init__.py index 393f352..60d3571 100644 --- a/runware/__init__.py +++ b/runware/__init__.py @@ -4,6 +4,6 @@ from .base import * from .logging_config import * from .async_retry import * +from .version import __version__ __all__ = ["Runware"] -__version__ = "0.4.33" diff --git a/runware/server.py b/runware/server.py index 62909dc..f4c73ac 100644 --- a/runware/server.py +++ b/runware/server.py @@ -21,6 +21,7 @@ Environment, ListenerType, ) +from .version import __version__ class RunwareServer(RunwareBase): def __init__( @@ -47,13 +48,17 @@ def __init__( self._retry_delay: int = retry_delay self._heartbeat_task: Optional[asyncio.Task] = None self._tasks: Dict[str, asyncio.Task] = {} + self._additional_headers: Dict[str, str] = { + "X-SDK-Type": "python", + "X-SDK-Version": __version__ + } async def connect(self): self.logger.info("Connecting to Runware server from server") self._last_pong_time = time.perf_counter() try: - self._ws = await websockets.connect(self._url) + self._ws = await websockets.connect(self._url, additional_headers=self._additional_headers) self._ws.close_timeout = 1 self._ws.max_size = None self.logger.info(f"Connected to WebSocket URL: {self._url}") diff --git a/runware/version.py b/runware/version.py new file mode 100644 index 0000000..c25472a --- /dev/null +++ b/runware/version.py @@ -0,0 +1,2 @@ +__version__ = "0.4.33" + From cdda048a6425dd665ac5e2ccea065e975c971073 Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Mon, 1 Dec 2025 13:08:06 -0500 Subject: [PATCH 2/4] Update setup.py description to include all SDK capabilities --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 942f6f3..06594a7 100644 --- a/setup.py +++ b/setup.py @@ -9,10 +9,10 @@ version="0.4.33", author="Runware Inc.", author_email="python.sdk@runware.ai", - description="The Python Runware SDK is used to run image inference with the Runware API, powered by the Runware inference platform. It can be used to generate images with text-to-image and image-to-image. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports upscaling, background removal, inpainting and outpainting, and a series of other ControlNet models.", + description="The Python Runware SDK is used to interact with the Runware API, powered by the Runware inference platform. It supports image generation, video generation, image upscale, video upscale, image caption, video caption, image background removal, video background removal, audio generation, and more. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports inpainting, outpainting, and a series of other ControlNet models.", long_description=long_description, long_description_content_type="text/markdown", - keywords=["Runware", "stable diffusion", "text to image", "image to text"], + keywords=["Runware", "stable diffusion", "text to image", "image to text", "video generation", "audio generation", "image upscale", "video upscale", "background removal"], url="https://github.com/runware/sdk-python", project_urls={ "Documentation": "https://docs.runware.ai/", From f1ad8a4e9a2fbd778c263fd2169b6f267e5a123a Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Mon, 1 Dec 2025 13:15:25 -0500 Subject: [PATCH 3/4] Add additional keywords to setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 06594a7..4a2d173 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ description="The Python Runware SDK is used to interact with the Runware API, powered by the Runware inference platform. It supports image generation, video generation, image upscale, video upscale, image caption, video caption, image background removal, video background removal, audio generation, and more. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports inpainting, outpainting, and a series of other ControlNet models.", long_description=long_description, long_description_content_type="text/markdown", - keywords=["Runware", "stable diffusion", "text to image", "image to text", "video generation", "audio generation", "image upscale", "video upscale", "background removal"], + keywords=["Runware", "stable diffusion", "text to image", "image to text", "text to video", "image to video", "video generation", "text to audio", "audio generation", "image upscale", "video upscale", "background removal"], url="https://github.com/runware/sdk-python", project_urls={ "Documentation": "https://docs.runware.ai/", From f6c41f94c9493834183561ccf3b2ef6d0b6adaa4 Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Mon, 1 Dec 2025 13:28:06 -0500 Subject: [PATCH 4/4] Add deprecation warning for skipResponse parameter --- runware/types.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/runware/types.py b/runware/types.py index 14dcede..284efe8 100644 --- a/runware/types.py +++ b/runware/types.py @@ -1139,6 +1139,15 @@ class IVideoInference: inputs: Optional[IVideoInputs] = None skipResponse: Optional[bool] = False + def __post_init__(self): + if self.skipResponse: + warnings.warn( + "The 'skipResponse' parameter is deprecated and will be removed in a future release. " + "Use 'getResponse(taskUUID=taskUUID)' instead to retrieve results asynchronously.", + DeprecationWarning, + stacklevel=3 + ) + @dataclass class IAudioInputs(BaseRequestField):