Skip to main content

A Python utility for zipping directories and files

Project description

Automate dir zipping⚡️

CLI for flexibly zipping and extracting items.

Features

  • compress files and dirs as required
    • run command for zipping dirs/files of choice
    • run command for defining where compressed files should live

Prerequisites

  • Python 3.12+
  • Git
  • uv (recommended) or pip

Quick Start

# Compress current directory
$ uv run zippa pack .

# Compress specific files
$ uv run zippa pack file1.txt dir1/ file2.py

# Extract zip file
$ uv run zippa extract backup.zip

# Extract to specific directory
$ uv run zippa extract backup.zip --output /path/to/extract/

Common Patterns

Working with Different Directories

# Compress from external directory
$ uv run zippa pack . --work-dir ~/path/to/project --output backup.zip

# Compress specific files from external directory
$ uv run zippa pack file1.txt dir1/ --work-dir ~/path/to/project

Excluding Files

# Exclude patterns via command line
$ uv run zippa pack . --exclude "*.pyc" --exclude "__pycache__"

# Use .zipignore file (create in project root)
$ uv run zippa pack . --exclude-file .zipignore

Overwrite Protection

# Default: Skip if files exist (safe)
$ uv run zippa pack . --output backup.zip

# Ask before overwriting (interactive)
$ uv run zippa pack . --output backup.zip --ask

# Force overwrite (non-interactive)
$ uv run zippa pack . --output backup.zip --force-overwrite

.zipignore File

Create a .zipignore file in your project root:

# .zipignore example
*.pyc
__pycache__/
*.log
*.tmp
.git/
node_modules/
.env
*.DS_Store
build/
dist/
*.egg-info/

Notes

  • Items are relative to your current working directory (or --work-dir if specified)
  • Output location can be anywhere (absolute or relative path)
  • Use --help for complete command reference

Future Updates

  • make syntax for running commands more intuitive
  • implement compression summary after each compression
  • listen to events and compress correspondently

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

zippa-0.1.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

zippa-0.1.4-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file zippa-0.1.4.tar.gz.

File metadata

  • Download URL: zippa-0.1.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for zippa-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bb0594913286297d03c124ea5cc0ab2fb3d088259ef6107ff2538e55f667afc6
MD5 9e576b321f431a3ff39246c8f6c73e57
BLAKE2b-256 85dd026d1e40fbfe02be58a822ba3d1624f6d1f548a6a2209e4352a7becc0a37

See more details on using hashes here.

File details

Details for the file zippa-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: zippa-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for zippa-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0b60fe0012aec48ea4b87eae37357ab2926a0ed8c666b1cb12b7723b026f521
MD5 ad2bfab0869a27ed97a8a4065b0d2d7e
BLAKE2b-256 fc17399d240e845aafe13171c4624ff89bf91d0f34d66dcbed71f480e2b7bd2f

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