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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shinu-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: shinu-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
497e49d48815274f281e0e688ebed569cb48b29a8f6b6276aca566d95874786f
|
|
| MD5 |
8270f017ed86b20229d0b0093a541ca2
|
|
| BLAKE2b-256 |
94b9754b540ea554dfd728433f5ef33bf5564e26e8abdf1ac784a3621985776c
|