Skip to main content

Encode or Decode Blurhash strings in a PySide2/6 project.

Project description

blurhash-pyside

GitHub License GitHub Actions Workflow Status GitHub Release PyPI - Version PyPI - Wheel PyPI - Python Version

Blurhash encoding and decoding for PySide2/6. This is a lightweight wrapper using the C++ encoding and decoding functions provided by Nheko-Reborn/blurhash.

  • Encode a QImage or QPixmap into a blurhash string
  • Decode a blruhash string into a QImage or QPixmap

For more information about Blurhash visit their official page.

Dependencies

This project has no external dependencies other than that you must provide either PySide2 or PySide6 in your own project.

The library is pre-compiled for popular platforms and recent Python versions. See the Releases or PyPi page for available wheels.

Local Development

Requirements:

  • Python 3.9+
  • Hatch
  • CMake 3.27+

Run the example:

# choose one:
hatch run pyside6:example

# pyside2 may not be available for all python versions or platforms
hatch run pyside2:example

Setup your local environment

Create a repo relative .venv/ dir:

hatch env create

Run the tests:

hatch test

Build the wheel for your platform:

hatch build -t wheel

Recompile the C++ project:

hatch run compile

The cmake project is not intended to be run on its own but it is possible to do it. The pybind11 dependency will be available after creating the default virtual environment and passing its python executable path to cmake via Python_EXECUTABLE. Some IDE's may do this for you when a python environment is activated in their configuration.

Manual CMake build

cmake -S . -B cmake-build-release -G Ninja
cmake --build cmake-build-release -j 8
cmake --install cmake-build-release --prefix src

Acknowledgements

The core C++ code for the blurhash functions was source from https://github.com/Nheko-Reborn/blurhash under the Boost Software License. Some minor modifications were made.

This project is made possible by pybind11 and scikit-build-core. Multi-platform wheels are generated using the cibuildwheel project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blurhash_pyside-0.2.6.tar.gz (197.9 kB view details)

Uploaded Source

Built Distributions

