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.3.tar.gz (8.8 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.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zippa-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d936e8fc329bdd51d82b7cd6f6ecbc87747824bcfea28d3174b0eb715a93ae54
MD5 c591f488b557f9b419e6cbbae0c6bd89
BLAKE2b-256 a8cd46868352273e33077c586a83cc7ad16328e199eeffe586431895e3670599

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zippa-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c86ec5d9d135919112f6b2bdc9b05700a47c3d417d9c0f03d862df11c71fd899
MD5 d8b4a92ff5480aa32ca2b3d68854c471
BLAKE2b-256 0ec041e4c9c38faa2623ad0e83d8c9d98e2242b44df8e2e7a2e492a3c28fcd41

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