Skip to main content

Multiplexed chunked file downloader

Project description

StreamShatter

Originally a very basic script for reliably downloading files from servers with inconsistent connections, this project has been revisited and modernised to use https://github.com/jawah/niquests to greatly improve multiplexing performance, for those who still have use for such a tool.

StreamShatter takes advantage of the Range HTTP header to dynamically allocate multiple chunks, by starting with one streaming request and gradually bisecting it while bandwidth permits, all without restarting the download. This allows for single, large file downloads from hosts that, whether intentionally or unintentionally, have degraded throughputs. The individual chunks also serve as checkpoints for if/when connections are broken.

Demo using a normally slow (<1Mbps) server, with simulated network failures at 50%, 90% and 99.5% download progress. No data is lost and the resulting file is intact.

Installation

  • Install python and pip
  • Install StreamShatter as a package: pip install streamshatter

Usage

usage: streamshatter [-h] [-V] [-H HEADERS] [-c CACHE_FOLDER] [-l LIMIT] url [filename]

Multiplexed chunked file downloader

positional arguments:
  url                   Target URL
  filename              Output filename

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -H, --headers HEADERS
                        HTTP headers, interpreted as JSON
  -c, --cache-folder CACHE_FOLDER
                        Folder to store temporary files
  -l, --limit LIMIT     Limits the amount of chunks to download

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamshatter-1.0.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamshatter-1.0.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file streamshatter-1.0.4.tar.gz.

File metadata

  • Download URL: streamshatter-1.0.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.5

File hashes

Hashes for streamshatter-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ef24772e4dff952fc9c572010b1c696875926fadb019140a37512fed96e8a87f
MD5 2d41fd1e896304bfad45fe5182d1e8a9
BLAKE2b-256 190b8935cb49fd5af07f55a19cd8f46289212aeeee2a837fbe9d4fd75ec6702c

See more details on using hashes here.

File details

Details for the file streamshatter-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: streamshatter-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.5

File hashes

Hashes for streamshatter-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a7abf7ff4bb3190b0ad879142b09c25b419f29dbd5b365e69ddbd8446b3c5a01
MD5 0b969cee4113b5ad82f49db1c61a0b70
BLAKE2b-256 abef920b4bc29dc98ce7e3c25ba6b9f8c3b52acb2f638e83ea20c672b1b32c1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page