Install & Compatibility
Where this runs
tested against v0.3.9 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.432s · 25.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.6s · import 0.390s · 26MB
24MB installed
● package 24MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
download
✓ from multiurl import download
This quickstart demonstrates the `multiurl.download` function. It supports downloading single URLs, combining multiple URLs into one target file, and fetching specific byte-range 'parts' from a single URL. The provided code simulates network operations to ensure it is runnable without external network dependencies for demonstration purposes.
from multiurl import download
import os
# NOTE: For this quickstart, actual network requests are simulated for illustrative
# purposes to ensure it is runnable without external dependencies or network issues.
# In a real application, 'download' performs actual HTTP/FTP requests.
def simulated_download(url, target=None, parts=None, **kwargs):
print(f"\n--- Simulating download operation ---")
print(f" URLs(s): {url}")
print(f" Target file: {target}")
if parts:
print(f" Requested parts: {parts}")
print(f" Additional parameters: {kwargs}")
if target:
try:
with open(target, 'w') as f:
f.write(f"Simulated content for {target} from {url}\n")
print(f" Created simulated file: {target}")
except IOError as e:
print(f" Error creating simulated file {target}: {e}")
print("--- Simulation complete ---")
# Monkey-patch the actual download function for simulation in quickstart
# In a real application, you would just call `multiurl.download`
multiurl.download = simulated_download
# Example 1: Download a single URL into a specified target file
multiurl.download(url="http://example.com/data.txt", target="example_data.txt")
# Example 2: Download content from multiple URLs and combine into one file
multiurl.download(
url=["http://example.com/part1.json", "http://example.com/part2.json"],
target="combined_parts.json"
)
# Example 3: Download specific byte ranges (parts) from a single URL
# This requires the server to support HTTP Range requests.
multiurl.download(
url="http://example.com/large_file.bin",
parts=[(0, 1024), (2048, 512)],
target="file_segments.bin"
)
# Clean up simulated files (optional, for actual cleanup uncomment below)
# os.remove("example_data.txt")
# os.remove("combined_parts.json")
# os.remove("file_segments.bin")
print("\nQuickstart demonstration complete. Check your directory for simulated files.")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'multiurl'
The 'multiurl' package is not installed in the current Python environment or the Python interpreter cannot find it.
AttributeError: module 'multiurl' has no attribute 'download'
The 'download' function is directly exposed at the top level of the 'multiurl' package, so it should be imported directly, not accessed as an attribute of the imported module object.
fixfrom multiurl import download
TypeError: url must be a string, or a list of strings or tuples
The 'url' argument passed to the 'download' function is not of the expected type (string, or list of strings/tuples for multi-part downloads).
fixEnsure the 'url' argument is a single URL string, or a list containing multiple URL strings or (URL, parts) tuples, as per the library's expected input.
URLError: <urlopen error [Errno 111] Connection refused>
This error typically occurs when the 'multiurl' library attempts to connect to a URL but the connection is actively refused by the server, often due to the server being offline, firewalls, or incorrect host/port.
fixVerify that the target URL is correct and accessible, and that there are no network issues (firewall, proxy, server status) preventing a connection.
Upgrade
Version history
0.3.9latest on PyPI · released Jun 18, 2026
Audit
Dependencies
No dependency data recorded yet.