Skip to main content

Fast, simple object-to-object and broadcast signaling

Project description

Blinker

Blinker provides a fast dispatching system that allows any number of interested parties to subscribe to events, or "signals".

Pallets Community Ecosystem

[!IMPORTANT]
This project is part of the Pallets Community Ecosystem. Pallets is the open source organization that maintains Flask; Pallets-Eco enables community maintenance of related projects. If you are interested in helping maintain this project, please reach out on the Pallets Discord server.

Example

Signal receivers can subscribe to specific senders or receive signals sent by any sender.

>>> from blinker import signal
>>> started = signal('round-started')
>>> def each(round):
...     print(f"Round {round}")
...
>>> started.connect(each)

>>> def round_two(round):
...     print("This is round two.")
...
>>> started.connect(round_two, sender=2)

>>> for round in range(1, 4):
...     started.send(round)
...
Round 1!
Round 2!
This is round two.
Round 3!

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

blinker-1.8.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

blinker-1.8.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file blinker-1.8.0.tar.gz.

File metadata

  • Download URL: blinker-1.8.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for blinker-1.8.0.tar.gz
Algorithm Hash digest
SHA256 a07839c713d30141433647247db269dd896895b0bf56d2362f663496feae562b
MD5 59a90ef8d396db945d1c079f4ec2ced9
BLAKE2b-256 4ededf5112127fdb2d0ebfd64e506bee284581bbde969d1639cbb0288735af54

See more details on using hashes here.

File details

Details for the file blinker-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: blinker-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for blinker-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f2c330c2586b5d4c5ece65e4dd9fa6512192d946f7c1aaac31ca0380d5d041f
MD5 cc575da5c150a481d2fd3ea25c7b8839
BLAKE2b-256 bb824fe537be9fbf58ef02481630f804a9664779ed378bb833265ff455ac8427

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