blurhash-python
BlurHash encoder implementation for Python
What it is and what it does
blurhash-python is an encoder for the BlurHash algorithm, which converts images into short, compact text hashes that represent their visual content. These hashes are useful for generating placeholder images, progressive loading strategies, or perceptual image comparison without storing full image data. The package accepts images from file paths, file objects, or in-memory image objects, and lets you control the detail level via x_components and y_components parameters (each 1–9) to trade off hash length against visual fidelity.
The package depends on cffi for compiled bindings, Pillow for image manipulation, and six for Python 2/3 compatibility. It ships precompiled wheels for Linux on x86_64 and aarch64 across Python 3.8–3.12, reducing install friction on those platforms. However, maintenance is dormant—the last release was 933 days ago—so forward compatibility with future Python versions or dependency updates is not guaranteed.
Use it for:
- Generate compact placeholder hashes for images in web applications to show during lazy loading or progressive image reveal.
- Create perceptual fingerprints of images for deduplication or similarity detection without storing full image data.
- Encode user-uploaded images into short strings for storage in databases or URLs when a visual preview hash is needed.
- Build image preview systems that display a blurred approximation while the full image loads over slow connections.
- Implement content-addressable image caching by hashing visual content rather than file metadata.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Encodes images into BlurHash strings, compact perceptual hashes that represent image content as short text suitable for placeholders or progressive loading.
Yes, if you need BlurHash encoding and can tolerate dormant maintenance. The package is marked Production/Stable, has no known vulnerabilities, and works reliably across modern Python versions on common platforms. Install friction is moderate due to compiled bindings, but prebuilt wheels are available. The main risk is that future Python or dependency updates may not be addressed promptly; verify decoding support and dependency requirements first.
Install
blurhash-python on PyPI
pip
pip install blurhash-pythonuv
uv add blurhash-pythonpoetry
poetry add blurhash-pythonInstalling blurhash-python
Before you install
Medium install friction due to compiled cffi bindings across multiple Python versions and architectures. Dormant maintenance (933 days since last release) with no recent commits tracked, though marked Production/Stable and supporting Python 3.8–3.12.
License in practice
MIT license (permissive) imposes minimal restrictions; you may use, modify, and distribute freely with attribution.
Quickstart
pip install blurhash-python
import blurhash
hash = blurhash.encode('image.jpg', x_components=4, y_components=3)
x_components and y_components must each be between 1 and 9.
Verify before relying
- Whether dormant status (933 days since release) poses a risk for future Python or dependency compatibility.
- Performance characteristics and typical hash generation time for various image sizes.
- Decoding capability—fact sheet only mentions encoding, unclear if decode is supported.
- Full range of supported image formats and whether Pillow must be pre-installed.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — cffi, Pillow, six |
| Maintenance | dormant — 933 days since the last release |
| First released | |
| Downloads | 167,240/month — #10,474 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: blurhash_python-1.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl; blurhash_python-1.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl; blurhash_python-1.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl; blurhash_python-1.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl; blurhash_python-1.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl; blurhash_python-1.2.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl; blurhash_python-1.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl; blurhash_python-1.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl; blurhash_python-1.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl; blurhash_python-1.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
blurhashEncodes images into compact blurhash text…
permissive · top 15,000 on PyPI
ImageHashImageHash computes perceptual fingerprints of…
permissive · top 5,000 on PyPI
bbhashBuilds minimal perfect hash functions for…
unclear · top 15,000 on PyPI
bcryptbcrypt provides modern password hashing using…
permissive · top 1,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
hashinAutomates the process of adding cryptographic…
permissive · top 15,000 on PyPI
hashidsGenerates short, unique, non-sequential hashes…
permissive · top 5,000 on PyPI
filehashCalculates and verifies file checksums and…
permissive · top 15,000 on PyPI
pyscryptA pure-Python implementation of the scrypt…
permissive · top 15,000 on PyPI
rensaRensa computes MinHash signatures for fast…
permissive · top 15,000 on PyPI