A modern, high-performance image processing library for Python, powered by Rust.
Project description
Puhu 🦉
A modern, high-performance image processing library for Python, powered by Rust. Puhu provides a Pillow-compatible API while delivering significantly better performance for common image operations.
Features
- High Performance - Rust-powered for significantly faster operations
- Pillow Compatible - Drop-in replacement for most Pillow operations
- Memory Safe - Built with Rust's memory safety guarantees
- Easy to Install - Pre-built wheels for all major platforms
- Rich Format Support - PNG, JPEG, BMP, TIFF, GIF, WEBP
Installation
pip install puhu
Pre-built wheels are available for:
- Linux (x86_64, ARM64)
- macOS (Intel, Apple Silicon)
- Windows (x64)
- Python 3.8+
Quick Start
import puhu
# Open and process an image
img = puhu.open("photo.jpg")
img = img.resize((800, 600))
img = img.crop((100, 100, 500, 400))
img.save("output.png")
# Drop-in Pillow replacement
from puhu import Image
img = Image.open("photo.jpg")
img = img.resize((400, 300))
img.save("resized.jpg")
Documentation
Full documentation is available at puhu.readthedocs.io
Benchmarks
Full benchmarks are available at BENCHMARKS.md
Development
Building from Source
# Clone repository
git clone https://github.com/bgunebakan/puhu.git
cd puhu
# Install dependencies
pip install -r requirements.txt
# Build and install
maturin develop --release
# Run tests
pytest python/puhu/tests/
Requirements: Python 3.8+, Rust 1.70+, Maturin
Contributing
Contributions are welcome! See our Contributing Guide for details.
License
MIT License - see LICENSE file for details.
Links
- Documentation: https://puhu.readthedocs.io
- PyPI: https://pypi.org/project/puhu/
- Source Code: https://github.com/bgunebakan/puhu
- Issue Tracker: https://github.com/bgunebakan/puhu/issues
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
Built Distributions
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 puhu-0.4.1.tar.gz.
File metadata
- Download URL: puhu-0.4.1.tar.gz
- Upload date:
- Size: 51.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
353003a2fc2c9d08b13f28a7d05be5bf05404ffb88214662fc527c9de4f775bb
|
|
| MD5 |
17ddc8070f1b189d73fa17c02ef27085
|
|
| BLAKE2b-256 |
c167b8efc91d522ede658e961afbd71f54510acc5e18f79ba12085208cc2e480
|
File details
Details for the file puhu-0.4.1-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: puhu-0.4.1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 805.2 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c51bb8e4683952236b823facf9419242481d0d425bbba981704bb2f92d94ebdd
|
|
| MD5 |
1331e96bf23162c9bf1ad3d81bc1839d
|
|
| BLAKE2b-256 |
3863b81d1b217b99cdecd56dcb747586df11da5b718ea5c0009b881585c687ed
|
File details
Details for the file puhu-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: puhu-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 984.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a484c17b4e19ced9442726aade6e2dc627a02d84a3e380b808207f49f9f052a2
|
|
| MD5 |
8546b43841f966097e5b77bad4bab32a
|
|
| BLAKE2b-256 |
14e0fd76cc93b5a452f2f35e0da5d7225d72959271965e55a650a957dd04ddb3
|
File details
Details for the file puhu-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: puhu-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 958.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dad6ac0e76998dc458fc49e489425a72449cac1ed64284159476d6e1dd12c7c
|
|
| MD5 |
618f17bf1000e74a7da29250f23de519
|
|
| BLAKE2b-256 |
a3dfdafd821813ed0f7b92f6817e1281fc396d981979ea2e99970333da7f262c
|
File details
Details for the file puhu-0.4.1-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: puhu-0.4.1-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 880.4 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9a1fb38e354320365dfb29bc44a0dd028b215675cbf52f31c0ed5ea592f9719
|
|
| MD5 |
c410d79ee4fe8b1ee2fb2c24f738fbf8
|
|
| BLAKE2b-256 |
5ecbc66d428afa4d3be942afab9bd4ebddbb64cb8ef44b31bd984dde4af66397
|
File details
Details for the file puhu-0.4.1-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: puhu-0.4.1-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 940.3 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83045041f747f8e285fab69cc9ac731c38b41b0d6e2050dd6efd1a5cd4243242
|
|
| MD5 |
f705ef6aadfae6c631f9da70d0acad90
|
|
| BLAKE2b-256 |
ca445aa2d570aa3de9186f638298f243db43dfaf8e3708d9eb8ced40bb420f15
|