Skip to main content

A fast, resilient CLI for batch image resizing, conversion, and compression.

Project description

Resizy

PyPI Python License: MIT CLI: Typer Terminal UI: Rich

Resizy is a fast, production-minded CLI for batch image resizing, conversion, and compression. It keeps the terminal responsive with ProcessPoolExecutor, validates images before processing, and gives every run a polished Rich progress UI.

Resizy terminal demo

Resizy summary

Why Developers Like It

  • Resize, convert, and compress hundreds of images from one command.
  • Keep your shell readable with Rich progress bars, panels, and summaries.
  • Avoid heavyweight services. No Docker, Redis, Celery, or background daemon.
  • Install globally with pipx, isolated from your app dependencies.
  • Gracefully handles corrupted files, invalid formats, and partial failures.

Install

pipx is recommended because it installs Resizy as a global terminal command while keeping its dependencies isolated from your projects.

If you already have pipx:

pipx install resizy

If pipx is not installed yet:

python -m pip install --user pipx
python -m pipx ensurepath

Close and reopen your terminal, then run:

pipx install resizy

On Windows, if python is not available but the Python launcher is:

py -m pip install --user pipx
py -m pipx ensurepath
pipx install resizy

Before Resizy is published to PyPI, install it locally from the repository:

git clone https://github.com/your-org/resizy.git
cd resizy
pipx install .

For local development:

pip install -e ".[dev]"

Run the test suite:

pytest

Usage

Convert the demo images to compact WebP files:

resizy run ./examples/images --format webp --width 1000 --quality 82 --output ./examples/output

Convert JPEG and PNG assets to WebP with smart compression:

resizy run ./images --format webp --quality 82

Process nested folders with more workers:

resizy run ./assets --recursive --workers 8 --format webp --width 1920

Write outputs to a specific directory:

resizy run ./campaign --output ./dist/images --width 1200 --quality 76

Resize a single file:

resizy run ./hero.png --format jpeg --width 2400 --quality 88

Delete originals after successful processing:

resizy run ./raw --format webp --cleanup-originals

CLI Options

resizy run --help

Common flags:

  • --width, --height: Resize while preserving aspect ratio.
  • --format: Convert to jpeg, png, webp, bmp, or tiff.
  • --quality: Compression quality from 1 to 100.
  • --workers: Number of background worker processes.
  • --recursive: Scan directories recursively.
  • --output: Choose the output directory.
  • --overwrite: Replace existing output files.
  • --preserve-metadata: Preserve EXIF metadata when supported.
  • --cleanup-originals: Remove source files after successful processing.

Architecture

Resizy is intentionally small and scalable:

  • cli.py owns command parsing and terminal presentation.
  • processor.py owns validation, image operations, and process-pool orchestration.
  • config.py centralizes supported formats, defaults, and package settings.

The main process stays responsive while CPU-bound image work runs in isolated worker processes. Results are streamed back as each file completes, so users get real-time feedback instead of a frozen terminal.

Supported Inputs

Resizy accepts JPEG, PNG, WebP, GIF, BMP, and TIFF images. Each file is opened and verified with Pillow before processing so corrupted or unsupported files fail gracefully in the summary table.

License

MIT

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

resizy-0.1.0.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resizy-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file resizy-0.1.0.tar.gz.

File metadata

  • Download URL: resizy-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for resizy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f0fae97c0cbcb0bbc627769257de1026d9aa05e7c0fa1ebc6fcfee8a74a06dd
MD5 5fe9f80548c4f58ff26190ba672d1eb0
BLAKE2b-256 b2b87d3902ffa06ec21d447a4dee98c368d693b0cf192474e82b9000b2077c5c

See more details on using hashes here.

File details

Details for the file resizy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: resizy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for resizy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8de9792476b6c7fd1e250bcc6632a16d9600df06bba3fa2c808802066b57974
MD5 b0090569fff273eb87703a334ff6ba12
BLAKE2b-256 84145aec27c3d5a7ad25b1c49fccfc0de1fe8924ee5886e540b36325da214621

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page