Repository navigation
Conversation
Signed-off-by: Yiqing Wang <yiqing@wangemail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2042 +/- ##
=======================================
Coverage 64.50% 64.50%
=======================================
Files 101 101
Lines 30203 30203
=======================================
Hits 19482 19482
Misses 10721 10721 🚀 New features to boost your workflow:
|
pmady
left a comment
There was a problem hiding this comment.
Nice example. Splitting core deps from the optional PyAV path and running CI both ways is a good pattern. I also like that the README states the trusted socket and immutable object assumptions up front, examples usually skip that.
One question, more for the maintainers than the author: is examples/ in the client repo where we want runnable integrations to live, or should this sit with the docs on d7y.io? I lean toward keeping it next to the client so CI keeps it honest, and I'm happy to add a cross link from the d7y.io docs once this lands. Worth a quick check before merge that the gRPC calls match the dragonfly-api version pinned in requirements.txt.
Description
Add a seekable Python S3 reader using the existing v2 gRPC API and generated
dragonfly-apibindings. It preserves whole-object task identity, validates and trims complete pieces, and obtains AWS credentials (including STS tokens) through boto3.The example includes an optional PyAV video-window consumer, focused tests, and a path-scoped Python 3.11/3.12 CI workflow. PyAV is not required for byte-range reads. The README documents the trusted-socket and immutable-object assumptions, memory limits, and small-range scheduling behavior.
Related Issue
Related to #1821. This demonstrates native gRPC integration for callers that can be adapted; it does not resolve signed HTTP proxy compatibility or close that issue.
Motivation and Context
Python data loaders need selected object bytes in process, including seekable reads for large videos. The existing daemon API can serve this use case while keeping normal task/piece caching and P2P behavior. No daemon or protocol changes are needed.
Validation
Validated the example files in
517d43b8370a6eb571d8e3045959b7fa9865a249against upstreamd5bccb022:git diff --check.ALWAYSand fell back to source withAUTO.The live tests used MinIO, not AWS S3. Cache hits can still issue metadata HEADs, and these results are functional checks, not throughput benchmarks. Local test deployments and generated logs are excluded from this PR.
AI Assistance
AI tools assisted implementation and testing. I reviewed the code and the testing process.