Skip to main content

CLI tool for image processing and uploading to cloud storage.

Project description

PicFlow

License: MIT Python Version

English | 中文

PicFlow is a command-line tool for automating image processing (scaling/compression) and uploading to cloud storage (e.g., Qiniu Cloud). Supports Windows, Linux, and macOS.

Features

🛠️ Core Capabilities

  • Image Processing
    • Scaling, format conversion (JPEG/PNG/WebP)
    • Quality compression (based on cwebp and ImageMagick)
  • Cloud Storage Integration
    • Supports Qiniu Cloud, AWS S3 (planned)
    • Auto-generates CDN URLs
  • Batch Operations
    • Recursively process folders
    • Parallel task acceleration

🚀 Efficiency

  • Config-Driven: Manage cloud keys and parameters via YAML
  • Cross-Platform: Run the same command on Windows/Linux/macOS

Installation

Prerequisites

  • Python 3.8+
  • External Tools (auto-detected):

Install PicFlow

pip install picflow

Quick Start

1. Configure Qiniu

Create config file ~/.picflow/config.yaml

storage:
  qiniu:
    access_key: "YOUR_ACCESS_KEY"
    secret_key: "YOUR_SECRET_KEY"
    bucket: "YOUR_BUCKET_NAME"
    domain: "https://cdn.example.com"  # CDN domain

2. Process & Upload Images

# Compress to WebP and upload
picflow process --format webp --quality 85 ~/images/photo.jpg

# Process entire folder recursively
picflow batch ~/gallery --scale 50% --output ~/compressed_gallery

Advanced Configuration

Custom Processing

processing:
  default_quality: 90
  formats:
    webp:
      method: 6  # Compression method level
    jpeg:
      progressive: true  # Progressive JPEG

CLI Options

# Show help
picflow --help

# Override quality parameters in configuration
picflow process input.png --quality 75 --format jpeg

Contributing

Issues and PRs are welcome!

  • Code Style: Follow PEP8
  • Testing: Add pytest unit tests
  • Docs: Update English or Chinese documentation

License

Licensed under the MIT License.

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

picflow-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

picflow-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: picflow-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for picflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e18d7b849dda933c497a7a5ce398690fc6cea52ddb48849d585f0b7a5007ac2e
MD5 a9f05c4667b1f0dd2a3a1a5fa1983b30
BLAKE2b-256 b7e7832d2cba7609dbf47a3cd215afffb7f5da8c88a58bd29c90997aa67b6b21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: picflow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for picflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d45b439d2e75741e4e725d4f00e012007d3aae101c0abf276b1b9de6d6f313d
MD5 a335bea245df9bc44b22e861fd125b34
BLAKE2b-256 058c4e79abf58c56ba3ebf0228139f3e44f13495efd120f6a63e354f99edd366

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