Blinker

1.9.0 · active · verified Sat Mar 28

Blinker is a fast and simple object-to-object and broadcast signaling library for Python, currently at version 1.9.0. It is actively maintained with a release cadence of approximately one to two months between major versions.

Warnings

Install

Imports

Quickstart

This example demonstrates how to create a signal, connect a receiver function, and send the signal in Blinker.

import os
from blinker import Signal

# Create a new signal
my_signal = Signal('my_signal')

# Define a receiver function
def my_receiver(sender):
    print(f'Received signal from {sender}')

# Connect the receiver to the signal
my_signal.connect(my_receiver)

# Send the signal
my_signal.send('SenderName')

view raw JSON →