Skip to content

Update dstack python SDK.#292

Merged
Leechael merged 20 commits into
masterfrom
feat-sdk-python
Aug 18, 2025
Merged

Update dstack python SDK.#292
Leechael merged 20 commits into
masterfrom
feat-sdk-python

Conversation

@Leechael

Copy link
Copy Markdown
Collaborator

No description provided.

@Leechael
Leechael marked this pull request as ready for review August 14, 2025 13:35
@Leechael
Leechael requested a review from kvinwang August 14, 2025 13:35

@kvinwang kvinwang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is a elegant way to reuse the code logic between sync and async clients.

Comment thread sdk/python/src/dstack_sdk/dstack_client.py Outdated
Comment thread sdk/python/src/dstack_sdk/dstack_client.py Outdated
Comment thread sdk/python/src/dstack_sdk/dstack_client.py Outdated
Comment thread sdk/python/src/dstack_sdk/dstack_client.py Outdated
@kvinwang

Copy link
Copy Markdown
Collaborator

Tried reuse the async/sync code logic here: #299

Leechael and others added 11 commits August 15, 2025 23:07
…tead of paths

- Add PATH_PREFIX constant to both DstackClient and AsyncDstackClient
- Change _send_rpc_request parameter from 'path' to 'method'
- Construct full path internally using PATH_PREFIX + method
- Update all RPC calls to pass method names without leading slash

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…request

- Replace direct HTTP client calls with _send_rpc_request("Version", {})
- Consistent with other methods in the class
- Reduces code duplication and maintains abstraction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

@kvinwang kvinwang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Leechael
Leechael merged commit 85ace8b into master Aug 18, 2025
10 checks passed
@Leechael
Leechael deleted the feat-sdk-python branch August 18, 2025 09:37
kvinwang pushed a commit that referenced this pull request Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants