Skip to content

feature: support resuming interrupted downloads via HTTP Range headers (--resume) #93

Todo

Description

@yush-1018

Feature Request

Describe the feature you'd like
Add a --resume (or -c) flag to databusclient download that uses HTTP Range request headers to resume partially downloaded files instead of restarting from byte 0.

Why is this feature important?
DBpedia Databus datasets (such as Live Fusion dumps or Wikipedia extractions) are often multi-gigabyte files. Currently, in databusclient/api/download.py (lines 576–585), files are always opened in "wb" mode without checking existing file sizes.

If a network drop, timeout, or interruption occurs midway through a large download, re-running databusclient download truncates the partial file and re-downloads the entire dataset from scratch, wasting significant network bandwidth and time.

Describe alternatives you've considered
Users currently have to download files using external tools like curl -C - or wget -c outside of databusclient, which loses Databus metadata tracking, checksum validation, and manifest recording.

Additional context

  • Affected files: databusclient/api/download.py and databusclient/cli.py.
  • If the target file already exists partially on disk and --resume is enabled:
    1. Send Range: bytes=<existing_size>- in the HTTP GET request.
    2. If the server returns 206 Partial Content, open the file in "ab" mode and update the tqdm progress bar with initial=existing_size.
    3. If the server does not support Range requests (returns 200 OK), fallback gracefully to normal full download.

Activity

  1. added
    enhancement
    on Sep 12, 2026
  2. alankrittiwari6969-ai commented on Sep 17, 2026

    @alankrittiwari6969-ai

    Hey @yush-1018 this looks like a great first issue for me to dig into I've just gotten my dev environment set up for this project. Would you be open to assigning this to me... I'll get started on the --resume flag using Range headers as you described

  3. yush-1018 commented on Sep 17, 2026

    @yush-1018
    Author

    Hey @alankrittiwari6969-ai !

    I have actually already implemented this feature and opened a pull request here: #94.

  4. alankrittiwari6969-ai commented on Sep 17, 2026

    @alankrittiwari6969-ai
  5. yush-1018 commented on Sep 18, 2026

    @yush-1018
    Author

    First, go through the repo and set up the project locally. You can check the open issues to see if there is anything available to work on, or explore the codebase to find bugs and improvements, discuss them by creating an issue first, and then open a PR.

    Good luck!

  6. alankrittiwari6969-ai commented on Sep 18, 2026

    @alankrittiwari6969-ai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions