Registry / http-networking / multiurl

multiurl

JSON →
library0.3.9pypypi✓ verified 21d ago

multiurl is a Python package designed to simplify downloading multiple URLs, including support for multi-part URLs. It allows downloading several files into one or specific byte ranges from a single URL. Maintained by ECMWF, it has seen regular updates, with version 0.3.7 released in July 2025, indicating an active development cadence despite its listed 'Alpha' status on PyPI.

pip install multiurl
INSTALL
IMPORT
SIG · MULTIURL
M
multiurl
http-networkingpythonv0.3.9
Install
2.6s avg
Import
411ms
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.432s · 25.5MB
glibc
py 3.103.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.")
Debug
Known issues
breakingThe `cgi` module was removed from Python 3.13. `multiurl` versions prior to 0.3.2 may experience `ModuleNotFoundError` or other issues when running on Python 3.13+ if they relied on internal `cgi` usage.
fix
Upgrade to `multiurl` version 0.3.2 or newer to ensure compatibility with Python 3.13 and future Python versions.
affects: <0.3.2
gotchaVersions prior to 0.3.7 might fail with `ChunkedEncodingError` during downloads, particularly when dealing with certain HTTP responses that use chunked transfer encoding.
fix
Upgrade to `multiurl` 0.3.7 or newer, which includes a retry mechanism to handle `ChunkedEncodingError`.
affects: <0.3.7
gotchaOlder versions of `multiurl` (prior to 0.3.3) may incorrectly handle filenames derived from the `Content-Disposition` HTTP header, potentially leading to corrupted or misnamed downloaded files.
fix
Upgrade to `multiurl` version 0.3.3 or newer to benefit from fixes in `content-disposition` header handling.
affects: <0.3.3
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.
fix
pip install multiurl
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.
fix
from 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).
fix
Ensure 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.
fix
Verify 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.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
Resources
multiurl — pip install multiurl · libregistry