TurboDL is an extremely smart, fast, and efficient download manager designed to optimize your downloading experience.
Project description
TurboDL
🚀 Overview
TurboDL is an extremely smart, fast, and efficient download manager designed to optimize your downloading experience.
✨ Key Features
- Smart Connection Management: Dynamically calculates the optimal number of connections based on file size and network speed
- Intelligent Acceleration: Built-in sophisticated download acceleration techniques that split downloads into multiple parallel streams
- Automatic Retry System: Efficiently retries failed requests with exponential backoff strategy
- Pre-Download Intelligence: Automatically detects file information, size, and type before download begins
- Seamless Redirection: Handles HTTP redirects automatically for successful downloads
- Memory Optimization: Intelligently uses RAM buffering to reduce disk I/O overhead
- Data Integrity: Supports post-download hash verification (MD5, SHA256, etc.)
- Real-time Feedback: Provides an elegant, accurate progress bar with detailed statistics
- Cross-platform Compatibility: Works consistently across all major operating systems
Additional Built-in Features
- YouTube Support: Download YouTube videos in the highest available quality and automatically merge audio and video streams using StreamSnapper library
📦 Installation
# Install the stable version of TurboDL from PyPI
pip install --upgrade turbodl
# Or with the CLI interface
pip install --upgrade turbodl[cli]
# Install the beta version of TurboDL from GitHub
pip install --upgrade git+https://github.com/henrique-coder/turbodl.git@main
# Install the development version of TurboDL from GitHub
pip install --upgrade git+https://github.com/henrique-coder/turbodl.git@dev
[!Warning] If you already have a version installed and want to switch to a different branch (for example, to test new features or fix bugs), you must use the
--force-reinstallparameter to ensure the upgrade occurs correctly.
🔍 Examples
Basic Usage
from turbodl import TurboDL
turbodl = TurboDL()
turbodl.download(
url="https://example.com/file.txt", # Your download URL
output_path="path/to/file" # The file/path to save the downloaded file
)
# Access the absolute path to the downloaded file
print(turbodl.output_path)
Advanced Usage
from turbodl import TurboDL
turbodl = TurboDL(
max_connections="auto",
connection_speed_mbps=100,
show_progress_bar=True,
)
turbodl.download(
url="https://example.com/file.txt",
output_path="path/to/file",
pre_allocate_space=False,
use_ram_buffer="auto",
overwrite=True,
headers=None,
inactivity_timeout=120,
timeout=None,
expected_hash=None,
hash_type="md5",
)
# Access the absolute path to the downloaded file
print(turbodl.output_path)
Command Line Interface
# Show help for all commands
turbodl --help
# Show help for the download command
turbodl download --help
# Download a file
turbodl download [...] https://example.com/file.txt path/to/file
📊 CLI Demo
📋 Parameters
TurboDL Class Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
max_connections |
int, Literal["auto"] | "auto" | Maximum connections for parallel downloading. Minimum is 1 and maximum is 32. |
connection_speed_mbps |
float | 100 | Your current internet connection speed in Mbps. |
show_progress_bar |
bool | True | Whether to display a progress bar. |
Download Method Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
str | - | The URL of the file to download. |
output_path |
str, PathLike, None | None | The path to save the downloaded file. If it is a directory, filename is derived from server response. If None, the current working directory is used. |
pre_allocate_space |
bool | False | Whether to pre-allocate disk space for the file. |
use_ram_buffer |
bool, Literal["auto"] | "auto" | Use RAM buffer for download. If set to False, the file will be downloaded continuously to disk. If set to True, the file will be downloaded with the help of RAM memory. If set to "auto", the RAM buffer will be disabled if the output path is a RAM directory and enabled otherwise. |
overwrite |
bool | True | Whether to overwrite the file if it already exists. |
headers |
dict[str, str], None | None | A dictionary of headers to include in the request. |
inactivity_timeout |
int | 120 | Timeout in seconds after the connection is considered idle. None means no timeout. |
timeout |
int | None | Overall timeout in seconds. None means no timeout. |
expected_hash |
str, None | None | The expected hash value of the downloaded file. If provided, the file will be verified after download. |
hash_type |
Literal["md5", "sha1", "sha224", "sha256", "sha384", "sha512", "blake2b", "blake2s", "sha3_224", "sha3_256", "sha3_384", "sha3_512", "shake_128", "shake_256"] | "md5" | Hash algorithm to use for verification. Available: md5, sha1, sha224, sha256, sha384, sha512, blake2b, blake2s, sha3_224, sha3_256, sha3_384, sha3_512, shake_128, shake_256. |
🛠️ Development
# Clone the repository
git clone https://github.com/henrique-coder/turbodl.git
cd turbodl
# Install Poetry in your local environment
pip install --upgrade poetry
# Install project dependencies
make install
# Run tests
make tests
# Lint and format code
make lint
make format
🤝 Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
👥 Contributors
📄 License
Distributed under the MIT License. See LICENSE for more information.
📊 Project Status
TurboDL is in active development. Check the releases page for the latest updates.
🌟 Star the Project
If you find this project useful, please consider giving it a star on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file turbodl-0.6.0.tar.gz.
File metadata
- Download URL: turbodl-0.6.0.tar.gz
- Upload date:
- Size: 58.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80d05ca338893e8b3746fe65b00b30b31db9321a45f86b55c74d6bfbfbd17a51
|
|
| MD5 |
41cb292a634a156e7863a7e91f5d3d13
|
|
| BLAKE2b-256 |
a1f0e9647e2e1865335070926e8d039d72593a209f462b64d1184b042872f8a2
|
Provenance
The following attestation bundles were made for turbodl-0.6.0.tar.gz:
Publisher:
release.yaml on henrique-coder/turbodl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turbodl-0.6.0.tar.gz -
Subject digest:
80d05ca338893e8b3746fe65b00b30b31db9321a45f86b55c74d6bfbfbd17a51 - Sigstore transparency entry: 212386078
- Sigstore integration time:
-
Permalink:
henrique-coder/turbodl@cc3d2dc629a5f712dee23a34f543e337968590bf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/henrique-coder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@cc3d2dc629a5f712dee23a34f543e337968590bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file turbodl-0.6.0-py3-none-any.whl.
File metadata
- Download URL: turbodl-0.6.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
517e308afde8a86e886063c991b9477dcab123fa9e6a4aadde0a3b8c324b70b0
|
|
| MD5 |
86fb46fc2a159420c9d01acdf9c7483c
|
|
| BLAKE2b-256 |
f3e37633e59ef40da5116c2a72f9a1548fffb5f8eb22de2bf2ba2e7c9b0cb3be
|
Provenance
The following attestation bundles were made for turbodl-0.6.0-py3-none-any.whl:
Publisher:
release.yaml on henrique-coder/turbodl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turbodl-0.6.0-py3-none-any.whl -
Subject digest:
517e308afde8a86e886063c991b9477dcab123fa9e6a4aadde0a3b8c324b70b0 - Sigstore transparency entry: 212386087
- Sigstore integration time:
-
Permalink:
henrique-coder/turbodl@cc3d2dc629a5f712dee23a34f543e337968590bf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/henrique-coder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@cc3d2dc629a5f712dee23a34f543e337968590bf -
Trigger Event:
push
-
Statement type: