fast_thumbhash
A fast Python package for ThumbHash image encoding/decoding using Rust bindings (PyO3, maturin) to the official thumbhash crate.
fast_thumbhash is 60.5x faster than the pure Python implementations I tested:
28.13854099076707 ms (thumbhash)
0.46491601096931845 ms (fast-thumbhash - this package)
thumbhash-python was also taking the same time range as thumbhash (27 - 35 ms).
Features
- Exposes
rgba_to_thumb_hash,thumb_hash_to_rgba,thumb_hash_to_average_rgba,thumb_hash_to_approximate_aspect_ratio. - Supports raw RGBA bytes and Pillow Image (Pillow is optional).
Installation
pip install git+https://github.com/sitatec/fast_python_thumbhash.git
Build from source using maturin:
maturin develop
Usage Example
from fast_thumbhash import rgba_to_thumb_hash, thumb_hash_to_rgba
from PIL import Image
img = Image.open('example.png').convert('RGBA')
thash = rgba_to_thumb_hash(img)
restored = thumb_hash_to_rgba(thash)
License
MIT
Metadata
Release files for fast-thumbhash 1.0.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_thumbhash-1.0.0.tar.gz | 5.0 kB | Details |
Built distributions (wheels)
Total release size: 2.0 MB
Release files / fast_thumbhash-1.0.0.tar.gz
| Download URL | fast_thumbhash-1.0.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ac95c0f5b5020763af096c2812012a75b501d6ada8b5340acc7d96a1bb6b85a
|
|
BLAKE2b-256 checksum How to use checksums |
54288d65e1e95998f5e28a0a68af548ff04082942556a7961d73eded495427dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp312-cp312-win_amd64.whl
| Download URL | fast_thumbhash-1.0.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 114.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ceb3336a7a7d6f2a05063b80a47a0c3654d539492953a09762817059df93595e
|
|
BLAKE2b-256 checksum How to use checksums |
1ea5cb4ba71c455da378187650503fc2526c13f5d8065fceba0ed6ad75c09ce0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp312-cp312-win32.whl
| Download URL | fast_thumbhash-1.0.0-cp312-cp312-win32.whl |
|---|---|
| Size | 107.8 kB |
| Tags | CPython 3.12 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
ce0a0dd828c5f3b70c2c99edac93c4b9d24558eaa45c2a8332fe9cb075492e54
|
|
BLAKE2b-256 checksum How to use checksums |
50f20947968c4b6c0dea7a980a74552b66a8038051def02ebdae7cddb34731dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | fast_thumbhash-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 247.5 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d5bb7323846bc0ace579a8aa5b87c7ab5e32fd4774814d1156c1e119bff3d7bf
|
|
BLAKE2b-256 checksum How to use checksums |
d53fc1747d8ad6a71badf00e53fac3d4328fc9f048fc63cf2846639222eedff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | fast_thumbhash-1.0.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 210.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
53efd7935a5a026bcfab7f0ff7f2c7ad57ed42cdbbd0597a3d5365ea769f4b37
|
|
BLAKE2b-256 checksum How to use checksums |
2b81eb982cda3e2a8ef71ad4e974155d53436ed9e23d6cc56d42a80998c19c92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp311-cp311-win_amd64.whl
| Download URL | fast_thumbhash-1.0.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 113.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
931d02851a4a629889a97a01ff34e4bd561d1d90df6aa2361ecbdd510217911e
|
|
BLAKE2b-256 checksum How to use checksums |
2eae6636e625aa48ec67dc5b941f13902349290308c7b7594d5b3c8adf7a8a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp311-cp311-win32.whl
| Download URL | fast_thumbhash-1.0.0-cp311-cp311-win32.whl |
|---|---|
| Size | 107.5 kB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
7441092d80602ba9c875d895cdd2196daded75d14ff92b6594b565291f9a4d26
|
|
BLAKE2b-256 checksum How to use checksums |
320da0831dd9533f8fbf5d9d0348dad7dd3aa7044e0844baf75446768947e9b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | fast_thumbhash-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 247.0 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f168b1f672240b778e5b7a3ecacd03bf0ff4ba5f8f4692cec5f80f2709bf3020
|
|
BLAKE2b-256 checksum How to use checksums |
34136b486ae7e4e53f04921ea4b6fb112ffe51833eed92e0615459f99e1c1f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | fast_thumbhash-1.0.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 210.3 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9f4a5828bb675ab4c64639ab3e3cf5006151b71dec6ff879e796a8c93738d7c4
|
|
BLAKE2b-256 checksum How to use checksums |
9f3fa84f1358b8e421e24efae345deddc12ff7481c9a5708382b1fc639f65c5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp310-cp310-win_amd64.whl
| Download URL | fast_thumbhash-1.0.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 113.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dc6d0c1178ecfec34fa752b7dc143a1bb33196559ed5cf17f63aca32e2104f2f
|
|
BLAKE2b-256 checksum How to use checksums |
a96efedb4a4e8498d6638b2e680529acdbb535a2efa8636df6c7a396a5efec0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp310-cp310-win32.whl
| Download URL | fast_thumbhash-1.0.0-cp310-cp310-win32.whl |
|---|---|
| Size | 107.5 kB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
c71f91d95957272832130c633fc2cb041d13d7639d26d980ab9f569588d55cd8
|
|
BLAKE2b-256 checksum How to use checksums |
a7bb5c6fe593970aed9155d4f2a7102daa4904655fe74763978eb20542713a2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | fast_thumbhash-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 247.0 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1acc03912cde8cef4611804b5bfe85e61ee8166569bec2987a52779765697cb9
|
|
BLAKE2b-256 checksum How to use checksums |
74ae7d1a4ecfada00eec456b173984ff918c6f47fc7eb86c1bab25c9597990bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / fast_thumbhash-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | fast_thumbhash-1.0.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 210.4 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7963cefed9ffcd7c672357fc179767412723022837e459c0c5d6d66da85f6258
|
|
BLAKE2b-256 checksum How to use checksums |
3dc04641c5d41c835b5ec09a25328fe819c6e5f642b9ec8e76e4337f85e8f330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency log