Skip to content
VD
All projects

Software Engineering, 2026

Image Downloader CLI

A tested Python command-line tool that downloads images from a list of URLs, validating each file and skipping failures safely.

image-downloader$ pytest -vtests/test_url_reader.py::skips_blank_lines_and_commentsPASSEDtests/test_downloader.py::downloads_and_saves_an_imagePASSEDtests/test_downloader.py::404_is_skippedPASSEDtests/test_downloader.py::network_error_is_skippedPASSEDtests/test_downloader.py::non_image_is_skippedPASSEDtests/test_downloader.py::two_urls_with_same_name_do_no…PASSEDtests/test_cli.py::missing_file_returns_exit_cod…PASSEDtests/test_cli.py::full_run_downloads_and_return…PASSED… 6 more14 passedin 0.14s, fully offline (mocked HTTP)
Automated tests
14
Runtime dependencies
1

The problem

Bulk downloads fail in messy ways — bad URLs, non-image responses, duplicate file names. The tool needs to keep going and report clearly.

What it does

  • Three focused modules: URL reader, downloader and CLI.
  • Checks Content-Type so only real images are saved; duplicate names get a numeric suffix.
  • One bad URL is logged and skipped — it never stops the run.
  • Offline test suite with mocked HTTP that runs in under a second; meaningful exit codes.

Built with

  • Python
  • requests
  • pytest
  • unittest.mock
  • argparse