Registry / http-networking / robust-downloader

robust-downloader

JSON →
library0.0.2pypypi✓ verified 25d ago

A minimal Python downloader designed for robustness, offering features like resumable downloads and automatic retries. It is currently in beta status (Development Status :: 4 - Beta) and provides both a Python interface and a command-line utility for simple file transfers.

pip install robust-downloader
INSTALL
IMPORT
SIG · ROBUST-DOWNLOADER
R
robust-downloader
http-networkingpythonv0.0.2
Install
2.3s avg
Import
530ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.562s · 21.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.3s · import 0.498s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

download
✓ from robust_downloader import download

Demonstrates how to download a file using the `download` function. The example includes basic error handling, which is crucial for robust applications, although not explicitly shown in the most minimal usage examples from the library's documentation.

from robust_downloader import download # Download a file from a URL # Replace with an actual URL to test file_url = "https://raw.githubusercontent.com/fedebotu/robust-downloader/main/README.md" try: download(file_url, filename="downloaded_readme.md") print(f"Successfully downloaded {file_url} to downloaded_readme.md") except Exception as e: print(f"An error occurred during download: {e}")
robust-downloader --version
Debug
Known issues
gotchaThe library is currently in 'Beta' development status (Development Status :: 4 - Beta). This implies that APIs and core behaviors might still evolve and change in future versions without strict adherence to semantic versioning until a stable 1.0 release.
fix
Be prepared for potential API adjustments and thoroughly test upgrades between minor or patch versions. Refer to the project's GitHub releases for specific changes.
affects: All 0.x.x versions
gotchaWhile designed for robustness, the basic `download` function, as shown in minimal usage examples, does not explicitly include `try-except` blocks for error handling. For production-ready applications, it is essential to implement comprehensive exception handling for network issues, file system errors, or unexpected server responses.
fix
Wrap `download()` calls in `try...except` blocks to handle potential exceptions such as `requests.exceptions.RequestException`, `IOError`, or other custom exceptions the library might raise.
affects: All versions
gotchaVersion 0.0.2 introduced an optional SHA256 integrity check. If downloading critical files where data integrity is paramount, it is highly recommended to provide the expected SHA256 hash to the `download` function to verify the file's authenticity and ensure it hasn't been corrupted during transfer. This check is not enabled by default.
fix
Pass the `sha256` argument to the `download` function, e.g., `download(url, filename='my_file.zip', sha256='expected_sha256_hash')`.
affects: 0.0.2 and later
gotchaThe library describes itself as a 'minimal' downloader. While it supports resumable downloads and retries, users accustomed to more feature-rich download managers (e.g., those offering multi-part downloads, advanced proxy configurations, or sophisticated handling of dynamic/expiring URLs) might find certain advanced capabilities or extensive customization options to be limited.
fix
Review the project's documentation and source code to confirm specific feature support if your use case requires complex download management scenarios.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'robust_downloader'
The 'robust-downloader' package has not been installed in your current Python environment.
fix
pip install robust-downloader
robust-downloader: command not found
The command-line utility provided by 'robust-downloader' is either not installed or its executable script is not in your system's PATH.
fix
pip install robust-downloader (and ensure your virtual environment is activated if applicable, or that Python's script directory is in your PATH)
TypeError: RobustDownloader.download() missing 1 required positional argument: 'output_path'
The 'download' method of the 'RobustDownloader' instance was called with only the URL, omitting the necessary destination file path.
fix
downloader.download("http://example.com/file.zip", "local_file.zip")
AttributeError: module 'robust_downloader' has no attribute 'RobustDownloader'
The 'RobustDownloader' class is being accessed incorrectly, often by attempting to call it directly from the module without an explicit import, or due to a typo in the class name.
fix
from robust_downloader import RobustDownloader
Upgrade
Version history
0.0.2latest on PyPI · released Nov 13, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
1
Perplexity
1
Resources