Download utility as an easy way to get files from the net
Project description
Table of Contents generated with DocToc
pywgett
pywgett is a command-line utility built with Python for downloading files from the internet. It provides an easy-to-use interface to fetch files using URLs, with support for custom headers, resume downloads, and more.
Prerequisites
Before using pywgett, ensure you have the following:
- Python 3.6+
- pip (Python package installer)
Installation
You can install pywgett using pip:
pip install pywgett
Alternatively, install it from the source on GitHub:
git clone https://github.com/ktechhub/pywgett.git
cd pywgett
python setup.py install
Usage
Download a file from a URL:
pywget --help
Usage: pywget [OPTIONS] [URLS]...
Download utility to fetch a file from the internet.
Args: urls (tuple): The URLs of the files to download.
If multiple URLs are provided, they will be downloaded in parallel.
If a single URL is provided, it will be downloaded serially. output
(str): The name of the file or directory to save the downloaded file(s) as.
header (list): Optional HTTP headers to include in the request. parallel
(int): Number of parallel downloads. verbose (bool): Enable verbose
mode.
Returns: None
Options:
-o, --output TEXT Optional output file name or directory
--header TEXT Custom headers to include in the request, e.g.
--header 'Authorization: Bearer token', --header
'Content-Type: application/json', --header 'User-
Agent: Mozilla/5.0', etc.
-p, --parallel INTEGER Number of parallel downloads [default: 4]
--verbose Enable verbose mode to output detailed information
about the download process.
--version Show the version and exit.
--help Show this message and exit.
Example usage:
Single URL Download;
pywget https://www.example.com/file.zip
#or
pywget https://example.com/file.zip -o output_file.zip
pywget https://example.com/file.zip -o output_file.zip --header "Authorization: Bearer token" --header "User-Agent: CustomUserAgent/1.0" --verbose
Multiple URLS download
pywget https://example.com/file1.zip https://example.com/file2.zip -o /path/to/save -p 6
pywget https://www.ktechhub.com/assets/logo.13616b6b.png https://www.ktechhub.com/assets/logo.13616b6b.png
pywget https://example.com/file1.zip https://example.com/file2.zip -p 6
Features
- Download files from URLs with ease.
- Supports custom HTTP headers for authentication and content type.
- Resume interrupted downloads automatically.
- Displays progress bar during file downloads.
- Verbose mode for detailed download process information.
GitHub
For more details, visit the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contribution
If you want to contribute, kindly see this contribution guide.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pywgett-1.0.2.tar.gz
.
File metadata
- Download URL: pywgett-1.0.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66d50d9e0d5636f3c7169c049db7f2814dc7e251919653a4ea8ddc859b4b4e50 |
|
MD5 | 8a0d93894d4d633d4be31d904bc4ca95 |
|
BLAKE2b-256 | fd5e227aa0dbdfc3235efe955d3a6d68de04050c8cd960ff0be37e2e7501b65a |
File details
Details for the file pywgett-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: pywgett-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f8c32161a38d52c18bebaafdfbdb85dc55a54a37c572004b6109b1519b9fba |
|
MD5 | 2d3f712ca3381441d2659752aa274245 |
|
BLAKE2b-256 | dfbaf64b20cd89adaeb710d0e2a9bf0b734ead90720d86d2d4ce99bf680d52b7 |