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.
Project description
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")
Project details
Release history Release notifications | RSS feed
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 fast_blurhash-0.3.0.tar.gz.
File metadata
- Download URL: fast_blurhash-0.3.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a731aed3c98f7e055bc3a0566c7bbe89e1a1c5e11416008aeb4b56b8e17f08b7
|
|
| MD5 |
af8e834d87d67b1fd59c882197cfe1c5
|
|
| BLAKE2b-256 |
ede3dd39d5a68cf5700e2f3b58b04f53eceff111d4b1646ada7e9027bbbd84ff
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 104.9 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e56e0fe66315fb6b9f79ca8cb7611c1ffae9b1e219144e82a522ed214f0045f
|
|
| MD5 |
3a79f569b02ec54a9603d2a4a47b8bfc
|
|
| BLAKE2b-256 |
4d0336e9b75a1ea9942576442be1f81f54c83f64f433f20d4e6fe1a9cb7e3f0b
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-win32.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-win32.whl
- Upload date:
- Size: 101.1 kB
- Tags: CPython 3.10+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fa7070041a3be5b4256af9dd0bf3bd784c106d2eec3b5eef75cbd8b7812687c
|
|
| MD5 |
f06c67a313a20c1e6de99b2ae97602b0
|
|
| BLAKE2b-256 |
87870bf16be960723b302783a4071a46e41010dbd4b5bf2536b5a2df9b838471
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 369.1 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7242c28b259671f81f9c03fa613f13ec6c17a770aee6fbb33769dd5d6135eb78
|
|
| MD5 |
83bbc8b49d8fb0ef717a1773cda47642
|
|
| BLAKE2b-256 |
ad07b5405e99bd3f82b641cb981ae1fd117ecf9f10e5c5e368a0cdd82214dc4b
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 394.1 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
483ef7ce78e533a899a634552350a7e28bf909ea37a404f14ff8f4b22a97aac8
|
|
| MD5 |
afe97094444a58b3cd8a63f880dbb0b7
|
|
| BLAKE2b-256 |
47ea6769eca937e8465fe4894da941a2183b37eeb2af4b7227698b908dff3cee
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 461.0 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585739192e63080879a78dc12b036df4393d9de6bf26d693846978c8ead23e9a
|
|
| MD5 |
69b8372161af012cb100086f4427e086
|
|
| BLAKE2b-256 |
310ff86863f34bbca5fa7205414b738713ff5a85d5e537d91744a0e4b1c00a68
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 366.1 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
158d60866f6ff420df63e40a4d7d2f79881f18e982723ee5b79cc3c8a0bc2776
|
|
| MD5 |
60757176f027cb5643708f673ad150ff
|
|
| BLAKE2b-256 |
e48d633ee8f85e15f5edb37d921917d82ce853ba29912f867cbfd25defa738c4
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 197.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6171efc04c2ef60b5c6d61b28e8035ea19e2a9c71537bc9544714c6fd3ead8a7
|
|
| MD5 |
fb100d069ccb333dfe73d2d346f6a302
|
|
| BLAKE2b-256 |
85054596f7f44aa468c5be7c2386446050ae0309178caab0e1f7c6ed60b49890
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 232.2 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cec22db93549b5bfc1a7dccf770894acd8df1170eefd08b04a99ff3ebb51887
|
|
| MD5 |
1d4a6e74967621a8b7b6be4abf86fece
|
|
| BLAKE2b-256 |
02b83be716ce8d902afb83bd8055d0b9ea083ceb3b9a555142b00bcf3281effa
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 219.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d7942e4864c77f8baf6703b7da0b899a8e1a3ddfe8d12edd8e85f5925a119eb
|
|
| MD5 |
b8695f1346997dbc2a9dbbbd30a0d312
|
|
| BLAKE2b-256 |
dff652ee0f92ef543ea3362c1da240899844179f13b8e422522b403411a346f1
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 197.4 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
277e6255736050c01d50fd16f6e1e13ccc95a3b0b4c4517efafbaaa9825988dc
|
|
| MD5 |
36293c6582ed41b0fdcfaa952cbcf76b
|
|
| BLAKE2b-256 |
eef1d4ff74768d21c24d20342e5c6b8b133757c5a81786a71c80f3d62ea2c81d
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 185.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
673e1dae3970c7af48ca1d019aac4aa43f9aa15dd1adb2ed5511dc9cc698b186
|
|
| MD5 |
99b9e1bc1aa314584cce0e8ed8fa5e92
|
|
| BLAKE2b-256 |
03a016d91b48b73207788ef3f6b4b4189a2d0edb249c7b540bfa40397cbbcff9
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 212.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8675598dfa9d63de5fb03ab75f4f1a8ba1036f0ba06f34b7e8d16c4e5bba76
|
|
| MD5 |
f3832210fb9f26b1808aa083153f5270
|
|
| BLAKE2b-256 |
533979d7b3a1124d8bebb9d471af4cd9f22b7667eb746d0ab9a3df5f2a7a431e
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 176.9 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adbb29c87ae5c44377425d5af97cab1e53ca0c2bf44a904333bd815279fbfdb3
|
|
| MD5 |
2ceaaf124aa68ad938aefce41ce24503
|
|
| BLAKE2b-256 |
94bb8908b6083f4be6311e8454b9ba2a24a8d7df33923063cd6733bb76424fe3
|
File details
Details for the file fast_blurhash-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: fast_blurhash-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 190.3 kB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e000faaff6b3ce7eed1211fbf728ee5395ef52da49ea46377f8ddd3097a875a9
|
|
| MD5 |
9093a67927dddd567184b8797822c5f6
|
|
| BLAKE2b-256 |
125fa55356f968390d312763063201258b272be475a69dd0597d1e0023448bd5
|