BlurHash encoder implementation for Python
Project description
blurhash-python
This is an encoder for the BlurHash algorithm. To find out more about BlurHash, see https://github.com/woltapp/blurhash.
Installation
Install blurhash with pip
$ pip install blurhash-python
or pipenv
$ pipenv install blurhash-python
Usage
Create blurhash from image file
import blurhash
with open('image.jpg', 'r') as image_file:
hash = blurhash.encode(image_file, x_components=4, y_components=3)
You can also pass file name as parameter to the function
import blurhash
hash = blurhash.encode('image.jpg', x_components=4, y_components=3)
y_components
and x_components
parameters adjust the amount of
vertical and horizontal AC components in hashed image. Both parameters must
be >= 1
and <= 9
.
Development
Install development requirements and package in editable mode
$ pipenv install --dev
Tests
Run test suite with pytest
in virtual environment
$ pytest
Use tox
to run test suite against all supported python versions
$ tox
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
blurhash-python-1.0.0.tar.gz
(179.2 kB
view hashes)
Built Distributions
Close
Hashes for blurhash_python-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 248541e62cd5ac3215bdbb1cd828951f40605d2876757591646a8a268a4cb75b |
|
MD5 | 4eba36118d757dabb0ce56edcfbd876f |
|
BLAKE2b-256 | e633bda3899cc96bca0e557861650e0fd89bdb29573339c03c031c2cd2259dbb |
Close
Hashes for blurhash_python-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 562f1d612870bb6e168a6b6ad492f95818156f9518579b331a3fc087713d6ba3 |
|
MD5 | 2613602fe38151e6ed08fe5a2001bb54 |
|
BLAKE2b-256 | 109398a33eb7539ecb64bbbceddc59b21a58225bbede1b18023bb19ae04f276f |
Close
Hashes for blurhash_python-1.0.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ab94d8439affb5cc702077fcbe4c43723c1594affd06b3414f8c56e153216e2 |
|
MD5 | 98273eb99f99871b1cb0ab5951eacf98 |
|
BLAKE2b-256 | c05aad16ca9145659a7f2a6e273ea1d2a226d4710e0c6c49c89a358d24a4b221 |
Close
Hashes for blurhash_python-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45af3e524143c2fa6270a100e1913037ec73ab244a43d3fb5afa8a1fd4ee45bd |
|
MD5 | 5754039e385b658dbe79e35ba5482d70 |
|
BLAKE2b-256 | ac0c4fb21ecdee6a5f4bedd6f2d9e3a71d939589aa1ecefa685e72097cdbd622 |
Close
Hashes for blurhash_python-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff46d34b3cd725dd63cac49ff4cf69ff053e96bf7c1759fac521080c23ad45cb |
|
MD5 | 925c966cd8a2b45f2d160e18da852fc3 |
|
BLAKE2b-256 | bf2e84aa8e6ae60316680293f9cae8a8d5c6d5f4fb5706cb4413c021fe4c9e3a |
Close
Hashes for blurhash_python-1.0.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d424ca16455925a5ef6f270757f64c9801da93482f0938e46a3b3e28342a2207 |
|
MD5 | df87052d27cbdc597e52ed7b49f6b643 |
|
BLAKE2b-256 | 0533c7095fb6ea8723bbcfc832c9a0883ed96b5a5a391f83d0f76a9b4a6a63a0 |
Close
Hashes for blurhash_python-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b77a9b51f893931c42b6bccb202b89fb0d31047b06d9ec6c62c799bb3187eaa3 |
|
MD5 | df6524c808e07552b8c369b6f95608e4 |
|
BLAKE2b-256 | e4d29b0a95ad587f6cf26e9a9ef4bee68f2a2320757a8b20629e45e84bc68247 |
Close
Hashes for blurhash_python-1.0.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af249e805213316154ebcc82819eb75327f52a60e201bc437b444f1e5cac7cd |
|
MD5 | 59b499a3a2974887301af95c8d55e4e3 |
|
BLAKE2b-256 | 7a0230736f1dd5a75e9c8f0d6b8ac06bcaedc367b0ef4a2ade719050ee2ba3e3 |
Close
Hashes for blurhash_python-1.0.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c61a778eff26af1b2ba2fa4716a31d585916325dd1cced1fee09887deff0808 |
|
MD5 | e3662f8a010fa0fd7f71a496f3173c49 |
|
BLAKE2b-256 | 4eb6ff96ca95fa8372e671f5dac36b030de3ae89b59069569a3e06b7574c5eee |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da3a3e07596e621d9733a6d091cc821d444b9e25fd588e5152eec574ebe916f5 |
|
MD5 | 1ec0f3aef2257bfae7ce815979ee29a0 |
|
BLAKE2b-256 | c8f3d1d7a5d955acfb28a5e66cff3d70a4073da1597c68b58860dda237a80f83 |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d50ea3200d53b6d878232afe8ba86f417640a9168a1ea8616dcaf78dd846021 |
|
MD5 | cb284da1ab4357dc27b2917ba957485a |
|
BLAKE2b-256 | a3b518ba244ad0c8cdffa13bc14a7625712b4eefe15d90bd03c692d1c5ec4167 |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ba6baba43c21582ead2d2ca2ab4095d8334f901ce042554899ac1cdcf9c18e9 |
|
MD5 | 090b893b535244febfaacf9a857e90dc |
|
BLAKE2b-256 | 6caebe2375147c7bafffe0211736913a8cf4d842424212dc7283f361143df57a |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 554bef244cea5ba0582ca4ad964f86331f7c6a1feaf972d75c01fb29fbd2dac7 |
|
MD5 | 0b8cad9c0aff1865ed096d457ffe5b87 |
|
BLAKE2b-256 | df0d2aa2f4c1eca80bd57535a3cf2b8cfa2c2e29051808e3a66eecc505e1f66a |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b6680e359f6332266dd2c2a11c954749d61292029641dbef1dad019a2e3ef32 |
|
MD5 | a41f6af1483b5519274158b1fb8dde0a |
|
BLAKE2b-256 | aee8d4d646c8f6de972ae12d2390a8ec3bec580e67ab924af67bcdfa27b2d0c8 |
Close
Hashes for blurhash_python-1.0.0-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e65d0a6734388ddbe2e25f3addde3f203f175d1b5a9c64aad7f65a5f4caa6584 |
|
MD5 | 97693d0e1977d1de99f38f7ff11ffc52 |
|
BLAKE2b-256 | 40d632c1e51e011ec00b84be566be8712a48eba33654af14268d4e470e73d183 |