Skip to main content

High-performance Rust-based media compression for Python and FastAPI

Project description

// README.md

Shinu

Shinu is a blazing-fast, memory-safe media compression library written in Rust with Python . It supports compressing images, videos, audio, and PDFs with customizable quality settings.

🚀 Features

  • 📷 Images — JPEG, PNG, WebP, AVIF, BMP, TIFF, GIF, ICO
  • 🎞️ Videos — MP4, AVI, MKV (via FFmpeg)
  • 🎵 Audio — MP3, WAV, OGG, etc. (via FFmpeg)
  • 📄 PDFs — Compressed using Ghostscript
  • 🧠 Memory-safe, fast, and built in Rust
  • ✅ Per-media configurable compression settings
  • 🔌 Easy integration into Python & FastAPI apps

Install

pip install shinu

Usage in Python

from shinu import compress_file, CompressorConfig

config = CompressorConfig()
config.quality = 0.7
config.pdf_quality = "ebook"
config.image_format = "png"
config.image_colorspace = "rgb"
config.audio_bitrate = "128k"
config.video_crf = 28

output = compress_file("input.pdf", config)
print(output)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

shinu-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

File details

Details for the file shinu-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for shinu-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 497e49d48815274f281e0e688ebed569cb48b29a8f6b6276aca566d95874786f
MD5 8270f017ed86b20229d0b0093a541ca2
BLAKE2b-256 94b9754b540ea554dfd728433f5ef33bf5564e26e8abdf1ac784a3621985776c

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