blurhash_pyside-0.2.6-cp312-cp312-win_amd64.whl (64.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

blurhash_pyside-0.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.3 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_x86_64.whl (63.4 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_arm64.whl (57.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

blurhash_pyside-0.2.6-cp311-cp311-win_amd64.whl (64.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

blurhash_pyside-0.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (72.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_x86_64.whl (64.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_arm64.whl (57.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

blurhash_pyside-0.2.6-cp310-cp310-win_amd64.whl (63.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

blurhash_pyside-0.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_x86_64.whl (63.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_arm64.whl (56.5 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

blurhash_pyside-0.2.6-cp39-cp39-win_amd64.whl (63.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

blurhash_pyside-0.2.6-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_x86_64.whl (63.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_arm64.whl (56.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

Details for the file blurhash_pyside-0.2.6.tar.gz.

File metadata

  • Download URL: blurhash_pyside-0.2.6.tar.gz
  • Upload date:
  • Size: 197.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for blurhash_pyside-0.2.6.tar.gz
Algorithm Hash digest
SHA256 4e6a2785825eeec3ef8de843f0931123f559bc988b4a1a591bef27224bf1a8d2
MD5 aeb7cedb0c5da935837ddb6e1bdab695
BLAKE2b-256 c3a3523b0e04456a309234dd3209da6c7548bbb894bb7740d62b8551595ae2bb

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 68c723c14f715a5904a91ba74f83eb03eb64b0c9f75af4db208d94d44bf674e5
MD5 cedd9f42bcced96dcfd9ac17e2079b15
BLAKE2b-256 a749c546aba218b6f310b52dfd32ec87c5e719fbbe38353a0d438e79af9cb76a

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 372ab54cbe2683f9352e16b9b07d63fd5518b3f84cd07777d85b697355f51a4c
MD5 2564bf9b0f20c05281b5c82a29bb15a6
BLAKE2b-256 f530f858ce40214b7b9e1554af81670e7d9c36098e8a5dcf833d0c1196704dba

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1e738a4679218e49e750595e443a53872d6b1f6a66a899671308e99fbfff09ea
MD5 dbdb621bec4d7618ae18a6026ced3cd5
BLAKE2b-256 16e102ea9f2d0920e9caff4953f9449afc9d93c7050d4755fbf66e5004330043

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2e851b16f595a21b53df46eedc29306eca942d2b6df46167fede28cdfeb38e2
MD5 6430f370ad15623d1f0133b7164fc832
BLAKE2b-256 5c2b34c3c056276348735df5b4a0aec4fc15a6981a0d6d7aaa12d7a771e26be5

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c35ee35c8d969cd7b7e11dd3e8eb934c04c65d0e530db43d6578cc3bd46b43bb
MD5 fa7e295542bf0705cf863aca3cfec2da
BLAKE2b-256 145548e818f99feb5122f1c96030472156ce106267b88b6249638785602747aa

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4ee390f6da450ff346640d35060d2eefdda8d935038c4692116fa395e2a18f87
MD5 db535eeb0479432183b33c0e036c155b
BLAKE2b-256 982fb8d99995a97f5436e17b50729be5b644c1f915f53ff82fbd33616d11a2d9

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 300241630dfe2ddebf541224aa554741a7befdab90c671b9bd5215629f2f89a4
MD5 fb511f7ff5e974e585808ea04605591f
BLAKE2b-256 66f5d7c0f538afb238de76fd10f297555625d1f00c169b8aab13e6c3a968ccb6

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c67f44e4ece5c7fd95ab57c25754bf104444f27008f7fb839ee0bd782c95fa4
MD5 16fc37c080e249c5befed32700f47e7e
BLAKE2b-256 464d8a79661a21e4132247846f10e8a646ce4dab90414efd23e822f407a41a5d

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bdd7b1cc821e716759e7450ff82c4cb2675b39ec819eda4c01b0124d4c47dd85
MD5 9769f5ba6f5754ed11b4f38eef5a0d58
BLAKE2b-256 7600dda451aad4e73522be2b855f98aff338a1c267fa09c541203bc4849fe672

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a356829da73195ddbb5609f0576f766f25b257d62ea6dfd5b818411761a13fa
MD5 732d56d822630dd5ebf479eb2bbb1c32
BLAKE2b-256 1465e2da69f2d2f0ace931d62f479878c373acf18120729ffa6470b300b8625a

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 dd06ab0620697a07604ae807d0a98cde040a96f7605168d0d4e940fa1314a352
MD5 606e411b40b896276991b84e97b33215
BLAKE2b-256 631f7f6f2745529954b34625d0f96c583c10bfe37f92f3732e8ce93fca2abfbb

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f0e898dd08ddc462b4a3d07ea479988fde575b5b0a5f7527fb59d894f464f40
MD5 2cd17466ef55ab8fd701dd0da1ac806c
BLAKE2b-256 73e68fb6490e467b173c079795eca33c3a2b4fbb2bd5bd9423ba508da35bb2cd

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e745f006642d7c01e67caeae6460d3c87a9022f0e3a30c359b8593fcc4f72702
MD5 a4de4312c32cc6c0d733d74c3ed7c892
BLAKE2b-256 c7aaa01e47243ad777ed54394a47a59c5d9201a3863a29d874c8dbab138d0d46

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 068bcabb026f5863e249c2a9f996e4f911ae6236ea3b991a0a7233a1d91d472f
MD5 081ce19073e2d761c426218c71a90c2d
BLAKE2b-256 8151c4335d094eb86fa3e7c431b2b00fe95c6bf996997277c97c4a2a80cc6f9d

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 565f72bdf90b7e7763da4633eec8108974f9f09a1cc25d9403b735ebbf481ae2
MD5 de9b93630548dea8dffaa93da865eb5e
BLAKE2b-256 3a23f52bea06f57d3789d39f053456ccb567456328823c1bbc8de738d1aa3bc2

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d504c7aa048649cedfebba11ae9ec0dc4cd8e45ae4b3a4db0b60d2d957f8b7a9
MD5 443dae84dd3c0300e4eefb8c36e16356
BLAKE2b-256 34f08418f1efe58c8e814ad9111b181083054e5e64f5b8bb0d48168dc686e2e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page