AsyncBlink is a small extention to Blinker and enables you to use coroutines as receivers for your signals.
Install
Installation is simple, via pip:
$ pip install asyncblink
Usage
Usage is simple, too. Create a signal, connect some receivers to it
and then use the send() method to trigger all receivers
from asyncblink import signal
my_signal = signal('nice-signal')
async def coro_receiver(sender, **kwargs):
# an expensive io operation here
return 'done'
def receiver(sender):
return 'ok'
my_signal.connect(coro_receiver)
my_signal.connect(receiver)
my_signal.send('some-sender')
Other than that, AsyncBlink's usage is the same as Blinker, Take a look at the `Blinker documentation for further information.
Why this still exists?
Blinker now supports coroutines via signal.async_send, so why asyncblink
is still alive?
The blinker's implementation awaits for coroutines and it is not what I want so asyncblink schedules the coroutine and returns a task.
Source Code
Source code is hosted on github.
Metadata
Release files for asyncblink 0.4.0
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 |
|---|---|---|---|---|
| asyncblink-0.4.0.tar.gz | 2.5 kB | Without provenance | Details for asyncblink-0.4.0.tar.gz |
Release files / asyncblink-0.4.0.tar.gz
| Download URL | asyncblink-0.4.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a4d3a77c4692aeafc6c0a76204f09ba2f2006af7964ec8bc26b58208d5ec807
|
|
BLAKE2b-256 checksum How to use checksums |
b4cc23b86504b2c32757d1dd3ccc351eb9d7527bedcde21f8ae5872f0fae5e82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for asyncblink 0.4.0
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.