Skip to main content

A modern, high-performance image processing library for Python, powered by Rust.

Project description

Puhu 🦉

CI PyPI Documentation Python Rust License

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

Built with PyO3 and image-rs

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

puhu-0.4.0.tar.gz (50.2 kB view details)

Uploaded Source

Built Distributions

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

puhu-0.4.0-cp38-abi3-win_amd64.whl (808.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

puhu-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (987.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

puhu-0.4.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (958.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

puhu-0.4.0-cp38-abi3-macosx_11_0_arm64.whl (880.2 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

puhu-0.4.0-cp38-abi3-macosx_10_12_x86_64.whl (939.2 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file puhu-0.4.0.tar.gz.

File metadata

  • Download URL: puhu-0.4.0.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for puhu-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3d2abd2d9549592c56ce0648df4679d9ee7bb6cf5adf38e7661d7d9fba9e58f8
MD5 67aec0244cf004fa95add1775783e853
BLAKE2b-256 965ca3578a5d588293a9326972569cff481d945d947a68811645ec66b1c18994

See more details on using hashes here.

File details

Details for the file puhu-0.4.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: puhu-0.4.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 808.0 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for puhu-0.4.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 66bfd08ce368c6c82425ebd9f8c47b01586c0bd501d036b0c989ed826db5778f
MD5 f3060dd3299acd2983c24a6c0b8e8d1c
BLAKE2b-256 8bacd30ff756da590cd6822da7ccdcabcb450b78ebabbec91e72a211554ca4c8

See more details on using hashes here.

File details

Details for the file puhu-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for puhu-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8318e57e99447959440b57d24e4b44caf79ae2619fb8cf76df17256307c70636
MD5 dd71a2b256686622df2fef0041a7d87d
BLAKE2b-256 28acded672f02f3ac1f207080bc7f3e01cd9c2643e0d50f6fcdde522ea067d0d

See more details on using hashes here.

File details

Details for the file puhu-0.4.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for puhu-0.4.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 66528c1ea38f96f8449bc40227613c563e64b559814d869aa2993c63cfaec1ef
MD5 03886d793c1a929d6296a5c4a1b04f97
BLAKE2b-256 9f3dc7fcff64aad0c11abb488ac3200de9449bec0fc6e81e4b0b1f8dfe2ca652

See more details on using hashes here.

File details

Details for the file puhu-0.4.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for puhu-0.4.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18c076dadd4f065632b860328c6b8e2f236555995a0aadfb13f14bc88619c683
MD5 87477d617777cf40ca2b1505cd681a4e
BLAKE2b-256 75a5bf2af7ddfb9c128f05269f47519ada3113de28df16e089bb766682a22ac4

See more details on using hashes here.

File details

Details for the file puhu-0.4.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for puhu-0.4.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0bde5cf22edca5bc05245fea81d1a59000a79465b03a721b9f099dd7775174f9
MD5 e2606e62cc974c0f2d3859638fcaa8e2
BLAKE2b-256 dc95699d13529f4ad3d33101884c8922934823f2ba885396dedae153cd64c0be

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