diff --git a/runware/__init__.py b/runware/__init__.py index 188d25b..9404a9e 100644 --- a/runware/__init__.py +++ b/runware/__init__.py @@ -15,6 +15,8 @@ Options & config: SDKConfig — config dataclass + TransportType — "websocket" or "rest" + RetryStrategy — "linear" or "exponential" RunOptions — per-call options for client.run() StreamOptions — per-call options for client.stream() RuntimeDependencies — inject custom aiohttp session / WS connect @@ -93,10 +95,12 @@ PricingModelListItem, ) from .types.sdk import ( + RetryStrategy, RunOptions, RuntimeDependencies, SDKConfig, StreamOptions, + TransportType, WebSocketConnectFactory, ) from .types.serverless import ( @@ -231,6 +235,7 @@ "RemoveBackgroundParams", "RemoveBackgroundResult", "RemoveBackgroundVideoParams", + "RetryStrategy", "RunOptions", "RuntimeDependencies", "Runware", @@ -249,6 +254,7 @@ "ThreeDInferenceResult", "TrainingParams", "TrainingResult", + "TransportType", "UpscaleImageParams", "UpscaleParams", "UpscaleResult", diff --git a/tests/test_contract.py b/tests/test_contract.py index ef2e489..3ee2fb6 100644 --- a/tests/test_contract.py +++ b/tests/test_contract.py @@ -18,6 +18,7 @@ import pytest +import runware from runware.errors import ( build_documentation_url, derive_code, @@ -123,3 +124,14 @@ def test_parse_api_error(raw: Any, expected: dict[str, Any], case_name: str) -> f"contract drift in {case_name!r}: field {key!r} was {actual!r}, " f"expected {want!r}" ) + + +# ----------------------------------------------------------- public_exports + + +def test_public_exports() -> None: + expected = _load("public-exports.json")["expected"] + wanted = sorted( + [*expected["shared"], *expected["renamed"].values(), *expected["python_only"]] + ) + assert sorted(runware.__all__) == wanted