Console/terminal utility that downloads a file from a URL with a text progress bar, supporting Windows 11 and Ubuntu Linux 24.04. It uses the Python standard library only. A percent bar is shown while downloading (or a byte counter when the server reports no total size), and the elapsed time and average speed are printed when the download finishes.
[Folder Structure]
- CLAUDE.md / AGENT.md: program specification (identical content).
- CHANGELOG.md: change log.
- copyright.txt: copyright notice.
- model/download/: downloaded files land here by default.
- tool/tools.py: shared helpers.
- src/: source code, launcher scripts and this document.
- venv/: Python virtual environment, created by step 01.
There is no data/ folder in this SDK, because the input is a URL.
[Instructions]
1. 01_venv_create.bat / 01_venv_create.sh
Delete the old venv/, create a fresh one and install src/requirements.txt. Aborts loudly if pip fails.
2. 02_venv_activate.bat / 02_venv_activate.sh
Activate the virtual environment. On Linux use source src/02_venv_activate.sh.
3. 03_download.bat / 03_download.sh
Download the file given by --url to the path given by --output, showing the progress bar.
4. 99_venv_clear.bat / 99_venv_clear.sh
Delete the venv/ folder.
[Python Entry Point]
src/download.py
- --url: the URL to download. The default is the original example, the Anaconda3-2020.02 Windows installer, about 466 MB.
- --output: the output file path. The default is model/download/ plus the base name taken from the URL.
The percent bar is capped at 100%. On failure the script prints a clear error message and exits with a non-zero status.
[Quick Start]
Windows 11
src\01_venv_create.bat
src\03_download.bat --url https://www.python.org/static/img/python-logo.png
Ubuntu Linux 24.04
bash src/01_venv_create.sh
bash src/03_download.sh --url https://www.python.org/static/img/python-logo.png
Running 03_download without arguments downloads the 466 MB example installer — pass your own --url for anything smaller.
[References]
- urllib.request: docs.python.org/3/library/urllib.request
This SDK is built in AppForAI - AI Dev Tools.
Purchase license separately: USD 600, permanent authorization, single APP authorization, single machine authorization, one-year activation, one-year download, one-year update, one-year email technical support.