Skip to main content

Reactivity library for PyQT

Project description

pyqt-reactivity

Description

pyqt-reactivity is a project that aims to provide basic reactivity module for PyQt widgets.

Installation

Install the latest version from PyPI:

pip install -U pyqt-reactivity

Usage

To use basic reactivity module, see the following example:

from pyqt_reactivity import Ref, computed, ref

# Create a reactive reference.
a = ref(1)
a.watch(lambda v: print("a updated:", v))


# Define a computed function that depends on the reactive reference.
def a_squared(a: Ref[float]) -> float:
    return a.value**2


# Create a computed reference.
b = computed(a_squared, args=(a,))
b.watch(lambda v: print("b updated:", v))

# Update the reactive reference.
a.value = 2

See more implementations on examples folder.

License

MIT

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

pyqt_reactivity-0.3.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyqt_reactivity-0.3.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pyqt_reactivity-0.3.0.tar.gz.

File metadata

  • Download URL: pyqt_reactivity-0.3.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for pyqt_reactivity-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f79616d466a23d12a69f14282719f3f8039b6348d568cc3c589eaae41be5ce7f
MD5 cd49de72f6e8636f02bfa7e49172c411
BLAKE2b-256 05ca2c3577bf7e701caefdbaa170c956dbebd79c8069f93184645b8000d5656d

See more details on using hashes here.

File details

Details for the file pyqt_reactivity-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqt_reactivity-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36ead78795d81fa7a62b6e8d3b638267a4951e26f3a1cc1733a07f782a45cd20
MD5 44aef08c39bbf19542a59dd8e515e377
BLAKE2b-256 4f225eb626ce3922c59830d0287aa9d9118ce0ea4355c385318b74fcf73c384d

See more details on using hashes here.

Supported by

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