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.1.0.tar.gz
(181.6 kB
view hashes)
Built Distributions
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83b33ebde721507b3674a564e32a17d7ae1df4659649c89c8032b2b1817dfc7 |
|
MD5 | 65cfd8351b5f4d2e643f7cae8281c3fc |
|
BLAKE2b-256 | ca060e032d537cdce187d774de81f1fea69274a8f28c71d5ebf16641388ebc18 |
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a21b89e640a6a5f7a5139c7e484d038a158679e0599bf45d90dfbae4bfd38dc |
|
MD5 | 1ca7c3bb769c45eb02dbaa0639dd2ab5 |
|
BLAKE2b-256 | 3fc0bb66137015d693a0994d824cb6df4a1e409f431e1addb18c0e7078e4d360 |
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0700b9c825315f2ab3562c86c472380427be100350b365bba44fb0c33e82138f |
|
MD5 | bbf1ec053b8dc25fc6a580e194e96ae8 |
|
BLAKE2b-256 | 3c380dacef8106c001c4ff25630185a6b76cba0547647d12cc8fb21fe2283692 |
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50779eb8aacee7d4bd96b0392f273263d0d9f568be35de64173cac966fc27bec |
|
MD5 | 80608eac96d058852dc4bd53186b50cb |
|
BLAKE2b-256 | 61d5022d8a7854cf7b60f0463d63cf0a91daee4120832b0cea8cb61f7d5ac8f1 |
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdeb506b5e890a59df2ee531dee56856d310468e768ad4f88fe868c1beaa21bc |
|
MD5 | a890da387b7b81e39b907f072f1f0d45 |
|
BLAKE2b-256 | e4b75d70e8705382e995a415b38064dcb439d9184f69fc906279755a67abd07e |
Close
Hashes for blurhash_python-1.1.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fdfa53a4af5b104fdc24f6df4b481db643f8b16c0d8da863762dc779e5319fb |
|
MD5 | 85aa15a79e108aede10e0905220d962e |
|
BLAKE2b-256 | 18f6a8e7a1dc8d70798b2492e9eaf41bb1dbc8e083f1ce52716ba85d71197631 |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e968b6b1cd30e7f3e691be01cc7612350454a8bf1aa01101eeffd48671f44bc |
|
MD5 | a9b2053d0ebd0ec8a784efddbdfaeee2 |
|
BLAKE2b-256 | 46578186100496decbd708b71ae229339d76a1e4997ec1783701848de80bb9bd |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0373c451d1a0289ca227b8659e0610e2c0c6e05b81ab7b323c30069682c8dd62 |
|
MD5 | 31b42a6b6f6b9fa18017d28499d2b544 |
|
BLAKE2b-256 | b255929eb9704a9dd969f002502ccb9d69c2e36a9792d3bc29cddc30134f6aa6 |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2421824335d08cff25fc0ce5bf29c3195f7f9a6700ae5ec43dda4d4e195476 |
|
MD5 | 908fe231c92c384ecdf4388ee13e8ac8 |
|
BLAKE2b-256 | 108a9498c831e0718229d0e8c73e2c98109db0706f5d561b50a9838fa1d34d77 |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a647f9af84ed53547d1c8f400b9033598a0ff66a1c41f15d0103030a915bd773 |
|
MD5 | faf0fde9ad58312b80ccfc161b7ad1e6 |
|
BLAKE2b-256 | 26aadaf4e2457de91353ea990c2d46c92334216b709f4e393b61b7eb1fa1e612 |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b8bb8e3b043e61098e98469044f1a9cc5bcd185482d403c026057926bb8ec53 |
|
MD5 | 4d2d7056641f2ced277c57e22d368bdf |
|
BLAKE2b-256 | ac38b7e2594e05b81d5ff7fb570ca1622e6f0a6418e2e3e135a008cdd18d4c56 |
Close
Hashes for blurhash_python-1.1.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd7b9ff7e12bef729d1b0e191899dadfccdf1b8dbe956ba86bd667c7dd4a010 |
|
MD5 | 9257b94570dcd53c573f15e3dd4362a2 |
|
BLAKE2b-256 | 87a807a434ecb2f96e32f2923a2d2fceea6a823fb0f29b2705176f280d5fb3ed |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81d012dade16cf23a33da227eb6a3ab4680fdd6a672fd4f9c367f94b6110b2c8 |
|
MD5 | 41bbd047f23f54d98f1aceae3feb6785 |
|
BLAKE2b-256 | 54b17c1ef4761f5a6d5c22cab5ec6f4af5f77fd372d325c1db15123437d29826 |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 859fd63beccdabf29294f3093fa024401b861ad2cdc9adc7b8907747a623cda4 |
|
MD5 | 8203d48b1b0f9dcdd77fcfe9270ba076 |
|
BLAKE2b-256 | d15f5ade28598c6b1e5e74464a0d35ce7413f21563fa4edfd960ddcfcd41383f |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99bf34be1b173542af66fbe0a22aeb6bd4c0495018f0ab0b13436f995ad271dc |
|
MD5 | dba91aeb899bf7227169d4a9e0cf8793 |
|
BLAKE2b-256 | 3b50bcbc72428ef1e9c33588534c718a7b95417e208be228636ae3a6fa195af7 |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9033e4299c2bb6bb2586a85ff20b268d40cab10b5bb71cb7bc558af0deb40b5 |
|
MD5 | 1208f0f3fd24fd7f81674d76174f1cec |
|
BLAKE2b-256 | 8b91e04415807df0db79eb7c09c743aabef90ef34aff7cafa8d50879570eba28 |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa8d259026913a7391340354a5f0b74e92e862e0ee0ff478c4e2722eb0fb3e17 |
|
MD5 | d10c8822cbd7e55c3dfbc9279a0bb11c |
|
BLAKE2b-256 | eb385e840aa6250240a8e36d2cd8b3d2a06fc6d1ab919931169128cd7ce3eac3 |
Close
Hashes for blurhash_python-1.1.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d203b35d5725d37ad50370d506cf6a2e724e0292a76da2980aad45cc44261d68 |
|
MD5 | 180c1ad1f39c1dc096bc5c7195b6dcac |
|
BLAKE2b-256 | 5ad2a9a7bbf85b83b373d46f530a1019e934b1f4a517ed23c411bb6daaa1ca81 |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 066ec40f31e4ede5520c37ff04e10ddefb0a545e21cfc8c6c21dfb1ceb8bcb33 |
|
MD5 | 6019411e884407ef2ed9e9b3162348db |
|
BLAKE2b-256 | 007d9bf97b779479e23a37087f013e88553292e4689797a136b66355121f9f52 |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f45cf0c2e4a4a59ece9cad812ec14a4420d2d1d05ac0bb2c5341cf0b6cc80010 |
|
MD5 | b41aaaf58d1206e033343845b0a93e39 |
|
BLAKE2b-256 | 526bea97f9a3af9b0dc8d29d8535a32e65a3b68594f27ac70bf00f7ab26ef38a |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38ca59f8abec117fba5c49fdc0e4132eabce0a7f41622f6c0dba4b8227a4ea9 |
|
MD5 | 3ecbeb482782207667d47f35edd4634d |
|
BLAKE2b-256 | 6f996e9b3c65e6bce9290c81f2d102d81093b0a0d1e12737bc01bb242823b7d4 |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e4fd7c5ea80620114f273c9c6393e2313d8cacfabc8e26315b9c5abcae954e2 |
|
MD5 | c81e5e4b0b9b5d70d699f26cc707bfa7 |
|
BLAKE2b-256 | 6657a90128c4781cfa1266316f0942631ea3b78cd46686447a4dc649e14e4c35 |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81b917c606633a1f9a685eb7d0f12fef06a4d3364bc251e342351e8ddfa564dc |
|
MD5 | cde9abaa30a49d6bb2eb2ac61a00084e |
|
BLAKE2b-256 | 2a7d3cec9b48a850d1cded3a255418ad959cb217493cd27b8800779159ea9432 |
Close
Hashes for blurhash_python-1.1.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f5665731968e1cd3e04754b7ab1e15614591e8340c3249d30c7a57a7279ab36 |
|
MD5 | 15d30222fb4ccee4b7c67bcdeef8f621 |
|
BLAKE2b-256 | 0665f770239c9aa67a9678b629244a90fe012ca1ffc8c60f07f2a11babdc3bf7 |