Skip to content

Add reliable file transfer helpers - #581

Open
AndreyVMarkelov wants to merge 1 commit into
mainfrom
file-transfer
Open

Add reliable file transfer helpers#581
AndreyVMarkelov wants to merge 1 commit into
mainfrom
file-transfer

Conversation

@AndreyVMarkelov

Copy link
Copy Markdown
Contributor

Summary

  • add resumable sequential and parallel file upload/download helpers
  • add public per-request range headers for files/download and preserve legacy request overrides
  • add retry handling for Dropbox and requests transport failures, with validation and examples

Validation

  • .venv/bin/python -m pytest test/unit/ -q (100 passed)
  • .venv/bin/ruff check dropbox/file_transfer.py dropbox/_http.py generator/dropbox_python_client.stoneg.py test/unit/test_file_transfer.py test/unit/test_dropbox_unit.py test/unit/test_http.py
  • git diff --check
  • live parallel upload/download with supplied Dropbox credentials

@AndreyVMarkelov
AndreyVMarkelov marked this pull request as ready for review August 14, 2026 23:08
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.87833% with 285 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.32%. Comparing base (27483ad) to head (ee25250).

Files with missing lines Patch % Lines
dropbox/file_transfer.py 63.98% 186 Missing and 96 partials ⚠️
dropbox/base.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #581      +/-   ##
==========================================
+ Coverage   65.27%   65.32%   +0.04%     
==========================================
  Files          35       36       +1     
  Lines       66784    67571     +787     
  Branches     4735     4877     +142     
==========================================
+ Hits        43596    44140     +544     
- Misses      23026    23179     +153     
- Partials      162      252      +90     
Flag Coverage Δ
integration 64.34% <0.12%> (-0.76%) ⬇️
unit 65.03% <63.87%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Introduce dropbox.file_transfer with resumable sequential and parallel uploads/downloads, content-hash validation, atomic file targets, progress reporting, and retry handling for Dropbox and requests transport failures.

Add public per-request headers for files_download so ranged downloads use the SDK transport and preserve typed API errors. Keep ordinary files_download calls compatible with legacy request overrides by forwarding extra_headers only when provided. Include generator support so future spec updates retain the API.

Add unit coverage for range headers, typed API errors, partial target writes, retries, offset recovery, and requests transport failures. Document the API and add a runnable file transfer example.
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