Skip to content

Commit 70ce94f

Browse files
committed
chore(sdk): bump versions
1 parent 3f56bc3 commit 70ce94f

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

sdk/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@phala/dstack-sdk",
3-
"version": "0.5.5",
3+
"version": "0.5.6",
44
"description": "dstack SDK",
55
"main": "dist/node/index.js",
66
"types": "dist/node/index.d.ts",

sdk/js/src/send-rpc-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import http from 'http'
66
import https from 'https'
77
import net from 'net'
88

9-
export const __version__ = "0.5.0"
9+
export const __version__ = "0.5.6"
1010

1111

1212
export function send_rpc_request<T = any>(endpoint: string, path: string, payload: string, timeoutMs?: number): Promise<T> {

sdk/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[project]
66
name = "dstack-sdk"
7-
version = "0.5.1"
7+
version = "0.5.2"
88
description = "dstack SDK for Python"
99
authors = [
1010
{name = "Leechael Yim", email = "[email protected]"},

sdk/python/src/dstack_sdk/dstack_client.py

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
logger = logging.getLogger("dstack_sdk")
2525

26-
__version__ = "0.2.0"
26+
__version__ = "0.5.2"
2727

2828

2929
INIT_MR = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
@@ -226,12 +226,19 @@ class BaseClient:
226226
class AsyncDstackClient(BaseClient):
227227
PATH_PREFIX = "/"
228228

229-
def __init__(self, endpoint: str | None = None, *, use_sync_http: bool = False, timeout: float = 3):
229+
def __init__(
230+
self,
231+
endpoint: str | None = None,
232+
*,
233+
use_sync_http: bool = False,
234+
timeout: float = 3,
235+
):
230236
"""Initialize async client with HTTP or Unix-socket transport.
231237
232238
Args:
233239
endpoint: HTTP/HTTPS URL or Unix socket path
234240
use_sync_http: If True, use sync HTTP client internally
241+
timeout: Timeout in seconds
235242
236243
"""
237244
endpoint = get_endpoint(endpoint)
@@ -256,14 +263,18 @@ def __init__(self, endpoint: str | None = None, *, use_sync_http: bool = False,
256263
def _get_client(self) -> httpx.AsyncClient:
257264
if self._client is None:
258265
self._client = httpx.AsyncClient(
259-
transport=self.async_transport, base_url=self.base_url, timeout=self._timeout
266+
transport=self.async_transport,
267+
base_url=self.base_url,
268+
timeout=self._timeout,
260269
)
261270
return self._client
262271

263272
def _get_sync_client(self) -> httpx.Client:
264273
if self._sync_client is None:
265274
self._sync_client = httpx.Client(
266-
transport=self.sync_transport, base_url=self.base_url, timeout=self._timeout
275+
transport=self.sync_transport,
276+
base_url=self.base_url,
277+
timeout=self._timeout,
267278
)
268279
return self._sync_client
269280

@@ -399,7 +410,9 @@ def __init__(self, endpoint: str | None = None, *, timeout: float = 3):
399410
If a non-HTTP(S) endpoint is provided, it is treated as a Unix socket
400411
path and validated for existence.
401412
"""
402-
self.async_client = AsyncDstackClient(endpoint, use_sync_http=True, timeout=timeout)
413+
self.async_client = AsyncDstackClient(
414+
endpoint, use_sync_http=True, timeout=timeout
415+
)
403416

404417
@call_async
405418
def get_key(
@@ -464,7 +477,13 @@ class AsyncTappdClient(AsyncDstackClient):
464477
DEPRECATED: Use ``AsyncDstackClient`` instead.
465478
"""
466479

467-
def __init__(self, endpoint: str | None = None, *, use_sync_http: bool = False, timeout: float = 3):
480+
def __init__(
481+
self,
482+
endpoint: str | None = None,
483+
*,
484+
use_sync_http: bool = False,
485+
timeout: float = 3,
486+
):
468487
"""Initialize deprecated async tappd client wrapper."""
469488
if not use_sync_http:
470489
# Already warned in TappdClient.__init__
@@ -549,7 +568,9 @@ def __init__(self, endpoint: str | None = None, timeout: float = 3):
549568
"TappdClient is deprecated, please use DstackClient instead"
550569
)
551570
endpoint = get_tappd_endpoint(endpoint)
552-
self.async_client = AsyncTappdClient(endpoint, use_sync_http=True, timeout=timeout)
571+
self.async_client = AsyncTappdClient(
572+
endpoint, use_sync_http=True, timeout=timeout
573+
)
553574

554575
@call_async
555576
def derive_key(

0 commit comments

Comments
 (0)