
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A tool to download files. It supports progress bar, cksum, timeout, retry failed download.
A Python library for downloading files of any size, especially optimized for large file downloads, with support for progress bars, checksum verification, timeout handling, and automatic retry on failed downloads.
pip install py3-wget
from py3_wget import download_file
# Simple download with progress bar
download_file("https://raw.githubusercontent.com/python/cpython/3.11/LICENSE")
The library automatically retries failed downloads with exponential backoff:
download_file(
"https://raw.githubusercontent.com/python/cpython/3.11/LICENSE",
max_tries=5, # Maximum number of retry attempts
retry_seconds=2 # Initial retry delay in seconds
)
Verify downloaded files using checksums:
download_file(
"https://raw.githubusercontent.com/python/cpython/3.11/LICENSE",
md5="fcf6b249c2641540219a727f35d8d2c2", # MD5 checksum
sha256="3aff1954277c4fc27603346901e4848b58fe3c8bed63affe6086003dd6c2b9fe" # SHA256 checksum
)
download_file(
"https://raw.githubusercontent.com/python/cpython/3.11/LICENSE",
output_path="downloads/test.bin",
overwrite=True # Overwrite existing file
)
download_file
download_file(
url: str,
output_path: Optional[Union[str, Path]] = None,
overwrite: bool = False,
verbose: bool = True,
cksum: Optional[int] = None,
md5: Optional[str] = None,
sha256: Optional[str] = None,
max_tries: int = 5,
block_size_bytes: int = 8192,
retry_seconds: Union[int, float] = 2,
timeout_seconds: Union[int, float] = 60,
) -> None
url
(str): URL of the file to downloadoutput_path
(str or Path, optional): Path to save the file. If None, derived from URLoverwrite
(bool): Overwrite existing file (default: False)verbose
(bool): Show progress bar and messages (default: True)cksum
(int, optional): Expected checksum valuemd5
(str, optional): Expected MD5 hashsha256
(str, optional): Expected SHA256 hashmax_tries
(int): Maximum retry attempts (default: 5)block_size_bytes
(int): Download block size in bytes (default: 8192)retry_seconds
(int/float): Initial retry delay in seconds (default: 2)timeout_seconds
(int/float): Download timeout in seconds (default: 60)Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A tool to download files. It supports progress bar, cksum, timeout, retry failed download.
We found that py3-wget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.