This is an over-simplified downloader package just to demonstrate python packaging.
It contains a python module to import and a CLI tool.
You can easily install the module using pip
.
Once installed, in your python script:
from downloader import download
# suppose "url" variable points to a resource to be downloaded.
# "dest_path" variable points to a local path where the resource
# is to be stored.
print(f"Downloading {url} to {dest_path}...")
file_size = downloader(url, dest_path)
print(f"Download successful! File size: {file_size} B")
$ download <url> -o <dest_path>