Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions runware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -93,10 +95,12 @@
PricingModelListItem,
)
from .types.sdk import (
RetryStrategy,
RunOptions,
RuntimeDependencies,
SDKConfig,
StreamOptions,
TransportType,
WebSocketConnectFactory,
)
from .types.serverless import (
Expand Down Expand Up @@ -231,6 +235,7 @@
"RemoveBackgroundParams",
"RemoveBackgroundResult",
"RemoveBackgroundVideoParams",
"RetryStrategy",
"RunOptions",
"RuntimeDependencies",
"Runware",
Expand All @@ -249,6 +254,7 @@
"ThreeDInferenceResult",
"TrainingParams",
"TrainingResult",
"TransportType",
"UpscaleImageParams",
"UpscaleParams",
"UpscaleResult",
Expand Down
12 changes: 12 additions & 0 deletions tests/test_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import pytest

import runware
from runware.errors import (
build_documentation_url,
derive_code,
Expand Down Expand Up @@ -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
Loading