Repository navigation
Conversation
Chelics
requested review from
BraveY,
BruceAko,
ClementMaH,
Fricounet,
hhhhsdxxxx and
yyzai384
October 29, 2026 02:19
Add Python cache/build ignores, a pip dependabot entry for /python, and a Python row in the SDK table. Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Chelics <1285873430@qq.com>
A synchronous client over dfdaemon's DownloadTask gRPC service that mirrors dfget's request semantics for single-file downloads from HTTP(S), S3-compatible object storage, HuggingFace, ModelScope and OpenCSG. The package depends on the published dragonfly-api bindings, so no generated protobuf code is vendored. Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Chelics <1285873430@qq.com>
Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Chelics <1285873430@qq.com>
Unit tests run against an in-process fake dfdaemon over a temporary Unix socket. The integration test is skipped unless DRAGONFLY_LIVE_TEST=1. Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Chelics <1285873430@qq.com>
Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Chelics <1285873430@qq.com>
Chelics
force-pushed
the
feat/python-sdk
branch
from
October 29, 2026 02:21
cc9f058 to
630c2cc
Compare
Author
|
One note on CI: the |
This was referenced Nov 4, 2026
DoubleCore
pushed a commit
to DoubleCore/dragonfly-sdk
that referenced
this pull request
Nov 4, 2026
CLI-wrapper approach, complementary to dragonflyoss#87 (gRPC); mirrors python/dfcache_sdk from dragonflyoss#92. Signed-off-by: DoubleCore <851678303@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements dragonflyoss/dragonfly#4421.
Closes dragonflyoss/dragonfly#4421
What this adds
A synchronous Python SDK for
dfget:dragonfly_sdk.Clienttalks to the localdfdaemonover its Unix domain socket and drives theDownloadTaskgRPC service, so Python code can pull models and datasets through Dragonfly's P2P network.Per the two-step approach discussed in the issue (Python gRPC bindings first — already published as
dragonfly-api2.3.8 — then the SDK), the SDK lives here alongside the existing Go and Rust client SDKs.Scope (v1)
s3/gs/abs/oss/obs/cos), HuggingFace (hf://), ModelScope (modelscope://) and OpenCSG (opencsg://).dfgetdefaults (priority 6, 2h timeout, the 30-item default filtered query params, optional proto fields only written when set) so the SDK and the CLI produce the same tasks indfdaemon.dfdaemonbackend errors are decoded fromgrpc-status-details-binintoBackendError(message,headers,status_code).Not in this PR: directory mode,
--transfer-from-dfdaemon/ piece content transfer, HDFS, asyncio. All are documented as limitations inpython/README.md.Layout
dragonfly-apipackage, so no generated protobuf files are vendored.python/pyproject.toml— hatchling,requires-python >= 3.9, PEP 639 license metadata,py.typed(PEP 561), PEP 621 extras (test,dev)..github/workflows/ci-python.yml— ruff + mypy (strict) on 3.12, pytest on 3.9–3.13, wheel/sdist build +twine check+ clean-venv import.README.md,.gitignore,.github/dependabot.ymlupdated for the new package.Testing
ruff check .,ruff format --check .,mypy src(strict) pass.pytest -q -m "not integration": 144 passed on Python 3.9 and on 3.13. Unit tests run against an in-process fakedfdaemonover a temporary Unix socket.python -m build+twine check dist/*pass; the wheel installs in a clean venv, imports, and shipspy.typed.DRAGONFLY_LIVE_TEST=1 pytest -q -m integration) covers the realdfdaemonpath; it is skipped in CI.Notes for reviewers
remote_ipis the one deliberate divergence fromdfget: it depends on a local-IP probe, so the SDK leaves it unset.Follow-ups (separate PRs)
🤖 Generated with Claude Code