MCPcopy Index your code
hub / github.com/bgunebakan/puhu

github.com/bgunebakan/puhu @v0.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.1 ↗ · + Follow
171 symbols 583 edges 18 files 109 documented · 64% updated 44d agov0.4.1 · 2026-05-25★ 721 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

  • 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

Built with PyO3 and image-rs

Core symbols most depended-on inside this repo

Shape

Method 123
Function 30
Class 15
Enum 3

Languages

Python71%
Rust29%

Modules by API surface

python/puhu/tests/test_image.py36 symbols
src/image.rs24 symbols
python/puhu/image.py24 symbols
python/puhu/tests/test_split.py23 symbols
python/puhu/tests/test_paste.py18 symbols
src/utils.rs12 symbols
python/puhu/operations.py8 symbols
python/puhu/enums.py8 symbols
src/palette.rs5 symbols
python/puhu/tests/test_enums.py5 symbols
src/conversions.rs3 symbols
src/errors.rs2 symbols

For agents

$ claude mcp add puhu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page