Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blurhash-pyside

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blurhash-pyside

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

  • 1.0.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc