Skip to content

Allow for resuming downloads without counting for rate limiting - #161

Merged
Kostis-S-Z merged 7 commits into
mainfrom
persist-presigned-url
Nov 3, 2026
Merged

Kostis-S-Z merged 7 commits into
mainfrom
persist-presigned-url

Conversation

@Kostis-S-Z

@Kostis-S-Z Kostis-S-Z commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Resume with stored presigned URL

Interrupted downloads used to cost a new download session every time, which counts towards the API's daily download limit. This PR reuses the presigned URL the SDK already has.

  • Stored URL for cross-process resume. The .checksum sidecar now holds JSON with the checksum, the presigned URL, its expiresAt and the archive size. On the next run, if the .part file exists and the URL has not expired, the download resumes from it without calling the download endpoint. If the storage rejects the URL anyway, the SDK falls back to requesting a new one and still resumes the partial file. A plain-text sidecar from an older SDK version is still read as a bare checksum.
  • Samples are unchanged: the API returns no checksum for them, so they still restart.
  • Docs: resume section and README tip updated. OpenAPI contract test now asserts expiresAt is required.

Base automatically changed from retry-mid-stream to main November 3, 2026 10:36
…ive-python into persist-presigned-url

# Conflicts:
#	docs/index.md
#	src/datacollective/download.py
#	tests/test_download.py
@Kostis-S-Z
Kostis-S-Z marked this pull request as ready for review November 3, 2026 10:39
@Kostis-S-Z
Kostis-S-Z merged commit 5c40364 into main Nov 3, 2026
3 checks passed
@Kostis-S-Z
Kostis-S-Z deleted the persist-presigned-url branch November 3, 2026 11:01
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.

1 participant