Registry / http-networking / downloadkit

downloadkit

JSON →
library2.0.7pypypi✓ verified 86d ago

DownloadKit is a simple and easy-to-use multi-threaded file download tool for Python. It supports concurrent downloading of multiple files, automatic large file splitting for multi-threaded downloads, automatic task scheduling, and connection failure retries. The current version is 2.0.7, with frequent updates.

pip install DownloadKit
INSTALL
IMPORT
SIG · DOWNLOADKIT
D
downloadkit
http-networkingpythonv2.0.7
Install
2.5s avg
Import
995ms
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.7 · 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.103.920 runs
installs and imports cleanly · install 0.0s · import 1.047s · 24.4MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.5s · import 0.943s · 25MB
23MB installed
● package 23MB
Code
Verified usage

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

DownloadKit
from DownloadKit import DownloadKit
from downloadkit import DownloadKit
The package name on PyPI is `DownloadKit` (capital 'D'), which is also the module name, but `pip install` works with `downloadkit` (lowercase 'd'). The class name `DownloadKit` must be imported with the correct capitalization.

This quickstart demonstrates how to initialize `DownloadKit`, specify a download directory, and add multiple URLs to the download queue. The library automatically handles multi-threaded downloads and saves files to the specified path.

import os from DownloadKit import DownloadKit # Create a directory to save files download_dir = os.path.join(os.getcwd(), 'downloaded_files') os.makedirs(download_dir, exist_ok=True) # Initialize the downloader with the target path d = DownloadKit(goal_path=download_dir) # Add multiple download tasks url1 = 'https://www.python.org/static/img/python-logo.png' # Example URL url2 = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png' # Example URL d.add(url1) d.add(url2) print(f'Starting downloads to {download_dir}...') # The downloads start automatically upon adding tasks in a default setup # You can also manually start/manage tasks with more advanced usage (not shown in quickstart) # Wait for downloads to complete (this is a simplified example; actual library has more robust completion handling) # For simple use-cases, the library manages a queue and threads automatically. # In a real application, you might use d.wait() or monitor progress. # For demonstration, we'll just print a message. print('Downloads initiated. Check the "downloaded_files" directory.')
downloadkit --version
Debug
Known issues
gotchaThe library's development status is '4 - Beta' on PyPI, indicating that APIs and internal behavior might still be subject to change in future minor versions, though core functionality is stable.
fix
Always refer to the latest official documentation or GitHub README for behavior in newer versions and test thoroughly before upgrading in production environments.
affects: 2.x.x
gotchaWhen encountering existing files, `DownloadKit` has a `file_exists` parameter (options: 'skip', 'overwrite', 'rename'). If not explicitly configured, the default behavior (which follows the instance's `file_exists` attribute) might lead to unintended file overwrites or skipping downloads.
fix
Set the `file_exists` parameter explicitly when initializing `DownloadKit` or when adding individual tasks using the `add()` method, e.g., `d = DownloadKit(..., file_exists='rename')`.
affects: 2.x.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'DownloadKit'
Python module names are case-sensitive. While `pip install downloadkit` (lowercase) works, the actual module to import is `DownloadKit` (capital 'D').
fix
Change your import statement to `from DownloadKit import DownloadKit`.
NameError: name 'DownloadKit' is not defined
This usually means the `DownloadKit` class was not correctly imported from the `DownloadKit` module, or there's a typo in the class name during usage.
fix
Ensure you have `from DownloadKit import DownloadKit` at the top of your file and that the class name `DownloadKit` is spelled correctly when instantiated.
requests.exceptions.ConnectionError: (...)
While `DownloadKit` has an auto-retry mechanism, persistent `ConnectionError` indicates underlying network issues, an invalid or unreachable URL, or a server-side problem.
fix
Verify the URL is correct and accessible, check your network connection, and consider increasing the `retry` count and `interval` when initializing `DownloadKit` if intermittent network issues are expected. Example: `d = DownloadKit(goal_path=..., retry=5, interval=10)`.
Upgrade
Version history
2.0.7latest on PyPI · released Nov 30, 2024
Audit
Dependencies
pythonrequiredRequired for the library to run.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
downloadkit — pip install downloadkit · libregistry