{"id":8126,"library":"downloadkit","title":"DownloadKit","description":"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.","status":"active","version":"2.0.7","language":"en","source_language":"en","source_url":"https://gitee.com/g1879/DownloadKit","tags":["download","multithread","http","file","downloader","async"],"install":[{"cmd":"pip install DownloadKit","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required for the library to run.","package":"python","optional":false,"min_version":"3.6"}],"imports":[{"note":"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.","wrong":"from downloadkit import DownloadKit","symbol":"DownloadKit","correct":"from DownloadKit import DownloadKit"}],"quickstart":{"code":"import os\nfrom DownloadKit import DownloadKit\n\n# Create a directory to save files\ndownload_dir = os.path.join(os.getcwd(), 'downloaded_files')\nos.makedirs(download_dir, exist_ok=True)\n\n# Initialize the downloader with the target path\nd = DownloadKit(goal_path=download_dir)\n\n# Add multiple download tasks\nurl1 = 'https://www.python.org/static/img/python-logo.png' # Example URL\nurl2 = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png' # Example URL\n\nd.add(url1)\nd.add(url2)\n\nprint(f'Starting downloads to {download_dir}...')\n# The downloads start automatically upon adding tasks in a default setup\n# You can also manually start/manage tasks with more advanced usage (not shown in quickstart)\n\n# Wait for downloads to complete (this is a simplified example; actual library has more robust completion handling)\n# For simple use-cases, the library manages a queue and threads automatically.\n# In a real application, you might use d.wait() or monitor progress.\n# For demonstration, we'll just print a message.\nprint('Downloads initiated. Check the \"downloaded_files\" directory.')\n","lang":"python","description":"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."},"warnings":[{"fix":"Always refer to the latest official documentation or GitHub README for behavior in newer versions and test thoroughly before upgrading in production environments.","message":"The 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.","severity":"gotcha","affected_versions":"2.x.x"},{"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')`.","message":"When 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.","severity":"gotcha","affected_versions":"2.x.x"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Change your import statement to `from DownloadKit import DownloadKit`.","cause":"Python module names are case-sensitive. While `pip install downloadkit` (lowercase) works, the actual module to import is `DownloadKit` (capital 'D').","error":"ModuleNotFoundError: No module named 'DownloadKit'"},{"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.","cause":"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.","error":"NameError: name 'DownloadKit' is not defined"},{"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)`.","cause":"While `DownloadKit` has an auto-retry mechanism, persistent `ConnectionError` indicates underlying network issues, an invalid or unreachable URL, or a server-side problem.","error":"requests.exceptions.ConnectionError: (...)"}]}