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.2.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

blinker-1.8.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blinker-1.8.2.tar.gz
  • Upload date:
  • Size: 23.2 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.2.tar.gz
Algorithm Hash digest
SHA256 8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83
MD5 ce2f9fb3bc0c0000db11f012f5f5afda
BLAKE2b-256 1e57a6a1721eff09598fb01f3c7cda070c1b6a0f12d63c83236edf79a440abcc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blinker-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01
MD5 453ec9473100de91897d16e4ae568139
BLAKE2b-256 bb2a10164ed1f31196a2f7f3799368a821765c62851ead0e630ab52b8e14b4d0

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