fast-blurhash
Minimal, fast BlurHash encoder/decoder for Python. A wrapper around the Rust fast-blurhash crate, with fully typed API and support for CPython 3.10–3.13.
Install
uv add "fast-blurhash"
# If you want to use PIL functionality
uv add "fast-blurhash[pillow]"
Usage
- Encode from PIL.Image
from fast_blurhash import encode
from PIL import Image
with Image.open("image.png") as img:
h = encode(img, x_components=4, y_components=3)
print(h) # e.g. "LEHV6nWB2yk8pyo0adR*.7kCMdnj"
- Encode from raw bytes (RGB or RGBA)
from fast_blurhash import encode, PixelMode
# pixels: bytes of length width * height * channels
# e.g. Image.tobytes()
blurhash_str = encode(pixels, 4, 3, width=640, height=480, mode=PixelMode.RGB)
- Decode to raw bytes (RGB)
from fast_blurhash import decode
pixels = decode("LEHV6nWB2yk8pyo0adR*.7kCMdnj", width=32, height=32)
# len(pixels) == 32 * 32 * 3
- Decode to PIL.Image (requires Pillow)
from fast_blurhash import decode, DecodeType, PixelMode
img = decode("LEHV6nWB2yk8pyo0adR*.7kCMdnj", 32, 32, as_=DecodeType.PIL, mode=PixelMode.RGBA)
img.save("preview.png")
Metadata
Release files for fast-blurhash 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fast_blurhash-0.4.0.tar.gz | 2.5 MB | Details |
Built distributions (wheels)
Total release size: 5.9 MB
Release files / fast_blurhash-0.4.0.tar.gz
| Download URL | fast_blurhash-0.4.0.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09183fd75ec664bf76829b7926a32766b5d638d2b0431ddf2541040f55187308
|
|
BLAKE2b-256 checksum How to use checksums |
98bf94c1ffaaa1490cd92bbe259e7cd8884a9212a72dd2793939f2be0148a2fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-win_amd64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 104.9 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c6178e0bb8d4bacc9e0c3acc119957fdc589e1a2cea19ebf65119560d1132280
|
|
BLAKE2b-256 checksum How to use checksums |
5cc1af25216917c59836ec789a959807a3db388f6fe71c2fdf01a2ae171fad99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-win32.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-win32.whl |
|---|---|
| Size | 101.1 kB |
| Tags | CPython 3.10 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
9f36dad4661ea9bb2bb2e025e07e32af4265dd0c6f78560effe4d78e3ddb1094
|
|
BLAKE2b-256 checksum How to use checksums |
8de0b68d30e868bed1e84dc05bf2de0d82dd7db825a50dcc36b9546cc325e904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 369.1 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
360233d23ebcc8e10b7bdde0f7171f6e010f2d56c0241df8031ef643e381be44
|
|
BLAKE2b-256 checksum How to use checksums |
17d1467621516fab0dcf30cbbb6e4942474d56d6737a9b5ee1e7af369c5c408a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_i686.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 394.1 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
dfc53854e75979b4763b576313d8dec8e877e38cf0912327ec475bcb35eae2ce
|
|
BLAKE2b-256 checksum How to use checksums |
769363dc1809ced281eb4f7aaa2c465380dbe0fb951f7d61331a7c5414f42da5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_armv7l.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 460.9 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
75db5414e53c799e2974c67e6f64d262381de3ac8fbc7540553a24d12c97348f
|
|
BLAKE2b-256 checksum How to use checksums |
6dff8994e6572b0b63416d80c6447c73c67626ec483d2abc51ac2e99db865a63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 366.0 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
714be3d4c7de62a53f1562c282df490fc3db51cb2c6333ec47c5c3f0c4055fa5
|
|
BLAKE2b-256 checksum How to use checksums |
93be674df44db17f8f87948eb0de99912a4f9b54bc22f9a71b82cba656d8d81e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 197.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1b3122121031641cba88e6b15587704f3fe62fde1c2d8980dea10834c5e56d92
|
|
BLAKE2b-256 checksum How to use checksums |
fd4ecdbdd6f100170aed238be017c155dd569db8f7098caf3ab035846f85a62e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 232.3 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
7ff3f386e24fb773af7878168d95c5d73cf5e40708b14115ec64c50eb50d1b28
|
|
BLAKE2b-256 checksum How to use checksums |
e76a9d871a7cc40ee4468ae5a044c8a6c73017b92537eaae0036e882c533cc0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 219.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
65c1e520035087510ff539d49b59a48232fa32889838e03112e29071fc49244a
|
|
BLAKE2b-256 checksum How to use checksums |
176fefa72c3b27b6166eea31f2d86822f3d9cef5b9553f8e86bbdc63980b48c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 197.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
c0fe851291d01d7405d8b48eadbf81f4fff05a1e5dee6d307479f6a31f5c7ff8
|
|
BLAKE2b-256 checksum How to use checksums |
33c9ee91a5fd72ccd57df223a31868446954fd019d68ecd6cf796175dbafa9f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 185.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
cc3526e1e7f1ab21c5f266a0dca761288421d3c8c926399636ea9249a33b059b
|
|
BLAKE2b-256 checksum How to use checksums |
7123f7cbef8ff8c55a3b9690e74e2fe451f96051ff35e8ed86bec9cf8fec49c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 212.6 kB |
| Tags | CPython 3.10 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
467641d15eb308bfc7cd5987f6e832dee6fa2869bd98f22630ee3f182a55d22c
|
|
BLAKE2b-256 checksum How to use checksums |
ef03bd0a3a3dc23211dafc6aa9d721549b586a1472276f88ea8ea4bcbff80eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 176.9 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
363470ae409d2abada517a664f4ff341a8a07fe0656c0b321e8bf55a2bfe8e88
|
|
BLAKE2b-256 checksum How to use checksums |
376dfc02b21596a48829651cbdb00c8464cb8a78bcc6a37ca7c0b9516bfe302f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / fast_blurhash-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | fast_blurhash-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 190.3 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e61ad9192d05cf590f9eafd788183c998146113b63b23c8d3aa5d07c84ea89c9
|
|
BLAKE2b-256 checksum How to use checksums |
77f5fc913ec90c84e4eae5c2268c376ad1f2eb82bba9341a000db968c519f8dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|