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.

StreamShatter Demo 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. StreamShatter Demo 2 Demo of downloading a 1GB video from a YouTube link, reaching a high bandwidth despite the usual throttling.

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.10.tar.gz (6.7 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.10-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamshatter-1.0.10.tar.gz
  • Upload date:
  • Size: 6.7 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.10.tar.gz
Algorithm Hash digest
SHA256 78818175cb4ac09188eeb35b704340d10b9d3e3c8fafe05998807864bb8e1be5
MD5 5c7451b4a757fbad7d0351bf040c985e
BLAKE2b-256 4408ef7e08091ad15cff20113a9fe622c58f8f1a4dd50729b8581efba1cd3fbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streamshatter-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 827534c88501b804c1a50e7c5fb43ac60a2d85bf1b036deb043001bed3ac4454
MD5 4057b3dfae8ade3ce14113692b26001b
BLAKE2b-256 44ae9190c3d8c04df6b6293b0c5133f84e6e50ccb46502fb3eef07bf8a2eea58

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