This release is a pre-release and may not be stable for production use.
QSignal – A QT Signal/slot for python
This project provides easy to use Signal class for implementing Signal/Slot mechanism in Python. It does not implement it strictly but rather creates the easy and simple alternative.
Classes
Signal
qsignal.Signal is the main class.
To create a signal, just make a sig = qsignal.Signal and set up an emitter of it. Or create it with sig = qsignal.Signal(emitter=foo).
To emit it, just call your sig(). Or emit it in asynchronous mode with the method async.
Example:
>>> from qsignal import Signal
>>> # Creating signal >>> sig = Signal()
>>> # Or >>> myobject.signal = Signal(emitter=myobject)
>>> # Connecting to signals >>> sig.connect(callback) >>> myobject.signal.connect(sig) >>> myobject.signal.connect(otherobject.callback_method)
>>> # Emitting
>>> sig()
>>> myobject.signal('argument(s)', optional=True)
>>> # Emitting in asynchronous mode >>> sig.async()
To connect slots to it, pass callbacks into connect. The connections are maintained through weakref, thus you don’t need to search for them and disconnect whenever you’re up to destroy some object.
Signaller
The base class for objects to maintain their Signals.
The only purpose of this class is to automate Signal names and emitter references.
>>> from qsignal import Signal, Signaller
>>> # For example, this is a class... >>> class MyClass(Signaller): >>> my_signal = Signal()
>>> # This is a slot... >>> def my_slot(): >>> sig = Signal.emitted() >>> assert sig.name == my_signal >>> assert sig.emitter.__class__ == MyClass
>>> # And the connections... >>> o = MyClass() >>> o.my_signal.connect(my_slot) >>> #... >>> o.my_signal()
Metadata
Release files for qsignal 1.0.2b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qsignal-1.0.2b1.tar.gz | 7.5 kB | Without provenance | Details for qsignal-1.0.2b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qsignal-1.0.2b1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for qsignal-1.0.2b1-py2.py3-none-any.whl |
Total release size: 14.1 kB
Release files / qsignal-1.0.2b1.tar.gz
| Download URL | qsignal-1.0.2b1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
603607c0a1ef0b050a5b8806793c1b203c74d34da9815fe87b17a7bf30f8c1ce
|
|
BLAKE2b-256 checksum How to use checksums |
25f6876034a74406da8b5d40a30e8a9afefd4ceb050bda691e5c4016b4428dac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / qsignal-1.0.2b1-py2.py3-none-any.whl
| Download URL | qsignal-1.0.2b1-py2.py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
12f758d84e543bfc209fba81365a2777039a457d25427253996b0fb83d14ee1c
|
|
BLAKE2b-256 checksum How to use checksums |
bc7aa17c3e2517a52c9fb76dd3239a12c5f03f32052efb040acbb324f0c6a178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for qsignal 1.0.2b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.