A dead-simple, threaded file downloader CLI written in Python.
- Multi-threaded download of multiple files
- Single file chunked download (download large files in parallel parts)
- Individual + total progress bars
- Retry logic with customizable attempts
- Smart filename conflict handling (
filename_1.ext, etc.) - File type detection using raw magic bytes
- Resume support via
Rangeheaders - Logging system with stats (success, fail, retry)
- CLI flags for single or batch downloads
- Pure Python — no external downloaders
git clone https://github.com/GivenBY/threadracer.git
cd threadracer
pip install -e .threadracre -u https://example.com/large.zip -c 8 -o ./downloadsthreadracer -ul urls.txt -w 8 -o ./downloads| Flag(s) | Description | Default |
|---|---|---|
-u, --url |
URL of the file to download (single file mode) | — |
-ul, --urls |
Path to file containing multiple URLs (one per line) | urls.txt |
-c, --chunks |
Number of chunks for single file download (chunked mode) | 4 |
-w, --workers |
Number of worker threads for parallel download | 8 |
-o, --output-dir |
Output directory to save downloaded files | ~/Downloads |
-r, --retry |
Number of retry attempts per file | 3 |
-f, --force |
Overwrite existing files without asking | False |
-v, --verbose |
Enable verbose logging to stdout | False |
root/
├── .gitignore # Ignore files for git
├── LICENSE # Project license
├── urls.txt # List of URLs to download
├── pyproject.toml # Project metadata + CLI setup
├── README.md # You're reading it
├── urls.txt # List of URLs to download
└── threadracer/ # Core package
├── __init__.py
├── utils.py # Safe filename, etc.
├── cli/ # CLI entrypoint
│ ├── __init__.py
│ └── main.py # Argparse + command dispatch
└── core/ # Download engine
├── __init__.py
├── downloader.py # Parallel file download logic
├── filetype.py # Magic-byte-based file type detection
├── logger.py # Logging + stats
└── signatures.json # Known file signatures
-
--resumesupport via partial writes + metadata - SHA256 hash check
--checksum - Retry backoff logic
- CLI log file output
- PyPI packaging
- Bandwidth limiting / rate control
MIT LICENSE — use it, fork it, break it, improve it.
Contributions are welcome! Open an issue or PR if you have ideas or improvements.