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.1.tar.gz
(179.6 kB
view hashes)
Built Distributions
Close
Hashes for blurhash_python-1.0.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51db2b5a224196b7fd1330721d15cd5f72c350ec8deb42006a8dfa11599a89e0 |
|
MD5 | e6b481952d6be848b4306619b62952ea |
|
BLAKE2b-256 | a549d0c19c062e1a48b3bedec585eab7970324b1b8595d247093dc27a98617dc |
Close
Hashes for blurhash_python-1.0.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a174a085263b8d2e377016088b3a515cd9ac211cda3da88b589bfe30ce868c1 |
|
MD5 | 20a6e0bb9ac5aaa94925f55380c4a31e |
|
BLAKE2b-256 | 38bc2a4f46c862d09426b5b9abe869ce59b6f35a9a1251e0efd0cf99e2861bd1 |
Close
Hashes for blurhash_python-1.0.1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 307ad64691dd76a296a840480e3f735c594d334cc44fa33fa0bad7af2e3b9689 |
|
MD5 | eab4bfa241e1417c4eb1f8ffe0caa198 |
|
BLAKE2b-256 | cb273095d29d0c18177d994c0e46f32fc6d94f758ddc4eaa19bead8dd299743c |
Close
Hashes for blurhash_python-1.0.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc90650fdad706fc7aa36a4df73b59272f13a2e50c0e9cf2b415395b91dba907 |
|
MD5 | 7d9e534a6e0bc72cb8ccb7f14eb8ff60 |
|
BLAKE2b-256 | ad51bfc2c4615a9e25b81f0c8d3b16c9178a4d9dfc662fffeb6f7648a39edcef |
Close
Hashes for blurhash_python-1.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c94b5a11475f07d4f59e5e588927a1fb534b52d5bb3b7e762949b68751a459f |
|
MD5 | 7fbbf7fc7dad1cfd1e581ee0c64212e7 |
|
BLAKE2b-256 | feb13c6d9baf450fc009ca7139b0d723e9e225f55937aa487a71c5d2cf84b399 |
Close
Hashes for blurhash_python-1.0.1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ecdb789e589b038a12c05ec5b82835991b5864f06b941ad08336300c0dad4ea |
|
MD5 | 513192c74ddfbb77ed7ea38cbe1af0ea |
|
BLAKE2b-256 | 539706280df98e62026f0f2101d01886ea47c504686b75a05e8be0f00981e4b2 |
Close
Hashes for blurhash_python-1.0.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e0edacb7cc56f9c3fde729c7afb6dbab78ac4e7b366d96345184e51ae28eebf |
|
MD5 | 8cb3df321b83b066121a9e16fc00d224 |
|
BLAKE2b-256 | c6211fa684336cf774399dc67be35b9de437777313374033f13a4c020acbae21 |
Close
Hashes for blurhash_python-1.0.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6bdefea457bbf353072dea020d048e1c973f38bf92569b52f021cb0820d3128 |
|
MD5 | 373ac8b0eec0badc9dc501aa73105c11 |
|
BLAKE2b-256 | c4f1c6939c0801b366daf6cbabddde932b3ef94ba0123dc0f68452151b2b0b76 |
Close
Hashes for blurhash_python-1.0.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1417145bdb530c30054a153e6e017b7e1e9d6ab97f51e8ee847fad27a1fd4637 |
|
MD5 | 0af28373d6c6878818d9f18da4a5951f |
|
BLAKE2b-256 | 5c6e9aec2851f02c88da8aaa5a24d3fe719d1ab8162bf7c360f071b8a63a51a1 |
Close
Hashes for blurhash_python-1.0.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5bb9e3a841503267670035e7c86315704d855498eb026efad43a6fb82cd09ae |
|
MD5 | 71ca3da45fc32f770fc2225bb327bf94 |
|
BLAKE2b-256 | b2c511c46b61da3df2745476dd750d8e471bc441058ecd77c24d90d2c920f508 |
Close
Hashes for blurhash_python-1.0.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8781c0d8a5858ec9ee1f2fc930ffe1d625ce5e103dcee6218852cff1f510fea1 |
|
MD5 | 428d9aa204ec282511fa7f6ce558e5d8 |
|
BLAKE2b-256 | 982e2ef0692ce7eb233ad9101057f4aadee134c7d9bd11ae4278fa27660c311f |
Close
Hashes for blurhash_python-1.0.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2257d50f46225952bbfcbd7cf9161b3a78b495a90826f9d7761a4ec421bea076 |
|
MD5 | 9b3faa71ff4f190e4f688abe6ce1f5b0 |
|
BLAKE2b-256 | b878e45912bc13549dffff7b8cc67775fad584f5331488e9b1cf42d5c2587681 |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a5c93b5ae8f01045a2c0cc6cfe4853f2afaa9eeecba7b668f93eea260442c41 |
|
MD5 | a6a9a525c76dc6e84acc4bf16f097a2d |
|
BLAKE2b-256 | b89ba992407de8eda817f1a4965ef1229b65522426b222b5bf9f88c84067d622 |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e858990409ac84046d8a7e7ca3ef25b6b19e000fe7346573089e35276a9856f5 |
|
MD5 | 72017993b7d6c04e0ef78b1edfa9619b |
|
BLAKE2b-256 | 6fac9fa5e27d0a3d002a2eb50c54a08f8dbdb9302f827b8cfc1c71ea6d2aa91c |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1766a136a40a707a2483a62ddb0f95685a48d81f7a4c3aa8c3b6b5fdd0a3fa |
|
MD5 | ddcdacb601ced0654569398d3d9a1fd8 |
|
BLAKE2b-256 | a12a389a39ea57a1ce222790924c3db5648a14a43b990553a166dffe436a1f4f |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7408b4b213cfed3427a8bd78adb21d2454bc235ba145eee4375608d2ca224e0a |
|
MD5 | 87ccf94211a8a5ea05a1897eea020a7b |
|
BLAKE2b-256 | 80226b05a0711496f8e5db7301716b0ec53962eab0fe409737484c5407f8f860 |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 414794ccacfbb3b9dc5a621a9d76ee71efa266124ea01ed5449d98a2b618a674 |
|
MD5 | ca9c78fd09c00801d39696563a4ee1da |
|
BLAKE2b-256 | 06b6842cafe1e0012fb189a342ae94f605931eb4a5ebabeea1a5442a6d81551a |
Close
Hashes for blurhash_python-1.0.1-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21677d86f643db4f560215bd39e5032050341d23c8d564204b9a9db95e8ff75f |
|
MD5 | 0f41a8fc314e25dc0768e3982d49dca3 |
|
BLAKE2b-256 | bfa0f5c7aee186bac11d81363753163bcf24283719168b231ef201761c38ac54 |